Skip to content

Commit

Permalink
Merge pull request #2363 from umagnus/release-1.30-shield
Browse files Browse the repository at this point in the history
[release 1.30] fix shield guard on csi controller and node
  • Loading branch information
k8s-ci-robot authored Jun 21, 2024
2 parents 9c5ece1 + 336639e commit 2e81a2d
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 0 deletions.
Binary file modified charts/latest/azuredisk-csi-driver-v1.30.1.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ spec:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: csi-attacher
{{- if hasPrefix "/" .Values.image.csiAttacher.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiAttacher.repository }}:{{ .Values.image.csiAttacher.tag }}"
Expand All @@ -109,6 +113,10 @@ spec:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiAttacher | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: csi-snapshotter
{{- if hasPrefix "/" .Values.snapshot.image.csiSnapshotter.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.snapshot.image.csiSnapshotter.repository }}:{{ .Values.snapshot.image.csiSnapshotter.tag }}"
Expand All @@ -128,6 +136,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 }}"
Expand All @@ -149,6 +161,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 }}"
Expand All @@ -168,6 +184,10 @@ spec:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
{{- if eq .Values.controller.enableTrafficManager true }}
- image: mcr.microsoft.com/aks/ccp/ccp-auto-thrust:master.221118.2
imagePullPolicy: IfNotPresent
Expand All @@ -179,6 +199,10 @@ spec:
ports:
- containerPort: {{ .Values.controller.trafficManagerPort }}
protocol: TCP
securityContext:
capabilities:
drop:
- ALL
{{- end }}
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
Expand Down Expand Up @@ -281,6 +305,10 @@ spec:
readOnly: true
{{- end }}
resources: {{- toYaml .Values.controller.resources.azuredisk | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: socket-dir
emptyDir: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,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 }}
Expand Down Expand Up @@ -96,6 +100,10 @@ spec:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}-windows-hp"
Expand Down Expand Up @@ -158,4 +166,8 @@ spec:
value: {{ .Values.windows.otelTracing.otelExporterEndpoint }}
{{- end }}
imagePullPolicy: {{ .Values.image.azuredisk.pullPolicy }}
securityContext:
capabilities:
drop:
- ALL
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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 }}"
Expand Down Expand Up @@ -111,6 +115,10 @@ spec:
- name: registration-dir
mountPath: C:\registration
resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
Expand Down Expand Up @@ -205,6 +213,10 @@ spec:
- name: csi-proxy-volume-pipe-v1beta2
mountPath: \\.\pipe\csi-proxy-volume-v1beta2
resources: {{- toYaml .Values.windows.resources.azuredisk | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: csi-proxy-fs-pipe-v1
hostPath:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ spec:
- --http-endpoint=localhost:{{ .Values.node.livenessProbe.healthPort }}
- --v=2
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 }}"
Expand Down Expand Up @@ -109,6 +113,10 @@ spec:
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.linux.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
Expand Down Expand Up @@ -181,6 +189,9 @@ spec:
imagePullPolicy: {{ .Values.image.azuredisk.pullPolicy }}
securityContext:
privileged: true
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
- "--leader-election-namespace={{ .Release.Namespace }}"
resources: {{- toYaml .Values.snapshot.snapshotController.resources | nindent 12 }}
imagePullPolicy: {{ .Values.snapshot.image.csiSnapshotController.pullPolicy }}
securityContext:
capabilities:
drop:
- ALL

---
{{- if .Values.snapshot.VolumeSnapshotClass.enabled -}}
Expand Down
24 changes: 24 additions & 0 deletions deploy/csi-azuredisk-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: csi-attacher
image: mcr.microsoft.com/oss/kubernetes-csi/csi-attacher:v4.5.1
args:
Expand All @@ -82,6 +86,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.3
args:
Expand All @@ -102,6 +110,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: csi-resizer
image: mcr.microsoft.com/oss/kubernetes-csi/csi-resizer:v1.10.1
args:
Expand All @@ -124,6 +136,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: liveness-probe
image: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe:v2.12.0
args:
Expand All @@ -140,6 +156,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
image: mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.30.1
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -183,6 +203,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: socket-dir
emptyDir: {}
Expand Down
12 changes: 12 additions & 0 deletions deploy/csi-azuredisk-node-windows-hostprocess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
- "powershell.exe"
- "-c"
- "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\disk.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.10.1
Expand Down Expand Up @@ -75,6 +79,10 @@ spec:
requests:
cpu: 30m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
image: mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.30.1-windows-hp
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -106,3 +114,7 @@ spec:
requests:
cpu: 10m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
12 changes: 12 additions & 0 deletions deploy/csi-azuredisk-node-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.1
args:
Expand Down Expand Up @@ -93,6 +97,10 @@ spec:
requests:
cpu: 30m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
image: mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.30.1
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -155,6 +163,10 @@ spec:
requests:
cpu: 10m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: csi-proxy-fs-pipe-v1
hostPath:
Expand Down
11 changes: 11 additions & 0 deletions deploy/csi-azuredisk-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.1
args:
Expand Down Expand Up @@ -84,6 +88,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: azuredisk
image: mcr.microsoft.com/oss/kubernetes-csi/azuredisk-csi:v1.30.1
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -119,6 +127,9 @@ spec:
fieldPath: spec.nodeName
securityContext:
privileged: true
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
Expand Down
4 changes: 4 additions & 0 deletions deploy/csi-snapshot-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL

0 comments on commit 2e81a2d

Please sign in to comment.