From b7b491c0977336680a6ad6d7587881d7dc4ffccc Mon Sep 17 00:00:00 2001 From: Domonkos Cinke Date: Thu, 5 Jan 2023 11:59:43 +0100 Subject: [PATCH] deploy: add extraArgs for sidecars Add the ability to control more arguments for CSI sidecar components. Signed-off-by: Domonkos Cinke --- charts/ceph-csi-cephfs/README.md | 3 +++ .../templates/provisioner-deployment.yaml | 9 +++++++++ charts/ceph-csi-cephfs/values.yaml | 9 +++++++++ charts/ceph-csi-rbd/README.md | 4 ++++ .../templates/provisioner-deployment.yaml | 12 ++++++++++++ charts/ceph-csi-rbd/values.yaml | 12 ++++++++++++ 6 files changed, 49 insertions(+) diff --git a/charts/ceph-csi-cephfs/README.md b/charts/ceph-csi-cephfs/README.md index cc89ded10ca..cd0696b6c54 100644 --- a/charts/ceph-csi-cephfs/README.md +++ b/charts/ceph-csi-cephfs/README.md @@ -115,14 +115,17 @@ charts and their default values. | `provisioner.provisioner.image.repository` | Specifies the csi-provisioner image repository URL | `registry.k8s.io/sig-storage/csi-provisioner` | | `provisioner.provisioner.image.tag` | Specifies image tag | `v3.3.0` | | `provisioner.provisioner.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.provisioner.image.extraArgs` | Specifies extra arguments for the provisioner sidecar | `[]` | | `provisioner.resizer.image.repository` | Specifies the csi-resizer image repository URL | `registry.k8s.io/sig-storage/csi-resizer` | | `provisioner.resizer.image.tag` | Specifies image tag | `v1.6.0` | | `provisioner.resizer.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.resizer.image.extraArgs` | Specifies extra arguments for the resizer sidecar | `[]` | | `provisioner.resizer.name` | Specifies the name of csi-resizer sidecar | `resizer` | | `provisioner.resizer.enabled` | Specifies whether resizer sidecar is enabled | `true` | | `provisioner.snapshotter.image.repository` | Specifies the csi-snapshotter image repository URL | `registry.k8s.io/sig-storage/csi-snapshotter` | | `provisioner.snapshotter.image.tag` | Specifies image tag | `v6.1.0` | | `provisioner.snapshotter.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.snapshotter.image.extraArgs` | Specifies extra arguments for the snapshotter sidecar | `[]` | | `provisioner.nodeSelector` | Specifies the node selector for provisioner deployment | `{}` | | `provisioner.tolerations` | Specifies the tolerations for provisioner deployment | `{}` | | `provisioner.affinity` | Specifies the affinity for provisioner deployment | `{}` | diff --git a/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml index 10feec7ea49..13c083aba05 100644 --- a/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml @@ -67,6 +67,9 @@ spec: - "--extra-create-metadata=true" - "--feature-gates=HonorPVReclaimPolicy=true" - "--prevent-volume-mode-conversion=true" +{{- range .Values.provisioner.provisioner.extraArgs }} + - "--{{ . }}" +{{- end }} env: - name: ADDRESS value: "unix:///csi/{{ .Values.provisionerSocketFile }}" @@ -84,6 +87,9 @@ spec: - "--timeout={{ .Values.provisioner.timeout }}" - "--leader-election=true" - "--extra-create-metadata=true" +{{- range .Values.provisioner.snapshotter.extraArgs }} + - "--{{ . }}" +{{- end }} env: - name: ADDRESS value: "unix:///csi/{{ .Values.provisionerSocketFile }}" @@ -104,6 +110,9 @@ spec: - "--retry-interval-start=500ms" - "--handle-volume-inuse-error=false" - "--feature-gates=RecoverVolumeExpansionFailure=true" +{{- range .Values.provisioner.resizer.extraArgs }} + - "--{{ . }}" +{{- end }} env: - name: ADDRESS value: "unix:///csi/{{ .Values.provisionerSocketFile }}" diff --git a/charts/ceph-csi-cephfs/values.yaml b/charts/ceph-csi-cephfs/values.yaml index fb350c40e98..dfcb2787cd3 100644 --- a/charts/ceph-csi-cephfs/values.yaml +++ b/charts/ceph-csi-cephfs/values.yaml @@ -177,6 +177,9 @@ provisioner: tag: v3.3.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-provisioner#command-line-options + extraArgs: [] # set metadata on volume setmetadata: true @@ -189,6 +192,9 @@ provisioner: tag: v1.6.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-resizer#recommended-optional-arguments + extraArgs: [] snapshotter: image: @@ -196,6 +202,9 @@ provisioner: tag: v6.1.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-snapshotter#csi-external-snapshotter-sidecar-command-line-options + extraArgs: [] nodeSelector: {} diff --git a/charts/ceph-csi-rbd/README.md b/charts/ceph-csi-rbd/README.md index 5e6c52e9f70..d7bc3de92fe 100644 --- a/charts/ceph-csi-rbd/README.md +++ b/charts/ceph-csi-rbd/README.md @@ -121,19 +121,23 @@ charts and their default values. | `provisioner.provisioner.image.repository` | Specifies the csi-provisioner image repository URL | `registry.k8s.io/sig-storage/csi-provisioner` | | `provisioner.provisioner.image.tag` | Specifies image tag | `v3.3.0` | | `provisioner.provisioner.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.provisioner.image.extraArgs` | Specifies extra arguments for the provisioner sidecar | `[]` | | `provisioner.attacher.image.repository` | Specifies the csi-attacher image repository URL | `registry.k8s.io/sig-storage/csi-attacher` | | `provisioner.attacher.image.tag` | Specifies image tag | `v4.0.0` | | `provisioner.attacher.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.attacher.image.extraArgs` | Specifies extra arguments for the attacher sidecar | `[]` | | `provisioner.attacher.name` | Specifies the name of csi-attacher sidecar | `attacher` | | `provisioner.attacher.enabled` | Specifies whether attacher sidecar is enabled | `true` | | `provisioner.resizer.image.repository` | Specifies the csi-resizer image repository URL | `registry.k8s.io/sig-storage/csi-resizer` | | `provisioner.resizer.image.tag` | Specifies image tag | `v1.6.0` | | `provisioner.resizer.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.resizer.image.extraArgs` | Specifies extra arguments for the resizer sidecar | `[]` | | `provisioner.resizer.name` | Specifies the name of csi-resizer sidecar | `resizer` | | `provisioner.resizer.enabled` | Specifies whether resizer sidecar is enabled | `true` | | `provisioner.snapshotter.image.repository` | Specifies the csi-snapshotter image repository URL | `registry.k8s.io/sig-storage/csi-snapshotter` | | `provisioner.snapshotter.image.tag` | Specifies image tag | `v6.1.0` | | `provisioner.snapshotter.image.pullPolicy` | Specifies pull policy | `IfNotPresent` | +| `provisioner.snapshotter.image.extraArgs` | Specifies extra arguments for the snapshotter sidecar | `[]` | | `provisioner.nodeSelector` | Specifies the node selector for provisioner deployment | `{}` | | `provisioner.tolerations` | Specifies the tolerations for provisioner deployment | `{}` | | `provisioner.affinity` | Specifies the affinity for provisioner deployment | `{}` | diff --git a/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml index a7acd13248f..fc1f28cdf8d 100644 --- a/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml @@ -70,6 +70,9 @@ spec: - "--prevent-volume-mode-conversion=true" {{- if .Values.topology.enabled }} - "--feature-gates=Topology=true" +{{- end }} +{{- range .Values.provisioner.provisioner.extraArgs }} + - "--{{ . }}" {{- end }} env: - name: ADDRESS @@ -91,6 +94,9 @@ spec: - "--retry-interval-start=500ms" - "--handle-volume-inuse-error=false" - "--feature-gates=RecoverVolumeExpansionFailure=true" +{{- range .Values.provisioner.resizer.extraArgs }} + - "--{{ . }}" +{{- end }} env: - name: ADDRESS value: "unix:///csi/{{ .Values.provisionerSocketFile }}" @@ -109,6 +115,9 @@ spec: - "--timeout={{ .Values.provisioner.timeout }}" - "--leader-election=true" - "--extra-create-metadata=true" +{{- range .Values.provisioner.snapshotter.extraArgs }} + - "--{{ . }}" +{{- end }} env: - name: ADDRESS value: "unix:///csi/{{ .Values.provisionerSocketFile }}" @@ -127,6 +136,9 @@ spec: - "--leader-election=true" - "--retry-interval-start=500ms" - "--default-fstype=ext4" +{{- range .Values.provisioner.attacher.extraArgs }} + - "--{{ . }}" +{{- end }} env: - name: ADDRESS value: "unix:///csi/{{ .Values.provisionerSocketFile }}" diff --git a/charts/ceph-csi-rbd/values.yaml b/charts/ceph-csi-rbd/values.yaml index 5d7995f7256..f7f2be2b47c 100644 --- a/charts/ceph-csi-rbd/values.yaml +++ b/charts/ceph-csi-rbd/values.yaml @@ -210,6 +210,9 @@ provisioner: tag: v3.3.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-provisioner#command-line-options + extraArgs: [] # set metadata on volume setmetadata: true @@ -222,6 +225,9 @@ provisioner: tag: v4.0.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-attacher#command-line-options + extraArgs: [] resizer: name: resizer @@ -231,6 +237,9 @@ provisioner: tag: v1.6.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-resizer#recommended-optional-arguments + extraArgs: [] snapshotter: image: @@ -238,6 +247,9 @@ provisioner: tag: v6.1.0 pullPolicy: IfNotPresent resources: {} + ## For further options, check + ## https://github.com/kubernetes-csi/external-snapshotter#csi-external-snapshotter-sidecar-command-line-options + extraArgs: [] nodeSelector: {}