k8ssandra / k8ssandra-operator

The Kubernetes operator for K8ssandra
https://k8ssandra.io/
Apache License 2.0
176 stars 79 forks source link

K8SSAND-1136 ⁃ Improve labels management #277

Open adutra opened 2 years ago

adutra commented 2 years ago

This came up in a conversation with @Miles-Garnsey : our various resources do not always have similar labels. One example is the "managed-by" label that Stargate is missing.

Here are a few actions we could do to improve this:

Note that this work could be extended to annotations too.

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: K8OP-276

burmanm commented 2 years ago

There was input from one user in the cass-operator that this should include all the generated resources and include all the recommended Kubernetes labels also. Of course with some added by the user also (which have to replicated to corresponding fields in the cass-operator then, so that resources generated by cass-operator also have those additional labels / annotations)

jsanda commented 2 years ago

I definitely think we should be applying a common set of labels to all resources generated by the operator(s). This is similar to #501.

With labels applied on all resources we couple employ filtering on all watches which would reduce cache sizes and memory consumption by the operator.