Skip to content

Commit

Permalink
feat: enable securityContext.seccompProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Apr 8, 2023
1 parent 266be22 commit 7debaf0
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `podAnnotations` | collection of annotations to add to all the pods | `{}` |
| `podLabels` | collection of labels to add to all the pods | `{}` |
| `priorityClassName` | priority class name to be added to pods | `system-cluster-critical` |
| `securityContext` | security context to be added to pods | `{}` |
| `securityContext` | security context to be added to pods | `{ seccompProfile: {type: RuntimeDefault} }` |
| `controller.name` | name of driver deployment | `csi-smb-controller` |
| `controller.replicas` | replica num of csi-smb-controller | `1` |
| `controller.dnsPolicy` | dnsPolicy of driver node daemonset, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` | |
Expand Down
Binary file modified charts/latest/csi-driver-smb-v0.0.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ spec:
{{- if .Values.controller.runOnControlPlane}}
node-role.kubernetes.io/control-plane: ""
{{- end}}
priorityClassName: system-cluster-critical
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
Expand Down Expand Up @@ -131,6 +134,3 @@ spec:
emptyDir: {}
- name: tmp-dir
emptyDir: {}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ spec:
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: system-node-critical
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
serviceAccountName: {{ .Values.serviceAccount.node }}
{{- include "smb.pullSecrets" . | indent 6 }}
containers:
Expand Down
6 changes: 3 additions & 3 deletions charts/latest/csi-driver-smb/templates/csi-smb-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
{{- with .Values.linux.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
Expand Down Expand Up @@ -148,7 +151,4 @@ spec:
path: {{ .Values.linux.kubelet }}/plugins_registry/
type: DirectoryOrCreate
name: registration-dir
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/latest/csi-driver-smb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ priorityClassName: system-cluster-critical
## Security context give the opportunity to run container as nonroot by setting a securityContext
## by example :
## securityContext: { runAsUser: 1001 }
securityContext: {}
securityContext: { seccompProfile: {type: RuntimeDefault} }
3 changes: 3 additions & 0 deletions deploy/csi-smb-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
securityContext:
seccompProfile:
type: RuntimeDefault
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
Expand Down
3 changes: 3 additions & 0 deletions deploy/csi-smb-node-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
nodeSelector:
kubernetes.io/os: windows
priorityClassName: system-node-critical
securityContext:
seccompProfile:
type: RuntimeDefault
serviceAccountName: csi-smb-node-sa
containers:
- name: liveness-probe
Expand Down
3 changes: 3 additions & 0 deletions deploy/csi-smb-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
securityContext:
seccompProfile:
type: RuntimeDefault
tolerations:
- operator: "Exists"
containers:
Expand Down

0 comments on commit 7debaf0

Please sign in to comment.