Skip to content

Commit 468b76c

Browse files
Kim-Yukyungmergify[bot]
authored andcommitted
helm: add labels option for VolumeSnapshotClass
Adds a Helm value to apply custom labels to the VolumeSnapshotClass, similar to the existing annotations option. Signed-off-by: Kim-Yukyung <yukyung116@gmail.com>
1 parent a096936 commit 468b76c

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

charts/ceph-csi-cephfs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ charts and their default values.
226226
| `volumeSnapshotClass.create` | Specifies whether the VolumeSnapshotClass should be created | `false` |
227227
| `volumeSnapshotClass.name` | Specifies the cephFS VolumeSnapshotClass name | `csi-cephfsplugin-snapclass` |
228228
| `volumeSnapshotClass.annotations` | Specifies the annotations for the cephFS volumeSnapshotClass | `[]` |
229+
| `volumeSnapshotClass.labels` | Specifies the labels for the cephFS volumeSnapshotClass | `{}` |
229230
| `volumeSnapshotClass.clusterID` | String representing a Ceph cluster to provision storage snapshot from | `<cluster-ID>` |
230231
| `volumeSnapshotClass.snapshotNamePrefix` | Prefix to use for naming CephFS snapshots | `""` |
231232
| `volumeSnapshotClass.snapshotterSecret` | The secrets have to contain user and/or Ceph admin credentials. | `csi-cephfs-secret` |

charts/ceph-csi-cephfs/templates/snapshotclass.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ metadata:
1313
release: {{ .Release.Name }}
1414
heritage: {{ .Release.Service }}
1515
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
16+
{{- with .Values.volumeSnapshotClass.labels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
1617
driver: {{ .Values.driverName }}
1718
parameters:
1819
clusterID: {{ .Values.volumeSnapshotClass.clusterID }}

charts/ceph-csi-cephfs/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,12 @@ volumeSnapshotClass:
411411
# storageclass.kubernetes.io/is-default-class: "true"
412412
annotations: {}
413413

414+
# Labels for the VolumeSnapshotClass
415+
# Example:
416+
# labels:
417+
# velero.io/csi-volumesnapshot-class: "true"
418+
labels: {}
419+
414420
# String representing a Ceph cluster to provision storage snapshot from.
415421
# Should be unique across all Ceph clusters in use for provisioning,
416422
# cannot be greater than 36 bytes in length, and should remain immutable for

charts/ceph-csi-rbd/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ charts and their default values.
217217
| `volumeSnapshotClass.create` | Specifies whether the VolumeSnapshotClass should be created | `false` |
218218
| `volumeSnapshotClass.name` | Specifies the rbd VolumeSnapshotClass name | `csi-rbdplugin-snapclass` |
219219
| `volumeSnapshotClass.annotations` | Specifies the annotations for the rbd volumeSnapshotClass | `[]` |
220+
| `volumeSnapshotClass.labels` | Specifies the labels for the rbd volumeSnapshotClass | `{}` |
220221
| `volumeSnapshotClass.clusterID` | String representing a Ceph cluster to provision storage snapshot from | `<cluster-ID>` |
221222
| `volumeSnapshotClass.snapshotNamePrefix` | Prefix to use for naming RBD snapshots | `""` |
222223
| `volumeSnapshotClass.snapshotterSecret` | The secrets have to contain user and/or Ceph admin credentials. | `csi-rbd-secret` |

charts/ceph-csi-rbd/templates/snapshotclass.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ metadata:
1313
release: {{ .Release.Name }}
1414
heritage: {{ .Release.Service }}
1515
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
16+
{{- with .Values.volumeSnapshotClass.labels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
1617
driver: {{ .Values.driverName }}
1718
parameters:
1819
clusterID: {{ .Values.volumeSnapshotClass.clusterID }}

charts/ceph-csi-rbd/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,12 @@ volumeSnapshotClass:
545545
# storageclass.kubernetes.io/is-default-class: "true"
546546
annotations: {}
547547

548+
# Labels for the VolumeSnapshotClass
549+
# Example:
550+
# labels:
551+
# velero.io/csi-volumesnapshot-class: "true"
552+
labels: {}
553+
548554
# String representing a Ceph cluster to provision storage snapshot from.
549555
# Should be unique across all Ceph clusters in use for provisioning,
550556
# cannot be greater than 36 bytes in length, and should remain immutable for

0 commit comments

Comments
 (0)