2 # Copyright © adorsys GmbH & Co. KG
3 # Modifications © 2022, Deutsche Telekom
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 {{- with .Values.annotations }}
23 {{- toYaml . | nindent 4 }}
25 name: {{ template "keycloak-config-cli.fullname" . }}
27 {{- include "keycloak-config-cli.labels" . | nindent 4 }}
29 backoffLimit: {{ .Values.backoffLimit }}
32 {{- with .Values.podAnnotations }}
37 {{- include "keycloak-config-cli.selectorLabels" . | nindent 8 }}
38 {{- with .Values.podLabels }}
39 {{- toYaml . | nindent 8 }}
42 {{- with .Values.image.pullSecrets }}
44 {{- toYaml . | nindent 8 }}
48 - name: keycloak-config-cli
49 image: "{{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.repository }}:{{ tpl .Values.image.tag $ }}"
50 imagePullPolicy: {{ .Values.image.pullPolicy }}
51 {{- with .Values.resources }}
53 {{- toYaml . | nindent 10 }}
56 {{- range $name, $value := .Values.env }}
57 - name: {{ $name | quote }}
58 value: {{ tpl $value $ | quote }}
60 {{- range $name, $value := .Values.secrets }}
61 - name: {{ $name | quote }}
64 name: "{{ template "keycloak-config-cli.fullname" $ }}"
65 key: {{ $name | quote }}
67 {{- if and .Values.existingSecret .Values.existingSecretKey }}
68 - name: "KEYCLOAK_PASSWORD"
71 name: "{{ tpl .Values.existingSecret . }}"
72 key: "{{ .Values.existingSecretKey }}"
74 {{- with .Values.securityContext }}
76 {{- toYaml . | nindent 10 }}
81 {{- with .Values.extraVolumeMounts }}
82 {{- tpl . $ | nindent 12 }}
84 {{ include "common.waitForJobContainer" . | indent 8 | trim }}
88 {{- if .Values.existingConfigSecret }}
89 secretName: "{{ tpl .Values.existingConfigSecret $ }}"
91 secretName: "{{ template "keycloak-config-cli.fullname" . }}-config-realms"
94 {{- with .Values.extraVolumes }}
95 {{- tpl . $ | nindent 8 }}
97 {{- with .Values.serviceAccount }}
98 serviceAccountName: "{{ tpl . $ }}"
100 {{- with .Values.securityContext }}
102 {{- toYaml . | nindent 8 }}