diff --git a/charts/latest/azurefile-csi-driver-v1.29.5.tgz b/charts/latest/azurefile-csi-driver-v1.29.5.tgz index 76ac3264d7..5ac944eb38 100644 Binary files a/charts/latest/azurefile-csi-driver-v1.29.5.tgz and b/charts/latest/azurefile-csi-driver-v1.29.5.tgz differ diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml index 35f3a13bf1..a69383bf11 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml @@ -104,6 +104,10 @@ spec: - name: socket-dir mountPath: /csi resources: {{- toYaml .Values.controller.resources.csiSnapshotter | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: csi-resizer {{- if hasPrefix "/" .Values.image.csiResizer.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}" @@ -126,6 +130,10 @@ spec: - name: socket-dir mountPath: /csi resources: {{- toYaml .Values.controller.resources.csiResizer | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: liveness-probe {{- if hasPrefix "/" .Values.image.livenessProbe.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" @@ -146,6 +154,10 @@ spec: - name: socket-dir mountPath: /csi resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: azurefile {{- if hasPrefix "/" .Values.image.azurefile.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.azurefile.repository }}:{{ .Values.image.azurefile.tag }}" @@ -219,6 +231,10 @@ spec: readOnly: true {{- end }} resources: {{- toYaml .Values.controller.resources.azurefile | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL volumes: - name: socket-dir emptyDir: {} diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows-hostprocess.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows-hostprocess.yaml index 644eef5cec..4d9bb739da 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows-hostprocess.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows-hostprocess.yaml @@ -76,6 +76,10 @@ spec: - "powershell.exe" - "-c" - "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\{{ .Values.driver.name }}\\ -Force" + securityContext: + capabilities: + drop: + - ALL containers: - name: node-driver-registrar {{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }} @@ -103,6 +107,10 @@ spec: fieldPath: spec.nodeName imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }} resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: azurefile {{- if hasPrefix "/" .Values.image.azurefile.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.azurefile.repository }}:{{ .Values.image.azurefile.tag }}-windows-hp" @@ -149,4 +157,8 @@ spec: fieldPath: spec.nodeName imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.windows.resources.azurefile | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL {{- end -}} diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml index f171603d73..8e0a5c5499 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml @@ -80,6 +80,10 @@ spec: value: unix://C:\\csi\\csi.sock imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }} resources: {{- toYaml .Values.windows.resources.livenessProbe | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: node-driver-registrar {{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}" @@ -118,6 +122,10 @@ spec: - name: registration-dir mountPath: C:\registration resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: azurefile {{- if hasPrefix "/" .Values.image.azurefile.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.azurefile.repository }}:{{ .Values.image.azurefile.tag }}" @@ -193,6 +201,10 @@ spec: - name: csi-proxy-smb-pipe-v1beta1 mountPath: \\.\pipe\csi-proxy-smb-v1beta1 resources: {{- toYaml .Values.windows.resources.azurefile | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL volumes: - name: csi-proxy-fs-pipe-v1 hostPath: diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml index 3dfbbd56c4..cc293e7c9c 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml @@ -82,6 +82,10 @@ spec: - --v=2 imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }} resources: {{- toYaml .Values.linux.resources.livenessProbe | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: node-driver-registrar {{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}" @@ -114,6 +118,10 @@ spec: - name: registration-dir mountPath: /registration resources: {{- toYaml .Values.linux.resources.nodeDriverRegistrar | nindent 12 }} + securityContext: + capabilities: + drop: + - ALL - name: azurefile {{- if hasPrefix "/" .Values.image.azurefile.repository }} image: "{{ .Values.image.baseRepo }}{{ .Values.image.azurefile.repository }}:{{ .Values.image.azurefile.tag }}" @@ -172,6 +180,9 @@ spec: imagePullPolicy: {{ .Values.image.azurefile.pullPolicy }} securityContext: privileged: true + capabilities: + drop: + - ALL volumeMounts: - mountPath: /csi name: socket-dir diff --git a/charts/latest/azurefile-csi-driver/templates/csi-snapshot-controller.yaml b/charts/latest/azurefile-csi-driver/templates/csi-snapshot-controller.yaml index d84398364d..d9e8e6f248 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-snapshot-controller.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-snapshot-controller.yaml @@ -71,4 +71,8 @@ spec: - "--leader-election-namespace={{ .Release.Namespace }}" resources: {{- toYaml .Values.snapshot.snapshotController.resources | nindent 12 }} imagePullPolicy: {{ .Values.snapshot.image.csiSnapshotController.pullPolicy }} + securityContext: + capabilities: + drop: + - ALL {{- end -}} diff --git a/deploy/csi-azurefile-controller.yaml b/deploy/csi-azurefile-controller.yaml index ddb17f9179..0ec35504b3 100644 --- a/deploy/csi-azurefile-controller.yaml +++ b/deploy/csi-azurefile-controller.yaml @@ -54,6 +54,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL - name: csi-snapshotter image: mcr.microsoft.com/oss/kubernetes-csi/csi-snapshotter:v6.3.1 args: @@ -73,6 +77,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL - name: csi-resizer image: mcr.microsoft.com/oss/kubernetes-csi/csi-resizer:v1.8.0 args: @@ -95,6 +103,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL - name: liveness-probe image: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe:v2.10.0 args: @@ -111,6 +123,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL - name: azurefile image: mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.29.5 imagePullPolicy: IfNotPresent @@ -152,6 +168,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL volumes: - name: socket-dir emptyDir: {} diff --git a/deploy/csi-azurefile-node-windows-hostprocess.yaml b/deploy/csi-azurefile-node-windows-hostprocess.yaml index 94472f70b4..9716e4b625 100644 --- a/deploy/csi-azurefile-node-windows-hostprocess.yaml +++ b/deploy/csi-azurefile-node-windows-hostprocess.yaml @@ -49,6 +49,10 @@ spec: - "powershell.exe" - "-c" - "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\file.csi.azure.com\\ -Force" + securityContext: + capabilities: + drop: + - ALL containers: - name: node-driver-registrar image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.8.0 @@ -77,6 +81,10 @@ spec: requests: cpu: 30m memory: 40Mi + securityContext: + capabilities: + drop: + - ALL - name: azurefile image: mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.29.5-windows-hp imagePullPolicy: IfNotPresent @@ -108,3 +116,7 @@ spec: requests: cpu: 10m memory: 40Mi + securityContext: + capabilities: + drop: + - ALL diff --git a/deploy/csi-azurefile-node-windows.yaml b/deploy/csi-azurefile-node-windows.yaml index acdd973be3..ead981e7a1 100644 --- a/deploy/csi-azurefile-node-windows.yaml +++ b/deploy/csi-azurefile-node-windows.yaml @@ -57,6 +57,10 @@ spec: requests: cpu: 10m memory: 40Mi + securityContext: + capabilities: + drop: + - ALL - name: node-driver-registrar image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.8.0 args: @@ -93,6 +97,10 @@ spec: requests: cpu: 30m memory: 40Mi + securityContext: + capabilities: + drop: + - ALL - name: azurefile image: mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.29.5 imagePullPolicy: IfNotPresent @@ -150,6 +158,10 @@ spec: requests: cpu: 10m memory: 40Mi + securityContext: + capabilities: + drop: + - ALL volumes: - name: csi-proxy-fs-pipe-v1 hostPath: diff --git a/deploy/csi-azurefile-node.yaml b/deploy/csi-azurefile-node.yaml index 294ec3c79b..1e58c8d7e6 100644 --- a/deploy/csi-azurefile-node.yaml +++ b/deploy/csi-azurefile-node.yaml @@ -54,6 +54,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL - name: node-driver-registrar image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.8.0 args: @@ -84,6 +88,10 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL - name: azurefile image: mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.29.5 imagePullPolicy: IfNotPresent @@ -117,6 +125,9 @@ spec: fieldPath: spec.nodeName securityContext: privileged: true + capabilities: + drop: + - ALL volumeMounts: - mountPath: /csi name: socket-dir diff --git a/deploy/csi-snapshot-controller.yaml b/deploy/csi-snapshot-controller.yaml index 39d916a5a7..023a25a127 100644 --- a/deploy/csi-snapshot-controller.yaml +++ b/deploy/csi-snapshot-controller.yaml @@ -53,3 +53,7 @@ spec: requests: cpu: 10m memory: 20Mi + securityContext: + capabilities: + drop: + - ALL