OT-CONTAINER-KIT/redis-operator

Custom annotations for PVC

オープン

#689 opened on 2023/11/08

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Go (377 件のフォーク)auto 404
enhancementgood first issue

Repository metrics

Stars
 (1,416 個のスター)
PR merge metrics
 (平均マージ 32d) (30d で 10 merged PRs)

説明

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

コントリビューターガイド