Skip to content

Commit 7390350

Browse files
authored
fix(helm): Break circular dependency (#10740)
1 parent c67e615 commit 7390350

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

helm/defectdojo/templates/initializer-job.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,24 @@ spec:
4848
path: {{ .hostPath }}
4949
{{- end }}
5050
{{- end }}
51+
initContainers:
52+
- name: wait-for-db
53+
command:
54+
- '/bin/bash'
55+
- '-c'
56+
- '/wait-for-it.sh ${DD_DATABASE_HOST:-postgres}:${DD_DATABASE_PORT:-5432} -t 30 -s -- /bin/echo Database is up'
57+
image: '{{ template "django.uwsgi.repository" . }}:{{ .Values.tag }}'
58+
imagePullPolicy: {{ .Values.imagePullPolicy }}
59+
{{- if .Values.securityContext.enabled }}
60+
securityContext:
61+
{{- toYaml .Values.securityContext.djangoSecurityContext | nindent 10 }}
62+
{{- end }}
63+
envFrom:
64+
- configMapRef:
65+
name: {{ $fullName }}
66+
- secretRef:
67+
name: {{ $fullName }}
68+
optional: true
5169
containers:
5270
{{- if .Values.cloudsql.enabled }}
5371
- name: cloudsql-proxy

helm/defectdojo/values.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,7 @@ django:
298298

299299
initializer:
300300
run: true
301-
jobAnnotations: {
302-
helm.sh/hook: "post-install,post-upgrade"
303-
}
301+
jobAnnotations: {}
304302
annotations: {}
305303
labels: {}
306304
keepSeconds: 60

0 commit comments

Comments
 (0)