From 5dbebd01bd8e17804e436646147dc33e757d6eed Mon Sep 17 00:00:00 2001 From: Niklas Rosenstein Date: Thu, 18 May 2023 09:40:51 +0000 Subject: [PATCH 1/2] add a `kubeletPath` option to `values.yaml` --- deploy/helm/templates/attacher.yaml | 6 +++--- deploy/helm/templates/csi-s3.yaml | 10 +++++----- deploy/helm/templates/provisioner.yaml | 8 ++++---- deploy/helm/values.yaml | 2 ++ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/deploy/helm/templates/attacher.yaml b/deploy/helm/templates/attacher.yaml index bc855c1..bf0580f 100644 --- a/deploy/helm/templates/attacher.yaml +++ b/deploy/helm/templates/attacher.yaml @@ -89,13 +89,13 @@ spec: - "--csi-address=$(ADDRESS)" env: - name: ADDRESS - value: /var/lib/kubelet/plugins/ru.yandex.s3.csi/csi.sock + value: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi/csi.sock imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir - mountPath: /var/lib/kubelet/plugins/ru.yandex.s3.csi + mountPath: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi volumes: - name: socket-dir hostPath: - path: /var/lib/kubelet/plugins/ru.yandex.s3.csi + path: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi type: DirectoryOrCreate diff --git a/deploy/helm/templates/csi-s3.yaml b/deploy/helm/templates/csi-s3.yaml index 2f63c3d..ed46080 100644 --- a/deploy/helm/templates/csi-s3.yaml +++ b/deploy/helm/templates/csi-s3.yaml @@ -62,7 +62,7 @@ spec: - name: ADDRESS value: /csi/csi.sock - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/ru.yandex.s3.csi/csi.sock + value: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi/csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: @@ -95,22 +95,22 @@ spec: - name: plugin-dir mountPath: /csi - name: pods-mount-dir - mountPath: /var/lib/kubelet/pods + mountPath: {{ .Values.kubeletPath }}/pods mountPropagation: "Bidirectional" - name: fuse-device mountPath: /dev/fuse volumes: - name: registration-dir hostPath: - path: /var/lib/kubelet/plugins_registry/ + path: {{ .Values.kubeletPath }}/plugins_registry/ type: DirectoryOrCreate - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/ru.yandex.s3.csi + path: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi type: DirectoryOrCreate - name: pods-mount-dir hostPath: - path: /var/lib/kubelet/pods + path: {{ .Values.kubeletPath }}/pods type: Directory - name: fuse-device hostPath: diff --git a/deploy/helm/templates/provisioner.yaml b/deploy/helm/templates/provisioner.yaml index 212197f..82645a0 100644 --- a/deploy/helm/templates/provisioner.yaml +++ b/deploy/helm/templates/provisioner.yaml @@ -85,11 +85,11 @@ spec: - "--v=4" env: - name: ADDRESS - value: /var/lib/kubelet/plugins/ru.yandex.s3.csi/csi.sock + value: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi/csi.sock imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir - mountPath: /var/lib/kubelet/plugins/ru.yandex.s3.csi + mountPath: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi - name: csi-s3 image: {{ .Values.images.csi }} imagePullPolicy: IfNotPresent @@ -99,14 +99,14 @@ spec: - "--v=4" env: - name: CSI_ENDPOINT - value: unix:///var/lib/kubelet/plugins/ru.yandex.s3.csi/csi.sock + value: unix://{{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi/csi.sock - name: NODE_ID valueFrom: fieldRef: fieldPath: spec.nodeName volumeMounts: - name: socket-dir - mountPath: /var/lib/kubelet/plugins/ru.yandex.s3.csi + mountPath: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi volumes: - name: socket-dir emptyDir: {} diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index f1776b0..eafafde 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -42,3 +42,5 @@ tolerations: all: false node: [] controller: [] + +kubeletPath: {{ .Values.kubeletPath }} From 0fb81f07e77475a12ffc60fa5fbbf4226d931113 Mon Sep 17 00:00:00 2001 From: Niklas Rosenstein Date: Wed, 14 Jun 2023 11:09:55 +0200 Subject: [PATCH 2/2] Update deploy/helm/values.yaml Co-authored-by: Kashemir001 <14910998+Kashemir001@users.noreply.github.com> --- deploy/helm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index eafafde..9ef0b95 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -43,4 +43,4 @@ tolerations: node: [] controller: [] -kubeletPath: {{ .Values.kubeletPath }} +kubeletPath: /var/lib/kubelet