diff --git a/chart/keel/templates/deployment.yaml b/chart/keel/templates/deployment.yaml index ee06557c..0c7999d0 100644 --- a/chart/keel/templates/deployment.yaml +++ b/chart/keel/templates/deployment.yaml @@ -28,6 +28,10 @@ spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} +{{- end }} +{{- with .Values.podSecurityContext }} + securityContext: +{{- toYaml . | nindent 8 }} {{- end }} containers: {{- if .Values.extraContainers }} @@ -38,6 +42,10 @@ spec: image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["/bin/keel"] +{{- with .Values.containerSecurityContext }} + securityContext: +{{- toYaml . | nindent 12 }} +{{- end }} volumeMounts: {{- if .Values.persistence.enabled }} - name: storage-logs diff --git a/chart/keel/values.yaml b/chart/keel/values.yaml index f1cecf43..7b304ac3 100644 --- a/chart/keel/values.yaml +++ b/chart/keel/values.yaml @@ -250,3 +250,9 @@ persistence: enabled: false storageClass: "-" size: 1Gi + +# -- Pod security context (runAsUser, etc.) +podSecurityContext: {} + +# -- Container security context (allowPrivilegeEscalation, etc.) +containerSecurityContext: {}