Skip to content

Commit 4d569a6

Browse files
authored
Merge pull request #1 from mattcary/fork-master
Fork master
2 parents 48ba715 + ac1f8c0 commit 4d569a6

20 files changed

+140
-147
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ that represents availability by zone.
7070
| Snapshots | Alpha | 1.13 | Any | v0.3.0 | Alpha |
7171
| Resize (Expand) | Alpha | 1.14 | 1.14 | v0.6.0 | Alpha |
7272
| Resize (Expand) | Beta | 1.16 | 1.16 | v0.7.0 | Stable |
73-
73+
| Snapshots | Beta | 1.17 | Any | master | Stable |
7474

7575
### Future Features
7676

deploy/kubernetes/base/controller.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ spec:
4848
volumeMounts:
4949
- name: socket-dir
5050
mountPath: /csi
51+
- name: csi-snapshotter
52+
image: gke.gcr.io/csi-snapshotter
53+
args:
54+
- "--v=5"
55+
- "--csi-address=/csi/csi.sock"
56+
volumeMounts:
57+
- name: socket-dir
58+
mountPath: /csi
5159
- name: gce-pd-driver
5260
# Don't change base image without changing pdImagePlaceholder in
5361
# test/k8s-integration/main.go

deploy/kubernetes/base/setup-cluster.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ rules:
3636
- apiGroups: [""]
3737
resources: ["nodes"]
3838
verbs: ["get", "list", "watch"]
39-
39+
- apiGroups: ["snapshot.storage.k8s.io"]
40+
resources: ["volumesnapshots"]
41+
verbs: ["get", "list"]
42+
- apiGroups: ["snapshot.storage.k8s.io"]
43+
resources: ["volumesnapshotcontents"]
44+
verbs: ["get", "list"]
4045
---
4146

4247
kind: ClusterRoleBinding
@@ -193,3 +198,36 @@ roleRef:
193198
subjects:
194199
- kind: ServiceAccount
195200
name: csi-gce-pd-node-sa
201+
202+
---
203+
apiVersion: rbac.authorization.k8s.io/v1
204+
kind: ClusterRole
205+
metadata:
206+
name: csi-gce-pd-snapshotter-role
207+
rules:
208+
- apiGroups: [""]
209+
resources: ["events"]
210+
verbs: ["list", "watch", "create", "update", "patch"]
211+
# Secrets resource omitted since GCE PD snapshots does not require them
212+
- apiGroups: ["snapshot.storage.k8s.io"]
213+
resources: ["volumesnapshotclasses"]
214+
verbs: ["get", "list", "watch"]
215+
- apiGroups: ["snapshot.storage.k8s.io"]
216+
resources: ["volumesnapshotcontents"]
217+
verbs: ["create", "get", "list", "watch", "update", "delete"]
218+
- apiGroups: ["snapshot.storage.k8s.io"]
219+
resources: ["volumesnapshotcontents/status"]
220+
verbs: ["update"]
221+
---
222+
223+
kind: ClusterRoleBinding
224+
apiVersion: rbac.authorization.k8s.io/v1
225+
metadata:
226+
name: csi-gce-pd-controller-snapshotter-binding
227+
subjects:
228+
- kind: ServiceAccount
229+
name: csi-gce-pd-controller-sa
230+
roleRef:
231+
kind: ClusterRole
232+
name: csi-gce-pd-snapshotter-role
233+
apiGroup: rbac.authorization.k8s.io

deploy/kubernetes/overlays/alpha/controller_add_snapshotter.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

deploy/kubernetes/overlays/alpha/kustomization.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
bases:
44
- ../stable
5-
patches:
6-
- controller_add_snapshotter.yaml
7-
patchesJson6902:
8-
- target:
9-
group: rbac.authorization.k8s.io
10-
version: v1
11-
kind: ClusterRole
12-
name: csi-gce-pd-provisioner-role
13-
path: rbac_add_snapshots_to_provisioner.yaml
14-
resources:
15-
- rbac_add_snapshotter.yaml
16-
# Reapplying namespace transformer to include newly added RBAC rules.
17-
namespace:
18-
gce-pd-csi-driver
5+

deploy/kubernetes/overlays/alpha/rbac_add_snapshots_to_provisioner.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

deploy/kubernetes/overlays/alpha/rbac_add_snapshotter.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

deploy/kubernetes/overlays/prow-gke-release-staging-head/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ images:
1818
- name: gke.gcr.io/csi-resizer
1919
newName: quay.io/k8scsi/csi-resizer
2020
newTag: "canary"
21+
- name: gke.gcr.io/csi-snapshotter
22+
newName: quay.io/k8scsi/csi-snapshotter
23+
newTag: "canary"

deploy/kubernetes/overlays/prow-gke-release-staging-rc/enable_sidecar_metrics.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@
1212
- op: add
1313
path: /spec/template/spec/containers/2/args/-
1414
value: "--metrics-address=:22013"
15+
16+
# for external-snapshotter
17+
- op: add
18+
path: /spec/template/spec/containers/3/args/-
19+
value: "--metrics-address=:22014"

deploy/kubernetes/overlays/prow-gke-release-staging-rc/kustomization.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ images:
1818
- name: gke.gcr.io/csi-resizer
1919
newName: gcr.io/gke-release-staging/csi-resizer
2020
newTag: "v0.5.0-gke.0"
21-
21+
- name: gke.gcr.io/csi-snapshotter
22+
newName: gcr.io/gke-release-staging/csi-snapshotter
23+
newTag: "v2.1.1-gke.0"
2224
patchesJson6902:
2325
- target:
2426
group: apps

0 commit comments

Comments
 (0)