Skip to content

Commit

Permalink
Merge pull request #826 from geoffrey1330/create_snapshotclass
Browse files Browse the repository at this point in the history
feat: added volumesnapshotclass to helm chart
  • Loading branch information
k8s-ci-robot authored Dec 18, 2024
2 parents 6b69b9b + 7f5ab6c commit e2ab583
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
Binary file modified charts/latest/csi-driver-nfs-v0.0.0.tgz
Binary file not shown.
9 changes: 9 additions & 0 deletions charts/latest/csi-driver-nfs/templates/snapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if .Values.volumeSnapshotClass.create }}
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: {{ .Values.volumeSnapshotClass.name }}
driver: {{ .Values.driver.name }}
deletionPolicy: {{ .Values.volumeSnapshotClass.deletionPolicy }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/latest/csi-driver-nfs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ externalSnapshotter:
enabled: false
name: snapshot-controller
priorityClassName: system-cluster-critical
deletionPolicy: Delete
controller:
replicas: 1
resources:
Expand All @@ -159,6 +160,12 @@ externalSnapshotter:
customResourceDefinitions:
enabled: true #if set true, VolumeSnapshot, VolumeSnapshotContent and VolumeSnapshotClass CRDs will be created. Set it false, If they already exist in cluster.

## volumeSnapshotClass resource example:
volumeSnapshotClass:
create: false
name: csi-nfs-snapclass
deletionPolicy: Delete

## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
Expand Down
7 changes: 7 additions & 0 deletions deploy/snapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-nfs-snapclass
driver: nfs.csi.k8s.io
deletionPolicy: Delete

0 comments on commit e2ab583

Please sign in to comment.