Skip to content

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Jan 24, 2020

to run more than one operator next to each other without interfering

could also be used to detach a cluster from the operator

@FxKu FxKu changed the title define ownership between operator and postgres clusters define ownership between operator and clusters via annotation Jan 24, 2020
@sdudoladov
Copy link
Member

the Namespaces section of the operator doc should also mention that there are now 2 complementary ways to isolate operators: namespaces and ownership annotations

@FxKu FxKu added this to the 1.5 milestone Feb 21, 2020
Copy link
Member

@sdudoladov sdudoladov left a comment

Choose a reason for hiding this comment

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

  1. 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

@sdudoladov
Copy link
Member

also one needs to carefully configure separate operator instances to use different CRD / configmaps ; when the ownership annotations are used

@FxKu
Copy link
Member Author

FxKu commented Mar 16, 2020

  1. Why does this PR use annotations and not labels ? From Annotations docs:

From our K8s experts: "Labels are for humans, annotation for robots. The whole class etc patterns are based on annotations in all controllers!"

@FxKu
Copy link
Member Author

FxKu commented Mar 16, 2020

also one needs to carefully configure separate operator instances to use different CRD / configmaps ; when the ownership annotations are used

That's up to the user. Multiple operators can share one ConfigMap/CRD or use their own dedicated configuration.

@FxKu
Copy link
Member Author

FxKu commented Mar 17, 2020

the Namespaces section of the operator doc should also mention that there are now 2 complementary ways to isolate operators: namespaces and ownership annotations

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.

@sdudoladov
Copy link
Member

👍

1 similar comment
@FxKu
Copy link
Member Author

FxKu commented Mar 17, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants