Skip to content

Commit

Permalink
Improve securityContext for operator Deployment
Browse files Browse the repository at this point in the history
1. Restrict container from acquiring additional privileges (`securityContext.allowPrivilegeEscalation`)
2. Mount container's root filesystem as read only (`securityContext.readOnlyRootFilesystem`)
3. Ensure that container won't be started as privileged container (`securityContext.privileged`)

Issue: #591
  • Loading branch information
mjura committed Jul 24, 2024
1 parent 52e378e commit b3e6966
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/aks-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ spec:
value: {{ .Values.httpsProxy }}
- name: NO_PROXY
value: {{ .Values.noProxy }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
privileged: false
capabilities:
drop:
- ALL
{{- if .Values.additionalTrustedCAs }}
# aks-operator mounts the additional CAs in two places:
volumeMounts:
Expand Down

0 comments on commit b3e6966

Please sign in to comment.