Skip to content

Commit

Permalink
fix: separate POD and Container security contexts
Browse files Browse the repository at this point in the history
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
  • Loading branch information
akafazov committed Dec 20, 2024
1 parent bf95905 commit 898338d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: A Helm chart containing reuse templates

type: library

version: 0.2.2
version: 0.2.3
8 changes: 7 additions & 1 deletion charts/common/templates/_deploymentHelpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,16 @@ readinessProbe:
protocol: TCP
{{- end -}}


{{- define "common.container.securityContext" -}}
securityContext:
runAsNonRoot: true
readOnlyRootFilesystem: true
{{- end }}


{{- define "common.pod.securityContext" -}}
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: {{ include "common.entity.name" }}
Expand Down

0 comments on commit 898338d

Please sign in to comment.