Skip to content

Commit

Permalink
Merge pull request #63 from sebastiangaiser/feature/add-default-secur…
Browse files Browse the repository at this point in the history
…ity-context

feat(chart): add default security context
  • Loading branch information
sebastiangaiser authored Jan 16, 2025
2 parents 2b8307b + c7cafa1 commit d4fe24f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ spec:
labels:
{{- include "ca-controller-for-strimzi.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "ca-controller-for-strimzi.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
Expand All @@ -43,8 +43,20 @@ spec:
port: 8081
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- else }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
{{- end }}
volumeMounts:
{{- range $name, $spec := $.Values.volumes }}
- name: {{ $name }}
Expand Down

0 comments on commit d4fe24f

Please sign in to comment.