csi: add NFS expansion support

This commit adds resizer sidecar to
NFS driver and required storageclass
and rbac changes.

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 9c4592720c)
This commit is contained in:
Rakshith R authored and Mergify committed 2022-09-09 15:44:06 +00:00
1 parent 5e4d0490de
commit 6fb66afa88
4 files changed
+28 -3

No files matched your search

@@ -395,7 +395,7 @@ metadata:
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
verbs: ["get", "list", "watch", "create", "delete", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "patch"]
@@ -429,6 +429,9 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["patch"]
---
# TODO: remove this, once https://github.com/rook/rook/issues/10141
# is resolved.
+4 -1
View File
@@ -24,7 +24,7 @@ metadata:
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
verbs: ["get", "list", "watch", "create", "delete", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "patch"]
@@ -58,6 +58,9 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["patch"]
---
# TODO: remove this, once https://github.com/rook/rook/issues/10141
# is resolved.
+1 -1
View File
@@ -42,7 +42,7 @@ parameters:
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph # namespace:cluster
reclaimPolicy: Delete
allowVolumeExpansion: false
allowVolumeExpansion: true
mountOptions:
# uncomment the following line for debugging
#- debug
@@ -42,6 +42,25 @@ spec:
- name: socket-dir
mountPath: /csi
{{ end }}
- name: csi-resizer
image: {{ .ResizerImage }}
args:
- "--csi-address=$(ADDRESS)"
- "--v={{ .SidecarLogLevel }}"
- "--timeout={{ .GRPCTimeout }}"
- "--leader-election=true"
- "--leader-election-namespace={{ .Namespace }}"
- "--leader-election-lease-duration=137s"
- "--leader-election-renew-deadline=107s"
- "--leader-election-retry-period=26s"
- "--handle-volume-inuse-error=false"
env:
- name: ADDRESS
value: unix:///csi/csi-provisioner.sock
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: csi-provisioner
image: {{ .ProvisionerImage }}
args: