-
Notifications
You must be signed in to change notification settings - Fork 66
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
K8SSAND-1052 ⁃ No options to add labels on the statefulset object #235
Comments
There's currently no method to add user defined labels in the generated StatefulSet. podTemplateSpec only adds the details to the StatefulSet's podTemplateSpec which is why StatefulSet itself doesn't get added labels from there. |
@burmanm I can add it if you want. What will be the best way to do it? |
I was going to suggest a field like |
@jsanda I prefer the first option I think IMO. Operator should always give the possibility to the user to add some labels. Often is related to the enterprise policy for tagging stuff. I don't know what you think. Do you think we should used the |
I would create/use a struct that has the fields from ObjectMetadata that you want which I assume is primarily labels and maybe annotations. |
Most likely the AdditionalLabels+AdditionalAnnotations type of struct would make more sense. That would be checked in the |
Adding only to the StatefulSet sounds odd since it's not "external" in a sense, like the services in some cases are. |
Yeah. I will try to open a PR today related to that. |
@burmanm I'm talking about adding labels for everything that the operator creates. Do you think I should add the |
What happened?
I trying to add labels to the statefulset because of our policy in our cluster. Does it possible currently with the operator?
I saw that we have
podTemplateSpec
and I added those. But seems to add it only on the pod not the statefulset object?Did you expect to see something different?
Add the possibility to add the labels on all resources created.
How to reproduce it (as minimally and precisely as possible):
Environment
Cass Operator version:
* Kubernetes version information:docker.io/k8ssandra/cass-operator:v1.7.1Insert image tag or Git SHA here
┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1052
┆priority: Medium
The text was updated successfully, but these errors were encountered: