From a54f8980456e6c3be694cf2c90f2d7a03283916c Mon Sep 17 00:00:00 2001 From: Sergey Berezansky Date: Sun, 28 Jul 2024 14:47:22 +0300 Subject: [PATCH] fix(CSI-227): for OCP and hostNetwork only add privileged --- .../templates/controllerserver-statefulset.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/csi-wekafsplugin/templates/controllerserver-statefulset.yaml b/charts/csi-wekafsplugin/templates/controllerserver-statefulset.yaml index 40ddc7eee..b15ee8ab5 100755 --- a/charts/csi-wekafsplugin/templates/controllerserver-statefulset.yaml +++ b/charts/csi-wekafsplugin/templates/controllerserver-statefulset.yaml @@ -52,6 +52,10 @@ spec: - name: socket-dir mountPath: /csi - name: csi-provisioner + {{- if and .Values.hostNetwork (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") }} + securityContext: + privileged: true + {{- end }} image: {{ required "csi provisioner sidecar container image." .Values.images.provisionersidecar }} args: - "--v={{ .Values.logLevel | default 5 }}" @@ -85,6 +89,10 @@ spec: name: pr-metrics protocol: TCP - name: csi-resizer + {{- if and .Values.hostNetwork (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") }} + securityContext: + privileged: true + {{- end }} image: {{ required "csi attacher sidercar image." .Values.images.resizersidecar }} args: - "--v={{ .Values.logLevel | default 5 }}" @@ -116,6 +124,10 @@ spec: name: rs-metrics protocol: TCP - name: csi-snapshotter + {{- if and .Values.hostNetwork (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") }} + securityContext: + privileged: true + {{- end }} image: {{ required "csi snapshotter sidecar image." .Values.images.snapshottersidecar }} args: - "--v=5"