Skip to content

Commit

Permalink
Merge pull request #1442 from umagnus/release-1.24-shield
Browse files Browse the repository at this point in the history
[release-1.24] fix shield guard on csi controller and node
  • Loading branch information
k8s-ci-robot committed Jun 20, 2024
2 parents e69fb60 + bae4200 commit a29f56c
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
Binary file modified charts/latest/blob-csi-driver-v1.24.1.tgz
Binary file not shown.
16 changes: 16 additions & 0 deletions charts/latest/blob-csi-driver/templates/csi-blob-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiProvisioner | 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 @@ -101,6 +105,10 @@ spec:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: blob
{{- if hasPrefix "/" .Values.image.blob.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.blob.repository }}:{{ .Values.image.blob.tag }}"
Expand Down Expand Up @@ -182,6 +190,10 @@ spec:
readOnly: true
{{- end }}
resources: {{- toYaml .Values.controller.resources.blob | 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 @@ -202,6 +214,10 @@ spec:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.csiResizer | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: socket-dir
emptyDir: {}
Expand Down
17 changes: 17 additions & 0 deletions charts/latest/blob-csi-driver/templates/csi-blob-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
- "/blobfuse-proxy/init.sh"
securityContext:
privileged: true
capabilities:
drop:
- ALL
env:
- name: DEBIAN_FRONTEND
value: "noninteractive"
Expand Down Expand Up @@ -123,6 +126,10 @@ spec:
- --health-port={{ .Values.node.livenessProbe.healthPort }}
- --v=2
resources: {{- toYaml .Values.node.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 @@ -152,6 +159,10 @@ spec:
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: blob
{{- if hasPrefix "/" .Values.image.blob.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.blob.repository }}:{{ .Values.image.blob.tag }}"
Expand Down Expand Up @@ -218,6 +229,9 @@ spec:
imagePullPolicy: {{ .Values.image.blob.pullPolicy }}
securityContext:
privileged: true
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
Expand Down Expand Up @@ -261,6 +275,9 @@ spec:
imagePullPolicy: {{ .Values.image.blob.pullPolicy }}
securityContext:
privileged: true
capabilities:
drop:
- ALL
resources: {{- toYaml .Values.node.resources.aznfswatchdog | nindent 12 }}
volumeMounts:
- mountPath: /opt/microsoft/aznfs/data
Expand Down
16 changes: 16 additions & 0 deletions deploy/csi-blob-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,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 @@ -72,6 +76,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: blob
image: mcr.microsoft.com/oss/kubernetes-csi/blob-csi:v1.24.1
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -113,6 +121,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 @@ -133,6 +145,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: socket-dir
emptyDir: {}
Expand Down
17 changes: 17 additions & 0 deletions deploy/csi-blob-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ spec:
- "/blobfuse-proxy/init.sh"
securityContext:
privileged: true
capabilities:
drop:
- ALL
env:
- name: DEBIAN_FRONTEND
value: "noninteractive"
Expand Down Expand Up @@ -89,6 +92,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 @@ -119,6 +126,10 @@ spec:
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: blob
image: mcr.microsoft.com/oss/kubernetes-csi/blob-csi:v1.24.1
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -158,6 +169,9 @@ spec:
fieldPath: spec.nodeName
securityContext:
privileged: true
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
Expand Down Expand Up @@ -186,6 +200,9 @@ spec:
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
capabilities:
drop:
- ALL
resources:
limits:
memory: 100Mi
Expand Down

0 comments on commit a29f56c

Please sign in to comment.