From 05f4465b65de62a6035bf0af5d38d6eb4170bdaa Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Thu, 20 Jun 2024 14:29:19 +0300 Subject: [PATCH] fix Signed-off-by: v.oleynikov --- templates/csi/controller.yaml | 82 +++++++++++++++++++++++++++++++++++ templates/csi/service.yaml | 14 ++++++ 2 files changed, 96 insertions(+) create mode 100644 templates/csi/service.yaml diff --git a/templates/csi/controller.yaml b/templates/csi/controller.yaml index 1ba94b3..f7f7562 100644 --- a/templates/csi/controller.yaml +++ b/templates/csi/controller.yaml @@ -52,6 +52,88 @@ {{- $csiControllerImage := include "helm_lib_module_image" (list . "csiHuawei") }} +{{- define "csi_additional_containers" }} +- args: + - --logging-module=file + - --log-level=info + - --log-file-dir=/var/log/huawei + - --log-file-size=20M + - --max-backups=9 + - --web-hook-port=4433 + - --web-hook-address=$(POD_IP) + - --enable-leader-election=false + - --leader-lease-duration=8s + - --leader-renew-deadline=6s + - --leader-retry-period=2s + env: + - name: CSI_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + image: {{ $csiControllerImage }} + imagePullPolicy: IfNotPresent + name: storage-backend-controller + ports: + - containerPort: 4433 + hostPort: 4433 + protocol: TCP + resources: + limits: + cpu: 300m + memory: 512Mi + requests: + cpu: 50m + memory: 128Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /var/log + name: log + - mountPath: /etc/localtime + name: host-time +- args: + - --logging-module=file + - --log-level=info + - --log-file-dir=/var/log/huawei + - --log-file-size=20M + - --max-backups=9 + - --backend-update-interval=60 + - --dr-endpoint=$(DRCSI_ENDPOINT) + env: + - name: DRCSI_ENDPOINT + value: /csi/dr-csi.sock + - name: CSI_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ $csiControllerImage }} + imagePullPolicy: IfNotPresent + name: storage-backend-sidecar + resources: + limits: + cpu: 300m + memory: 512Mi + requests: + cpu: 50m + memory: 128Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /csi + name: socket-dir + - mountPath: /var/log + name: log + - mountPath: /etc/localtime + name: host-time +{{- end }} + {{- $csiControllerConfig := dict }} {{- $_ := set $csiControllerConfig "controllerImage" $csiControllerImage }} {{- $_ := set $csiControllerConfig "snapshotterEnabled" true }} diff --git a/templates/csi/service.yaml b/templates/csi/service.yaml new file mode 100644 index 0000000..20b40d6 --- /dev/null +++ b/templates/csi/service.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: storage-backend-controller +spec: + ports: + - name: storage-backend-controller + port: 4433 + protocol: TCP + targetPort: 4433 + selector: + app: csi-controller + type: ClusterIP