Skip to content

Conversation

@desertaxle
Copy link
Member

@desertaxle desertaxle commented Mar 17, 2025

Add a KubernetesObserverSettings object to allow configuration of the namespaces the observer watches and additional labels to filter on.

The namespaces the observer watches can be set with the PREFECT_INTEGRATIONS_KUBERNETES_OBSERVER_NAMESPACES environment variable like this:

export PREFECT_INTEGRATIONS_KUBERNETES_OBSERVER_NAMESPACES="default,another-one"

and additional labels to filter on can be set like this:

export PREFECT_INTEGRATIONS_KUBERNETES_OBSERVER_ADDITIONAL_LABEL_FILTERS="prefect.io/deployment-id=not-a-real-deployment-id,prefect.io/deployment-id=also-not-a-real-deployment-id"

Both these settings can be used to assign observers to specific domains if multiple observers are running in the same cluster.

@desertaxle desertaxle force-pushed the prefect-kubernetes-0.6.0 branch from 9163dbc to 46cce5d Compare March 17, 2025 20:26
@desertaxle desertaxle marked this pull request as ready for review March 17, 2025 20:44
@desertaxle
Copy link
Member Author

@meggers I think these changes will make it easier to test the new version of the Kubernetes worker in a smaller scope. Let me know if there's anything else you think would be helpful!

@meggers
Copy link

meggers commented Mar 17, 2025

@meggers I think these changes will make it easier to test the new version of the Kubernetes worker in a smaller scope. Let me know if there's anything else you think would be helpful!

Thanks @desertaxle, it looks like this will allow us to use specific namespaces and filter to flows more specific to our worker with prefect.io/work-pool-id. I think that should help us! Appreciate it.

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks sweet!

@desertaxle desertaxle merged commit 2934ca6 into prefect-kubernetes-0.6.0 Mar 18, 2025
15 checks passed
@desertaxle desertaxle deleted the add-config-options branch March 18, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants