datainfrahq / druid-operator

Apache Druid On Kubernetes
Other
100 stars 39 forks source link

Add support for annotations on Deployment/StatefulSet resources in DruidNodeSpec #145

Closed SamWheating closed 5 months ago

SamWheating commented 6 months ago

Fixes https://github.com/datainfrahq/druid-operator/issues/142

Description

Adding a ReplicationControllerAnnotations field to the DruidNodeSpec schema. This allows users to specify annotations to be applied to the StatefulSet / Deployment object.

I'm not 100% sure of the naming - what do you think? I didn't want to call it StatefulSetAnnotations since the user can opt for a deployment instead.

Also regenerated the API docs, which led to a huge diff as it appears they weren't regenerated after https://github.com/datainfrahq/druid-operator/pull/53 (hence the huge diff)

This PR has:

I haven't tested this on a real kube cluster, but all of the e2e tests run. Is that sufficient for an overall minor/straightforward change?

SamWheating commented 6 months ago

You can merge the annotations if specified in both the spec druid nodeSpec and druidSpec

Done ✅

Any strong preference on how these are merged? In my opinion it makes sense for the finer-grained DruidNodeSpec-level annotations to override the DruidSpec-level annotations (see implementation), but I see that we do the opposite with PodLabels.

itamar-marom commented 6 months ago

@SamWheating does Reddit use the operator? if so, can we add you as users in the ADOPTERS.md ?

SamWheating commented 6 months ago

does Reddit use the operator?

Not in any official capacity, this work was completed on my own time and mostly just out of personal interest.