Skip to content

Commit 7f8802f

Browse files
authored
Merge pull request #481 from navilg/467-csi-snapshotter-without-crd
feat: allow csi-snapshotter to be enabled without installing CRDs
2 parents fb32aa7 + 7b636c8 commit 7f8802f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
106 Bytes
Binary file not shown.

charts/latest/csi-driver-nfs/templates/crd-csi-snapshot.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
{{- if .Values.externalSnapshotter.enabled -}}
1+
{{- if and .Values.externalSnapshotter.enabled .Values.externalSnapshotter.customResourceDefinitions.enabled -}}
22
---
33
apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
77
controller-gen.kubebuilder.io/version: v0.8.0
88
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665"
9+
"helm.sh/resource-policy": keep
910
creationTimestamp: null
1011
name: volumesnapshots.snapshot.storage.k8s.io
1112
spec:
@@ -314,6 +315,7 @@ metadata:
314315
annotations:
315316
controller-gen.kubebuilder.io/version: v0.8.0
316317
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665"
318+
"helm.sh/resource-policy": keep
317319
creationTimestamp: null
318320
name: volumesnapshotclasses.snapshot.storage.k8s.io
319321
spec:
@@ -448,6 +450,7 @@ metadata:
448450
annotations:
449451
controller-gen.kubebuilder.io/version: v0.8.0
450452
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665"
453+
"helm.sh/resource-policy": keep
451454
creationTimestamp: null
452455
name: volumesnapshotcontents.snapshot.storage.k8s.io
453456
spec:

charts/latest/csi-driver-nfs/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ externalSnapshotter:
138138
requests:
139139
cpu: 10m
140140
memory: 20Mi
141+
# Create volume snapshot CRDs.
142+
customResourceDefinitions:
143+
enabled: true #if set true, VolumeSnapshot, VolumeSnapshotContent and VolumeSnapshotClass CRDs will be created. Set it false, If they already exist in cluster.
144+
141145
## Reference to one or more secrets to be used when pulling images
142146
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
143147
##

0 commit comments

Comments
 (0)