k8ssandra / k8ssandra-operator

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

Add commonAnnotations to Cassandra metadata #1094

Closed ClusterJan closed 8 months ago

ClusterJan commented 11 months ago

What is missing?

There should be a commonAnnotations field in the cassandra.metadata section of the ressource K8ssandraCluster.

Why do we need it?

Other operators in our Kubernetes cluster are interfering with the resources created by the cass-operator, and we need to add annotations to exclude these resources from the other operators.

Environment

Anything else we need to know?: No.

andrejshapal commented 11 months ago

Looks very usefull for argocd.

Miles-Garnsey commented 9 months ago

From discussions internally and reviewing the conversations on discord, it looks like what is being asked for here is annotations for the statefulset, pods etc. coming from cass-operator.

I was originally going to implement this in k8ssandra-operator, but

  1. Annotating the podTemplateSpec won't necessarily annotate the statefulSet itself.
  2. There is a preference amongst the rest of the team for adding an AdditionalAnnotations field in the cass-operator CRD instead of doing this via the podTemplateeSpec.

I'll raise a ticket on cass-operator first, then expose this in k8ssandra-operator as a second step. Note that this won't change annotations on other resources created by k8ssandra-operator, but my understanding is that fields already exist to control annotations for the other resources.