From e3ea72100421c8a806827107bdf5fb86b8f9765c Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Fri, 2 Feb 2024 08:25:39 -0600 Subject: [PATCH] Update helm charts to handle rockcraft and a different storage.path (#2) * Update helm charts to handle rockcraft and an alternate controller.storage.path * disable storageCapacity for now * Address review comments * Address review comments again --- deploy/charts/rawfile-csi/templates/00-driver.yaml | 2 +- .../rawfile-csi/templates/01-controller-plugin.yaml | 9 +++++++-- deploy/charts/rawfile-csi/templates/01-node-plugin.yaml | 2 +- deploy/charts/rawfile-csi/values.yaml | 5 +++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/deploy/charts/rawfile-csi/templates/00-driver.yaml b/deploy/charts/rawfile-csi/templates/00-driver.yaml index 0e1d18c..08f43d6 100644 --- a/deploy/charts/rawfile-csi/templates/00-driver.yaml +++ b/deploy/charts/rawfile-csi/templates/00-driver.yaml @@ -6,6 +6,6 @@ spec: attachRequired: false podInfoOnMount: true fsGroupPolicy: File - storageCapacity: true + storageCapacity: false # TODO: reenable once switch from using v1beta1 apis volumeLifecycleModes: - Persistent diff --git a/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml b/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml index bed2a0c..cf1e9f9 100644 --- a/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml +++ b/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml @@ -34,6 +34,10 @@ spec: operator: Equal value: "true" effect: NoSchedule + - key: "node-role.kubernetes.io/control-plane" + operator: Equal + value: "true" + effect: NoSchedule volumes: - name: socket-dir emptyDir: {} @@ -41,9 +45,10 @@ spec: - name: csi-driver image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" imagePullPolicy: {{ .Values.controller.image.pullPolicy }} + {{- if .Values.controller.csiDriverArgs }} args: - - csi-driver - - --disable-metrics + {{- .Values.controller.csiDriverArgs | toYaml | nindent 10 }} + {{- end }} env: - name: PROVISIONER_NAME value: "{{ .Values.provisionerName }}" diff --git a/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml b/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml index 06e1d91..929001a 100644 --- a/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml +++ b/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml @@ -51,7 +51,7 @@ spec: type: DirectoryOrCreate - name: data-dir hostPath: - path: /var/csi/rawfile + path: {{ .Values.node.storage.path | quote }} type: DirectoryOrCreate containers: - name: csi-driver diff --git a/deploy/charts/rawfile-csi/values.yaml b/deploy/charts/rawfile-csi/values.yaml index 69fe959..cb758ef 100644 --- a/deploy/charts/rawfile-csi/values.yaml +++ b/deploy/charts/rawfile-csi/values.yaml @@ -15,9 +15,14 @@ defaults: &defaults controller: <<: *defaults + csiDriverArgs: + - csi-driver + - --disable-metrics node: <<: *defaults + storage: + path: /var/csi/rawfile metrics: enabled: false