From 1c52383617919c0de47e24ccfea6b69035de3893 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 25 Oct 2024 18:38:46 +0200 Subject: [PATCH] feat: add support for passing additional CSI container args (#96) --- charts/rancher-vsphere-csi/Chart.yaml | 4 ++-- .../templates/controller/deployment.yaml | 21 +++++++++++++++++++ .../templates/node/daemonset.yaml | 9 ++++++++ charts/rancher-vsphere-csi/values.yaml | 10 +++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/charts/rancher-vsphere-csi/Chart.yaml b/charts/rancher-vsphere-csi/Chart.yaml index 8df0fe3..24b0723 100644 --- a/charts/rancher-vsphere-csi/Chart.yaml +++ b/charts/rancher-vsphere-csi/Chart.yaml @@ -8,7 +8,7 @@ annotations: catalog.cattle.io/rancher-version: '>= 2.9.0-0' catalog.cattle.io/release-name: vsphere-csi apiVersion: v1 -appVersion: 3.3.1-rancher6 +appVersion: 3.3.1-rancher7 description: vSphere Cloud Storage Interface (CSI) icon: https://charts.rancher.io/assets/logos/vsphere-csi.svg keywords: @@ -21,4 +21,4 @@ maintainers: name: rancher-vsphere-csi sources: - https://github.com/kubernetes-sigs/vsphere-csi-driver -version: 3.3.1-rancher6 +version: 3.3.1-rancher7 diff --git a/charts/rancher-vsphere-csi/templates/controller/deployment.yaml b/charts/rancher-vsphere-csi/templates/controller/deployment.yaml index 0b098a3..6ffd0ab 100644 --- a/charts/rancher-vsphere-csi/templates/controller/deployment.yaml +++ b/charts/rancher-vsphere-csi/templates/controller/deployment.yaml @@ -93,6 +93,9 @@ spec: - "--leader-election" - "--kube-api-qps=100" - "--kube-api-burst=100" + {{- range .Values.csiController.image.csiAttacher.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: ADDRESS value: /csi/csi.sock @@ -115,6 +118,9 @@ spec: - "--kube-api-qps=100" - "--kube-api-burst=100" - "--leader-election" + {{- range .Values.csiController.image.csiResizer.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: ADDRESS value: /csi/csi.sock @@ -140,6 +146,9 @@ spec: - "--leader-election-lease-duration=120s" - "--leader-election-renew-deadline=60s" - "--leader-election-retry-period=30s" + {{- range .Values.csiController.image.csiSnapshotter.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: ADDRESS value: /csi/csi.sock @@ -160,6 +169,9 @@ spec: {{- if semverCompare "< 1.24" $.Capabilities.KubeVersion.Version }} - "--use-gocsi=false" {{- end }} + {{- range .Values.csiController.image.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: CSI_ENDPOINT value: unix:///csi/csi.sock @@ -212,6 +224,9 @@ spec: args: - "--v=4" - "--csi-address=/csi/csi.sock" + {{- range .Values.csiController.image.livenessProbe.additionalArgs }} + - {{ . | quote }} + {{- end }} {{- with .Values.csiController.image.livenessProbe.resources }} resources: {{- toYaml . | nindent 12 }} @@ -226,6 +241,9 @@ spec: - "--leader-election" - "--fss-name=internal-feature-states.csi.vsphere.vmware.com" - "--fss-namespace=$(CSI_NAMESPACE)" + {{- range .Values.csiController.image.vsphereSyncer.additionalArgs }} + - {{ . | quote }} + {{- end }} ports: - containerPort: 2113 name: prometheus @@ -269,6 +287,9 @@ spec: - "--feature-gates=Topology=true" - "--strict-topology" {{- end }} + {{- range .Values.csiController.image.csiProvisioner.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: ADDRESS value: /csi/csi.sock diff --git a/charts/rancher-vsphere-csi/templates/node/daemonset.yaml b/charts/rancher-vsphere-csi/templates/node/daemonset.yaml index 391563d..fc96e51 100644 --- a/charts/rancher-vsphere-csi/templates/node/daemonset.yaml +++ b/charts/rancher-vsphere-csi/templates/node/daemonset.yaml @@ -73,6 +73,9 @@ spec: - "--v=5" - "--csi-address=$(ADDRESS)" - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" + {{- range .Values.csiNode.image.nodeDriverRegistrar.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: ADDRESS value: /csi/csi.sock @@ -103,6 +106,9 @@ spec: {{- if semverCompare "< 1.24" $.Capabilities.KubeVersion.Version }} - "--use-gocsi=false" {{- end }} + {{- range .Values.csiNode.image.additionalArgs }} + - {{ . | quote }} + {{- end }} env: - name: NODE_NAME valueFrom: @@ -167,6 +173,9 @@ spec: args: - "--v=4" - "--csi-address=/csi/csi.sock" + {{- range .Values.csiNode.image.livenessProbe.additionalArgs }} + - {{ . | quote }} + {{- end }} {{- with .Values.csiNode.image.livenessProbe.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/charts/rancher-vsphere-csi/values.yaml b/charts/rancher-vsphere-csi/values.yaml index b530d17..0f0c3ec 100644 --- a/charts/rancher-vsphere-csi/values.yaml +++ b/charts/rancher-vsphere-csi/values.yaml @@ -27,6 +27,7 @@ csiController: repository: rancher/mirrored-cloud-provider-vsphere-csi-release-driver tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -39,6 +40,7 @@ csiController: repository: rancher/mirrored-sig-storage-csi-attacher tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -51,6 +53,7 @@ csiController: repository: rancher/mirrored-sig-storage-csi-resizer tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -63,6 +66,7 @@ csiController: repository: rancher/mirrored-sig-storage-livenessprobe tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -75,6 +79,7 @@ csiController: repository: rancher/mirrored-cloud-provider-vsphere-csi-release-syncer tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -87,6 +92,7 @@ csiController: repository: rancher/mirrored-sig-storage-csi-provisioner tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -99,6 +105,7 @@ csiController: repository: rancher/mirrored-sig-storage-csi-snapshotter tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -178,6 +185,7 @@ csiNode: repository: rancher/mirrored-cloud-provider-vsphere-csi-release-driver tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -190,6 +198,7 @@ csiNode: repository: rancher/mirrored-sig-storage-csi-node-driver-registrar tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: @@ -202,6 +211,7 @@ csiNode: repository: rancher/mirrored-sig-storage-livenessprobe tag: latest imagePullPolicy: "" + additionalArgs: [] resources: {} #resources: # limits: