dna icon indicating copy to clipboard operation
dna copied to clipboard

Apibara CRD should allow customizing pod annotations/labels.

Open fracek opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

I'm running the Apibara Operator in production and I need to customize the pod labels/annotations. In my case it's to annotate the pod so that another operator (OpenTelemetry operator) can add a sidecar to it.

Describe the solution you'd like

There should be a mechanism for the indexer's pod to inherit annotations from the indexer CRD. I recommend we follow the same approach as cloud native postgres:

At a high level, it means:

  • updating StartArgs (operator/src/bin.rs) to have two new options (inherited_annotations and inherited_labels) that take a comma-separated list of annotations/labels to propagate.
  • when the reconciler generates the pod AND service, it must add any whitelisted annotations/labels from the CRD to the resource. Good starting points are object_metadata and pod_labels in operator/src/reconcile.rs.

fracek avatar Feb 26 '24 10:02 fracek