Apibara CRD should allow customizing pod annotations/labels.
fracek opened this issue · 1 comments
fracek commented
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:
- add annotations to the indexer metadata
- add an option to the operator to propagate some annotations/labels from the indexer CRD to the pod.
At a high level, it means:
- updating
StartArgs
(operator/src/bin.rs
) to have two new options (inherited_annotations
andinherited_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
andpod_labels
inoperator/src/reconcile.rs
.
Sravya-212 commented
@fracek I would like to do this