-
Notifications
You must be signed in to change notification settings - Fork 1k
define ownership between operator and clusters via annotation #802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Why does this PR use annotations and not labels ? From Annotations docs:
You can use either labels or annotations to attach metadata to Kubernetes objects. Labels can be used to select objects and to find collections of objects that satisfy certain conditions. In contrast, annotations are not used to identify and select objects.
Here we employ the controllerId
to split PG clusters into groups managed by different operator instances. Using labels can eliminate filtering out irrelevant clusters in the operator code
also one needs to carefully configure separate operator instances to use different CRD / configmaps ; when the ownership annotations are used |
From our K8s experts: "Labels are for humans, annotation for robots. The whole class etc patterns are based on annotations in all controllers!" |
That's up to the user. Multiple operators can share one ConfigMap/CRD or use their own dedicated configuration. |
Hm, I mean the two paragraphs are next to each other. I think, it's fine. I did not want to advertise the feature too much as it should be used with care. |
👍 |
1 similar comment
👍 |
to run more than one operator next to each other without interfering
could also be used to detach a cluster from the operator