Skip to content

Commit 7e4108e

Browse files
committed
add 2.1-canary csi snapshotter side car to PD CSI driver
in release-staging-head
1 parent 48ba715 commit 7e4108e

File tree

4 files changed

+79
-0
lines changed

4 files changed

+79
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
kind: StatefulSet
2+
apiVersion: apps/v1
3+
metadata:
4+
name: csi-gce-pd-controller
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: csi-snapshotter
10+
imagePullPolicy: Always
11+
image: quay.io/k8scsi/csi-snapshotter:2.1-canary
12+
args:
13+
- "--v=5"
14+
- "--csi-address=/csi/csi.sock"
15+
volumeMounts:
16+
- name: socket-dir
17+
mountPath: /csi

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

+14
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,17 @@ images:
1818
- name: gke.gcr.io/csi-resizer
1919
newName: quay.io/k8scsi/csi-resizer
2020
newTag: "canary"
21+
patches:
22+
- controller_add_snapshotter.yaml
23+
patchesJson6902:
24+
- target:
25+
group: rbac.authorization.k8s.io
26+
version: v1
27+
kind: ClusterRole
28+
name: csi-gce-pd-provisioner-role
29+
path: rbac_add_snapshots_to_provisioner.yaml
30+
resources:
31+
- rbac_add_snapshotter.yaml
32+
# Reapplying namespace transformer to include newly added RBAC rules.
33+
namespace:
34+
gce-pd-csi-driver
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# arrays without strategic patch merge defined need to be appended
2+
# using jsonpatch
3+
# https://github.com/kubernetes-sigs/kustomize/blob/master/examples/jsonpatch.md
4+
- op: add
5+
path: /rules/-
6+
value:
7+
apiGroups: ["snapshot.storage.k8s.io"]
8+
resources: ["volumesnapshots"]
9+
verbs: ["get", "list"]
10+
11+
- op: add
12+
path: /rules/-
13+
value:
14+
apiGroups: ["snapshot.storage.k8s.io"]
15+
resources: ["volumesnapshotcontents"]
16+
verbs: ["get", "list"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# xref: https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/rbac.yaml
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: csi-gce-pd-snapshotter-role
6+
rules:
7+
- apiGroups: [""]
8+
resources: ["events"]
9+
verbs: ["list", "watch", "create", "update", "patch"]
10+
# Secrets resource omitted since GCE PD snapshots does not require them
11+
- apiGroups: ["snapshot.storage.k8s.io"]
12+
resources: ["volumesnapshotclasses"]
13+
verbs: ["get", "list", "watch"]
14+
- apiGroups: ["snapshot.storage.k8s.io"]
15+
resources: ["volumesnapshotcontents"]
16+
verbs: ["create", "get", "list", "watch", "update", "delete"]
17+
- apiGroups: ["snapshot.storage.k8s.io"]
18+
resources: ["volumesnapshotcontents/status"]
19+
verbs: ["update"]
20+
---
21+
22+
kind: ClusterRoleBinding
23+
apiVersion: rbac.authorization.k8s.io/v1
24+
metadata:
25+
name: csi-gce-pd-controller-snapshotter-binding
26+
subjects:
27+
- kind: ServiceAccount
28+
name: csi-gce-pd-controller-sa
29+
roleRef:
30+
kind: ClusterRole
31+
name: csi-gce-pd-snapshotter-role
32+
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)