From 08dadaa486cea3dca4b254f68fbc0d057f89bce0 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 27 Jan 2022 13:23:25 +0530 Subject: [PATCH] helm: add annotations and labels for VSC add support to specify annotations and labels for the volumesnapshotclass. closes: #9655 Signed-off-by: Madhu Rajanna --- .../templates/volumesnapshotclass.yaml | 14 ++++++++++++++ deploy/charts/rook-ceph-cluster/values.yaml | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/deploy/charts/rook-ceph-cluster/templates/volumesnapshotclass.yaml b/deploy/charts/rook-ceph-cluster/templates/volumesnapshotclass.yaml index 704eb43f9..646824a76 100644 --- a/deploy/charts/rook-ceph-cluster/templates/volumesnapshotclass.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/volumesnapshotclass.yaml @@ -11,8 +11,15 @@ apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshotClass metadata: name: {{ $filesystemvsc.name }} +{{- if $filesystemvsc.labels }} + labels: +{{ toYaml $filesystemvsc.labels | indent 4 }} +{{- end }} annotations: snapshot.storage.kubernetes.io/is-default-class: "{{ if default false $filesystemvsc.isDefault }}true{{ else }}false{{ end }}" +{{- if $filesystemvsc.annotations }} +{{ toYaml $filesystemvsc.annotations | indent 4 }} +{{- end }} driver: {{ .Values.operatorNamespace }}.cephfs.csi.ceph.com parameters: clusterID: {{ .Release.Namespace }} @@ -34,8 +41,15 @@ apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshotClass metadata: name: {{ $blockpoolvsc.name }} +{{- if $blockpoolvsc.labels }} + labels: +{{ toYaml $blockpoolvsc.labels | indent 4 }} +{{- end }} annotations: snapshot.storage.kubernetes.io/is-default-class: "{{ if default false $blockpoolvsc.isDefault }}true{{ else }}false{{ end }}" +{{- if $blockpoolvsc.annotations }} +{{ toYaml $blockpoolvsc.annotations | indent 4 }} +{{- end }} driver: {{ .Values.operatorNamespace }}.rbd.csi.ceph.com parameters: clusterID: {{ .Release.Namespace }} diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index 68c27158b..fd3e8f270 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -403,6 +403,8 @@ cephFileSystemVolumeSnapshotClass: name: ceph-filesystem isDefault: true deletionPolicy: Delete + annotations: {} + labels: {} # see https://rook.io/docs/rook/latest/ceph-csi-snapshot.html#cephfs-snapshots for available configuration parameters: {} @@ -411,6 +413,8 @@ cephBlockPoolsVolumeSnapshotClass: name: ceph-block isDefault: false deletionPolicy: Delete + annotations: {} + labels: {} # see https://rook.io/docs/rook/latest/ceph-csi-snapshot.html#rbd-snapshots for available configuration parameters: {}