Skip to content

Commit

Permalink
Merge pull request #1066 from JaneLiuL/securitycontext
Browse files Browse the repository at this point in the history
expose security context from helm chart
  • Loading branch information
k8s-ci-robot authored Mar 10, 2023
2 parents 7106115 + 12965c4 commit 85e9f86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
8 changes: 1 addition & 7 deletions charts/descheduler/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 16 }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
{{- toYaml .Values.securityContext | nindent 16 }}
volumeMounts:
- mountPath: /policy-dir
name: policy-volume
Expand Down
8 changes: 1 addition & 7 deletions charts/descheduler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
- mountPath: /policy-dir
name: policy-volume
Expand Down
10 changes: 10 additions & 0 deletions charts/descheduler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ resources:
# cpu: 100m
# memory: 128Mi

securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000

nameOverride: ""
fullnameOverride: ""

Expand Down

0 comments on commit 85e9f86

Please sign in to comment.