Skip to content

Commit

Permalink
helm: add annotations and labels for VSC
Browse files Browse the repository at this point in the history
add support to specify annotations and
labels for the volumesnapshotclass.

closes: #9655

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
  • Loading branch information
Madhu-1 committed Jan 27, 2022
1 parent 287d9a3 commit 08dadaa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions deploy/charts/rook-ceph-cluster/templates/volumesnapshotclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/rook-ceph-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

Expand All @@ -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: {}

Expand Down

0 comments on commit 08dadaa

Please sign in to comment.