OT-CONTAINER-KIT/redis-operator

Custom annotations for PVC

Aperta

#689 aperta il 8 nov 2023

 (4 commenti) (0 reazioni) (0 assegnatari)Go (377 fork)auto 404
enhancementgood first issue

Metriche repository

Star
 (1416 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I need to set custom annotations on PVC created by operator CRDs.

My usecase is to prevent PVC deletion if helm chart is uninstalled using annotation helm.sh/resource-policy: keep.

For now, metadata from PVC is ignored by operator when generating annotations: https://github.com/OT-CONTAINER-KIT/redis-operator/blob/5bf8182035ce29cc303d1de5cc25d5a1fb937f3e/k8sutils/statefulset.go#L319

Describe the solution you'd like

Apparently, I want annotations from CRD (f.e. Redis: spec.storage.volumeClaimTemplate.metadata.annotations) to be added to claim template in generated statefulset.

What version of redis-operator are you using?

redis-operator version: quay.io/opstree/redis-operator:v0.15.1

Guida contributor