feat(helm): add security context for init container
for ex istio using 1337 for init containers
This commit is contained in:
parent
2a5e0dc1f1
commit
14165fabed
2 changed files with 15 additions and 1 deletions
|
|
@ -85,6 +85,8 @@ Create the name of the service account to use
|
|||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ['sh', '-c', "until (python manage.py migrate --check); do echo Waiting for database migrations; sleep 2; done"]
|
||||
securityContext:
|
||||
{{ toYaml .Values.init.securityContext| nindent 4}}
|
||||
env:
|
||||
{{- include "snippet.oncall.env" . | nindent 12 }}
|
||||
{{- include "snippet.mysql.env" . | nindent 12 }}
|
||||
|
|
@ -93,4 +95,4 @@ Create the name of the service account to use
|
|||
{{- if .Values.env }}
|
||||
{{- toYaml .Values.env | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -160,3 +160,15 @@ securityContext: {}
|
|||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
init:
|
||||
securityContext: {}
|
||||
# allowPrivilegeEscalation: false
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# privileged: false
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsGroup: 1337
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1337
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue