@@ -31,12 +31,10 @@ spec:
31
31
{{- with (include "keycloak.imagePullSecrets" .) }}
32
32
{{ . | nindent 6 }}
33
33
{{- end }}
34
- securityContext :
35
- {{- toYaml .Values.podSecurityContext | nindent 8 }}
34
+ securityContext : {{ include "common.renderPodSecurityContext" . | nindent 8 }}
36
35
initContainers :
37
36
- name : copy-quarkus-lib
38
- securityContext :
39
- {{- toYaml .Values.securityContext | nindent 12 }}
37
+ securityContext : {{ include "common.renderContainerSecurityContext" . | nindent 12 }}
40
38
image : {{ include "keycloak.image" . }}
41
39
imagePullPolicy : {{ .Values.image.imagePullPolicy }}
42
40
command : ["sh", "-c", "cp -r /opt/keycloak/lib/quarkus/* /shared-quarkus/"]
@@ -45,10 +43,12 @@ spec:
45
43
mountPath : /shared-quarkus
46
44
{{- if .Values.postgres.enabled }}
47
45
- name : wait-for-postgres
46
+ securityContext : {{ include "common.renderContainerSecurityContext" . | nindent 12 }}
48
47
image : {{ .Values.initContainers.waitForPostgres.image }}
49
48
command : ["sh", "-c", "until pg_isready -h {{ .Release.Name }}-postgres -p 5432 -U postgres; do echo waiting for database; sleep 2; done;"]
50
49
{{- else if .Values.mariadb.enabled }}
51
50
- name : wait-for-mariadb
51
+ securityContext : {{ include "common.renderContainerSecurityContext" . | nindent 12 }}
52
52
image : {{ .Values.initContainers.waitForMariadb.image }}
53
53
command : ["sh", "-c", "until mysqladmin ping -h {{ .Release.Name }}-mariadb -P 3306 --silent; do echo waiting for database; sleep 2; done;"]
54
54
{{- end }}
57
57
{{- end }}
58
58
containers :
59
59
- name : {{ .Chart.Name }}
60
- securityContext :
61
- {{- toYaml .Values.securityContext | nindent 12 }}
60
+ securityContext : {{ include "common.renderContainerSecurityContext" . | nindent 12 }}
62
61
image : {{ include "keycloak.image" . }}
63
62
imagePullPolicy : {{ .Values.image.imagePullPolicy }}
64
63
command :
0 commit comments