Skip to content

Commit d549219

Browse files
committed
add volume group snapshot
1 parent 4222fce commit d549219

File tree

79 files changed

+5042
-1627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5042
-1627
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ REV = $(shell git describe --long --tags --dirty)
4040
BUILD_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
4141
ENABLE_TOPOLOGY ?= false
4242
LDFLAGS ?= "-X ${PKG}/pkg/azuredisk.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/azuredisk.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/azuredisk.buildDate=${BUILD_DATE} -extldflags "-static"" ${GOTAGS}
43-
E2E_HELM_OPTIONS ?= --set image.azuredisk.repository=$(REGISTRY)/$(IMAGE_NAME) --set image.azuredisk.tag=$(IMAGE_VERSION) --set image.azuredisk.pullPolicy=Always --set driver.userAgentSuffix="e2e-test" --set snapshot.VolumeSnapshotClass.enabled=true --set snapshot.enabled=true --set node.getNodeIDFromIMDS=true --set controller.runOnControlPlane=true --set controller.replicas=1 --set snapshot.snapshotController.replicas=1
43+
E2E_HELM_OPTIONS ?= --set image.azuredisk.repository=$(REGISTRY)/$(IMAGE_NAME) --set image.azuredisk.tag=$(IMAGE_VERSION) --set image.azuredisk.pullPolicy=Always --set driver.userAgentSuffix="e2e-test" --set snapshot.VolumeSnapshotClass.enabled=true --set snapshot.enabled=true --set snapshot.enableVolumeGroupSnapshot=true --set node.getNodeIDFromIMDS=true --set controller.runOnControlPlane=true --set controller.replicas=1 --set snapshot.snapshotController.replicas=1
4444
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
4545
ifdef DISABLE_ZONE
4646
E2E_HELM_OPTIONS += --set node.supportZone=false
@@ -128,11 +128,13 @@ ifdef TEST_WINDOWS
128128
--set controller.logLevel=6 \
129129
--set node.logLevel=6 \
130130
--set snapshot.enabled=true \
131+
--set snapshot.enableVolumeGroupSnapshot =true \
131132
--set cloud=$(CLOUD)
132133
else
133134
helm install azuredisk-csi-driver charts/${CHART_VERSION}/azuredisk-csi-driver --namespace kube-system --wait --timeout=15m -v=5 --debug \
134135
${E2E_HELM_OPTIONS} \
135136
--set snapshot.enabled=true \
137+
--set snapshot.enableVolumeGroupSnapshot =true \
136138
--set cloud=$(CLOUD)
137139
endif
138140

3.54 KB
Binary file not shown.

charts/latest/azuredisk-csi-driver/templates/crd-csi-volumegroupsnapshot.yaml

Lines changed: 659 additions & 0 deletions
Large diffs are not rendered by default.

charts/latest/azuredisk-csi-driver/templates/csi-azuredisk-controller.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ spec:
140140
- "--extra-create-metadata=true"
141141
- "--retry-interval-max=30m"
142142
- "--worker-threads=250"
143+
- "--feature-gates=CSIVolumeGroupSnapshot={{ .Values.snapshot.enableVolumeGroupSnapshot }}"
143144
env:
144145
- name: ADDRESS
145146
value: /csi/csi.sock

charts/latest/azuredisk-csi-driver/templates/csi-snapshot-controller.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ spec:
8484
- "--leader-election-namespace={{ .Release.Namespace }}"
8585
- "--worker-threads=250"
8686
- "--retry-interval-max=30m"
87+
- "--feature-gates=CSIVolumeGroupSnapshot={{ .Values.snapshot.enableVolumeGroupSnapshot }}"
8788
resources: {{- toYaml .Values.snapshot.snapshotController.resources | nindent 12 }}
8889
imagePullPolicy: {{ .Values.snapshot.image.csiSnapshotController.pullPolicy }}
8990
securityContext:

charts/latest/azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ rules:
2929
- apiGroups: ["snapshot.storage.k8s.io"]
3030
resources: ["volumesnapshotcontents"]
3131
verbs: ["get", "list"]
32+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
33+
resources: ["volumegroupsnapshots"]
34+
verbs: ["get", "list"]
35+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
36+
resources: ["volumegroupsnapshotcontents"]
37+
verbs: ["get", "list"]
3238
- apiGroups: ["coordination.k8s.io"]
3339
resources: ["leases"]
3440
verbs: ["get", "watch", "list", "delete", "update", "create", "patch"]
@@ -117,6 +123,24 @@ rules:
117123
- apiGroups: ["snapshot.storage.k8s.io"]
118124
resources: ["volumesnapshotcontents/status"]
119125
verbs: ["update", "patch"]
126+
- apiGroups: ["snapshot.storage.k8s.io"]
127+
resources: ["volumesnapshots"]
128+
verbs: ["create", "get", "list", "watch", "update", "patch"]
129+
- apiGroups: ["snapshot.storage.k8s.io"]
130+
resources: ["volumesnapshots/status"]
131+
verbs: ["update", "patch"]
132+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
133+
resources: ["volumegroupsnapshotclasses"]
134+
verbs: ["get", "list", "watch"]
135+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
136+
resources: ["volumegroupsnapshotcontents"]
137+
verbs: ["create", "get", "list", "watch", "update", "delete", "patch"]
138+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
139+
resources: ["volumegroupsnapshotcontents/status"]
140+
verbs: ["update", "patch"]
141+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
142+
resources: ["volumegroupsnapshots"]
143+
verbs: ["create", "get", "list", "watch", "update", "patch"]
120144
- apiGroups: ["coordination.k8s.io"]
121145
resources: ["leases"]
122146
verbs: ["get", "watch", "list", "delete", "update", "create", "patch"]

charts/latest/azuredisk-csi-driver/templates/rbac-csi-snapshot-controller.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,25 @@ rules:
2727
verbs: ["patch"]
2828
- apiGroups: ["snapshot.storage.k8s.io"]
2929
resources: ["volumesnapshots"]
30-
verbs: ["get", "list", "watch", "update", "patch", "create"]
30+
verbs: ["get", "list", "watch", "update", "patch", "create", "delete"]
3131
- apiGroups: ["snapshot.storage.k8s.io"]
3232
resources: ["volumesnapshots/status"]
3333
verbs: ["update", "patch"]
34+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
35+
resources: ["volumegroupsnapshotclasses"]
36+
verbs: ["get", "list", "watch"]
37+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
38+
resources: ["volumegroupsnapshotcontents"]
39+
verbs: ["create", "get", "list", "watch", "update", "delete", "patch"]
40+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
41+
resources: ["volumegroupsnapshotcontents/status"]
42+
verbs: ["patch"]
43+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
44+
resources: ["volumegroupsnapshots"]
45+
verbs: ["get", "list", "watch", "update", "patch"]
46+
- apiGroups: ["groupsnapshot.storage.k8s.io"]
47+
resources: ["volumegroupsnapshots/status"]
48+
verbs: ["update", "patch"]
3449

3550
---
3651
kind: ClusterRoleBinding

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ node:
134134

135135
snapshot:
136136
enabled: false
137+
enableVolumeGroupSnapshot: true
137138
name: csi-snapshot-controller
138139
image:
139140
csiSnapshotter:

0 commit comments

Comments
 (0)