Skip to content
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

Make operator aware of supervisor-specific runtime features #361

Open
krnowak opened this issue Sep 14, 2018 · 2 comments
Open

Make operator aware of supervisor-specific runtime features #361

krnowak opened this issue Sep 14, 2018 · 2 comments

Comments

@krnowak
Copy link
Contributor

krnowak commented Sep 14, 2018

It might be beneficial for users if the operator somehow exposed some information supervisor has about the service it manages. An example could be labeling pods with their election status. So at some point some pod could have a label saying that the service here is a leader. That in order could be used in a selector of a Kubernetes Service resource to expose the leader service outside the cluster.

Another thing to expose could for example be a version of the service - it would be useful for the habitat-updater.

The information can be gotten through the HTTP gateway of the supervisor, but of course not everything would be needed to be exposed as labels on Kubernetes Pods.

Also, what needs to be taken into account that it is possible for those labels to change during the lifetime of a pod and so the operator should be careful not to clobber those labels after it created them.

@surajssd
Copy link
Contributor

Can we label pods differently that are managed by same StatefulSet?

@krnowak
Copy link
Contributor Author

krnowak commented Sep 14, 2018

Heh, no idea, never tried that actually. But if this is problematic (and most likely it will be) then there is always a possibility to send three separate CRD manifests to the cluster, which will create three habitat resources, where each creates one statefulset with number of replicas being 1.

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

No branches or pull requests

2 participants