blob: 2c0ee783d57d77bd29b53ce1163391356297cb24 [file] [log] [blame]
Jakub Latusekd71d26c2020-10-21 13:36:29 +02001{{/*
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +01002# Copyright © 2018 Amdocs, Bell Canada
jhhd4258672020-08-09 12:08:08 -05003# Modifications Copyright © 2020 AT&T Intellectual Property
waynedunican368aced2022-02-15 08:27:57 +00004# Modifications Copyright (C) 2022 Nordix Foundation.
Andreas Geissler57681132024-07-29 10:18:26 +02005# Modifications Copyright © 2024 Deutsche Telekom
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +01006#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
Jakub Latusekd71d26c2020-10-21 13:36:29 +020018*/}}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010019
saul.gillef208b02023-04-26 16:16:05 +010020{{ if not .Values.global.postgres.localCluster }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010021apiVersion: batch/v1
22kind: Job
23metadata:
amatthews736bf372021-12-14 16:04:15 +000024 name: {{ include "common.fullname" . }}-galera-init
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010025 namespace: {{ include "common.namespace" . }}
26 labels:
amatthews736bf372021-12-14 16:04:15 +000027 app: {{ include "common.name" . }}-galera-init
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010028 release: {{ include "common.release" . }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010029spec:
30 template:
31 metadata:
32 labels:
amatthews736bf372021-12-14 16:04:15 +000033 app: {{ include "common.name" . }}-galera-init
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010034 release: {{ include "common.release" . }}
amatthews736bf372021-12-14 16:04:15 +000035 name: {{ include "common.name" . }}-galera-init
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010036 spec:
Andreas Geissler57681132024-07-29 10:18:26 +020037 {{ include "common.podSecurityContext" . | indent 6 | trim }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +010038 {{- include "common.imagePullSecrets" . | nindent 6 }}
amatthews736bf372021-12-14 16:04:15 +000039 initContainers:
Andreas Geissleree119102024-04-11 13:53:39 +020040 {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_mariadb ) | indent 6 | trim }}
amatthews736bf372021-12-14 16:04:15 +000041 containers:
42 - name: {{ include "common.name" . }}-galera-config
Andreas Geisslera4275992023-01-25 09:27:30 +010043 image: {{ include "repositoryGenerator.image.mariadb" . }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010044 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geissler57681132024-07-29 10:18:26 +020045 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010046 volumeMounts:
47 - mountPath: /dbcmd-config/db.sh
48 name: {{ include "common.fullname" . }}-config
49 subPath: db.sh
50 command:
51 - /bin/sh
amatthews736bf372021-12-14 16:04:15 +000052 - -cx
53 - |
Andreas Geissler57681132024-07-29 10:18:26 +020054 {{- if include "common.requireSidecarKiller" . }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +020055 echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
amatthews736bf372021-12-14 16:04:15 +000056 /dbcmd-config/db.sh
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010057 env:
58 - name: MYSQL_ROOT_PASSWORD
Krzysztof Opasiak98a79cc2020-04-01 22:33:58 +020059 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 10 }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010060 - name: MYSQL_HOST
61 value: "{{ index .Values "mariadb-galera" "service" "name" }}"
62 - name: MYSQL_USER
Krzysztof Opasiak98a79cc2020-04-01 22:33:58 +020063 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +010064 - name: MYSQL_PORT
65 value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010066 resources: {{ include "common.resources" . | nindent 10 }}
Andreas Geissler57681132024-07-29 10:18:26 +020067 {{- if (include "common.requireSidecarKiller" .) }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +020068 - name: policy-service-mesh-wait-for-job-container
69 image: {{ include "repositoryGenerator.image.quitQuit" . }}
70 imagePullPolicy: Always
71 command:
72 - /bin/sh
73 - "-c"
74 args:
75 - echo "waiting 10s for istio side cars to be up"; sleep 10s;
76 /app/ready.py --service-mesh-check {{ include "common.name" . }}-galera-config -t 45;
77 env:
78 - name: NAMESPACE
79 valueFrom:
80 fieldRef:
81 apiVersion: v1
82 fieldPath: metadata.namespace
Andreas Geissler57681132024-07-29 10:18:26 +020083 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
84 resources:
85 limits:
86 cpu: 100m
87 memory: 500Mi
88 requests:
89 cpu: 10m
90 memory: 10Mi
Andreas Geisslerc50f0892023-06-14 14:21:31 +020091 {{- end }}
amatthews736bf372021-12-14 16:04:15 +000092 restartPolicy: Never
93 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
94 volumes:
95 - name: {{ include "common.fullname" . }}-config
96 configMap:
97 name: {{ include "common.fullname" . }}-db-configmap
98 defaultMode: 0755
99 items:
100 - key: db.sh
101 path: db.sh
saul.gillef208b02023-04-26 16:16:05 +0100102{{ end }}
amatthews736bf372021-12-14 16:04:15 +0000103
104{{ if .Values.global.postgres.localCluster }}
105---
106apiVersion: batch/v1
107kind: Job
108metadata:
109 name: {{ include "common.fullname" . }}-pg-init
110 namespace: {{ include "common.namespace" . }}
111 labels:
112 app: {{ include "common.name" . }}-pg-init
113 release: {{ include "common.release" . }}
114spec:
115 template:
116 metadata:
117 labels:
118 app: {{ include "common.name" . }}-pg-init
119 release: {{ include "common.release" . }}
120 name: {{ include "common.name" . }}-pg-init
121 spec:
Andreas Geissler57681132024-07-29 10:18:26 +0200122 {{ include "common.podSecurityContext" . | indent 6 | trim }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100123 {{- include "common.imagePullSecrets" . | nindent 6 }}
Andreas Geissleree119102024-04-11 13:53:39 +0200124 initContainers:
125 {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_postgres ) | indent 6 | trim }}
amatthews736bf372021-12-14 16:04:15 +0000126 containers:
127 - name: {{ include "common.name" . }}-pg-config
Andreas Geissler6128f5f2023-01-25 09:18:56 +0100128 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.postgresImage }}
waynedunican368aced2022-02-15 08:27:57 +0000129 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geissler57681132024-07-29 10:18:26 +0200130 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
waynedunican368aced2022-02-15 08:27:57 +0000131 volumeMounts:
132 - mountPath: /docker-entrypoint-initdb.d/db-pg.sh
133 name: {{ include "common.fullname" . }}-config
134 subPath: db-pg.sh
135 command:
136 - /bin/sh
amatthews736bf372021-12-14 16:04:15 +0000137 - -cx
138 - |
Andreas Geissler57681132024-07-29 10:18:26 +0200139 {{- if include "common.requireSidecarKiller" . }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200140 echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
amatthews736bf372021-12-14 16:04:15 +0000141 /docker-entrypoint-initdb.d/db-pg.sh
waynedunican368aced2022-02-15 08:27:57 +0000142 env:
143 - name: PG_ADMIN_PASSWORD
saul.gillef208b02023-04-26 16:16:05 +0100144 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
waynedunican368aced2022-02-15 08:27:57 +0000145 - name: PG_HOST
146 value: "{{ .Values.postgres.service.name2 }}"
147 - name: PG_USER
saul.gillef208b02023-04-26 16:16:05 +0100148 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
waynedunican368aced2022-02-15 08:27:57 +0000149 - name: PG_USER_PASSWORD
saul.gillef208b02023-04-26 16:16:05 +0100150 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
waynedunican368aced2022-02-15 08:27:57 +0000151 - name: PG_PORT
152 value: "{{ .Values.postgres.service.internalPort }}"
miroslavmasaryka7ac7f02023-03-01 14:12:26 +0100153 resources: {{ include "common.resources" . | nindent 10 }}
Andreas Geissler57681132024-07-29 10:18:26 +0200154 {{- if (include "common.requireSidecarKiller" .) }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200155 - name: policy-service-mesh-wait-for-job-container
156 image: {{ include "repositoryGenerator.image.quitQuit" . }}
157 imagePullPolicy: Always
158 command:
159 - /bin/sh
160 - "-c"
161 args:
162 - echo "waiting 10s for istio side cars to be up"; sleep 10s;
163 /app/ready.py --service-mesh-check {{ include "common.name" . }}-pg-config -t 45;
164 env:
165 - name: NAMESPACE
166 valueFrom:
167 fieldRef:
168 apiVersion: v1
169 fieldPath: metadata.namespace
Andreas Geissler57681132024-07-29 10:18:26 +0200170 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
171 resources:
172 limits:
173 cpu: 100m
174 memory: 500Mi
175 requests:
176 cpu: 10m
177 memory: 10Mi
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200178 {{- end }}
amatthews736bf372021-12-14 16:04:15 +0000179 restartPolicy: Never
180 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
181 volumes:
182 - name: {{ include "common.fullname" . }}-config
183 configMap:
184 name: {{ include "common.fullname" . }}-db-configmap
185 defaultMode: 0755
186 items:
187 - key: db-pg.sh
188 path: db-pg.sh
189{{ end }}
190
191---
saul.gillef208b02023-04-26 16:16:05 +0100192{{ if not .Values.global.postgres.localCluster }}
amatthews736bf372021-12-14 16:04:15 +0000193apiVersion: batch/v1
194kind: Job
195metadata:
196 name: {{ include "common.fullname" . }}-galera-config
197 namespace: {{ include "common.namespace" . }}
198 labels:
199 app: {{ include "common.name" . }}-galera-config
200 release: {{ include "common.release" . }}
201spec:
202 template:
203 metadata:
204 labels:
205 app: {{ include "common.name" . }}-galera-config
206 release: {{ include "common.release" . }}
207 name: {{ include "common.name" . }}-galera-config
208 spec:
Andreas Geissler57681132024-07-29 10:18:26 +0200209 {{ include "common.podSecurityContext" . | indent 6 | trim }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100210 {{- include "common.imagePullSecrets" . | nindent 6 }}
amatthews736bf372021-12-14 16:04:15 +0000211 initContainers:
Andreas Geissler47537432024-02-27 08:55:23 +0100212 - name: {{ include "common.name" . }}-init-readiness
Andreas Geissler57681132024-07-29 10:18:26 +0200213 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
Andreas Geissler47537432024-02-27 08:55:23 +0100214 image: {{ include "repositoryGenerator.image.readiness" . }}
215 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
216 command:
217 - /app/ready.py
218 args:
219 - --job-name
220 - {{ include "common.fullname" . }}-galera-init
221 env:
222 - name: NAMESPACE
223 valueFrom:
224 fieldRef:
225 apiVersion: v1
226 fieldPath: metadata.namespace
227 resources:
228 limits:
229 cpu: "100m"
Andreas Geissler8cbb3d92024-03-12 16:44:56 +0100230 memory: "500Mi"
Andreas Geissler47537432024-02-27 08:55:23 +0100231 requests:
232 cpu: "3m"
Andreas Geissler8cbb3d92024-03-12 16:44:56 +0100233 memory: "20Mi"
jhhd74fe9f2021-04-15 11:04:39 -0500234 containers:
amatthews736bf372021-12-14 16:04:15 +0000235 - name: {{ include "common.name" . }}-galera-db-migrator
Andreas Geissler57681132024-07-29 10:18:26 +0200236 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
Andreas Geissler8d704ba2022-01-07 17:49:22 +0000237 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbmigrator.image }}
jhhd74fe9f2021-04-15 11:04:39 -0500238 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
239 volumeMounts:
240 - mountPath: /dbcmd-config/db_migrator_policy_init.sh
241 name: {{ include "common.fullname" . }}-config
242 subPath: db_migrator_policy_init.sh
Andreas Geissler57681132024-07-29 10:18:26 +0200243 - mountPath: /opt/app/policy/etc/db
244 name: db-conf
jhhd74fe9f2021-04-15 11:04:39 -0500245 command:
246 - /bin/sh
amatthews736bf372021-12-14 16:04:15 +0000247 - -cx
248 - |
Andreas Geissler57681132024-07-29 10:18:26 +0200249 {{- if include "common.requireSidecarKiller" . }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200250 echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
amatthews736bf372021-12-14 16:04:15 +0000251 /dbcmd-config/db_migrator_policy_init.sh
jhhd74fe9f2021-04-15 11:04:39 -0500252 env:
253 - name: SQL_HOST
254 value: "{{ index .Values "mariadb-galera" "service" "name" }}"
255 - name: SQL_USER
256 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
257 - name: SQL_PASSWORD
258 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
259 - name: SQL_DB
260 value: {{ .Values.dbmigrator.schema }}
261 - name: POLICY_HOME
262 value: {{ .Values.dbmigrator.policy_home }}
waynedunican368aced2022-02-15 08:27:57 +0000263 - name: SCRIPT_DIRECTORY
264 value: "sql"
miroslavmasaryka7ac7f02023-03-01 14:12:26 +0100265 resources: {{ include "common.resources" . | nindent 10 }}
Andreas Geissler57681132024-07-29 10:18:26 +0200266 {{- if (include "common.requireSidecarKiller" .) }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200267 - name: policy-service-mesh-wait-for-job-container
268 image: {{ include "repositoryGenerator.image.quitQuit" . }}
269 imagePullPolicy: Always
270 command:
271 - /bin/sh
272 - "-c"
273 args:
274 - echo "waiting 10s for istio side cars to be up"; sleep 10s;
275 /app/ready.py --service-mesh-check {{ include "common.name" . }}-galera-db-migrator -t 45;
276 env:
277 - name: NAMESPACE
278 valueFrom:
279 fieldRef:
280 apiVersion: v1
281 fieldPath: metadata.namespace
Andreas Geissler57681132024-07-29 10:18:26 +0200282 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
283 resources:
284 limits:
285 cpu: 100m
286 memory: 500Mi
287 requests:
288 cpu: 10m
289 memory: 10Mi
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200290 {{- end }}
amatthews736bf372021-12-14 16:04:15 +0000291 restartPolicy: Never
292 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
293 volumes:
294 - name: {{ include "common.fullname" . }}-config
295 configMap:
296 name: {{ include "common.fullname" . }}-db-configmap
297 defaultMode: 0755
298 items:
299 - key: db_migrator_policy_init.sh
300 path: db_migrator_policy_init.sh
Andreas Geissler57681132024-07-29 10:18:26 +0200301 - name: db-conf
302 emptyDir:
303 medium: Memory
304 sizeLimit: 64Mi
saul.gillef208b02023-04-26 16:16:05 +0100305{{ end }}
amatthews736bf372021-12-14 16:04:15 +0000306{{ if .Values.global.postgres.localCluster }}
307---
308apiVersion: batch/v1
309kind: Job
310metadata:
311 name: {{ include "common.fullname" . }}-pg-config
312 namespace: {{ include "common.namespace" . }}
313 labels:
314 app: {{ include "common.name" . }}-pg-config
315 release: {{ include "common.release" . }}
316spec:
317 template:
318 metadata:
319 labels:
320 app: {{ include "common.name" . }}-pg-config
321 release: {{ include "common.release" . }}
322 name: {{ include "common.name" . }}-pg-config
323 spec:
Andreas Geissler57681132024-07-29 10:18:26 +0200324 {{ include "common.podSecurityContext" . | indent 6 | trim }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100325 {{- include "common.imagePullSecrets" . | nindent 6 }}
amatthews736bf372021-12-14 16:04:15 +0000326 initContainers:
Andreas Geissler47537432024-02-27 08:55:23 +0100327 - name: {{ include "common.name" . }}-init-readiness
Andreas Geissler57681132024-07-29 10:18:26 +0200328 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
Andreas Geissler47537432024-02-27 08:55:23 +0100329 image: {{ include "repositoryGenerator.image.readiness" . }}
330 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
331 command:
332 - /app/ready.py
333 args:
334 - --job-name
335 - {{ include "common.fullname" . }}-pg-init
336 env:
337 - name: NAMESPACE
338 valueFrom:
339 fieldRef:
340 apiVersion: v1
341 fieldPath: metadata.namespace
342 resources:
343 limits:
344 cpu: "100m"
Andreas Geissler8cbb3d92024-03-12 16:44:56 +0100345 memory: "500Mi"
Andreas Geissler47537432024-02-27 08:55:23 +0100346 requests:
347 cpu: "3m"
Andreas Geissler8cbb3d92024-03-12 16:44:56 +0100348 memory: "20Mi"
amatthews736bf372021-12-14 16:04:15 +0000349 containers:
350 - name: {{ include "common.name" . }}-pg-db-migrator
Andreas Geissler57681132024-07-29 10:18:26 +0200351 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
waynedunican368aced2022-02-15 08:27:57 +0000352 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbmigrator.image }}
353 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
354 volumeMounts:
355 - mountPath: /dbcmd-config/db_migrator_pg_policy_init.sh
356 name: {{ include "common.fullname" . }}-config
357 subPath: db_migrator_pg_policy_init.sh
Andreas Geissler57681132024-07-29 10:18:26 +0200358 - mountPath: /opt/app/policy/etc/db
359 name: db-conf
waynedunican368aced2022-02-15 08:27:57 +0000360 command:
361 - /bin/sh
amatthews736bf372021-12-14 16:04:15 +0000362 - -cx
363 - |
Andreas Geissler57681132024-07-29 10:18:26 +0200364 {{- if include "common.requireSidecarKiller" . }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200365 echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
amatthews736bf372021-12-14 16:04:15 +0000366 /dbcmd-config/db_migrator_pg_policy_init.sh
waynedunican368aced2022-02-15 08:27:57 +0000367 env:
368 - name: SQL_HOST
369 value: "{{ .Values.postgres.service.name2 }}"
370 - name: SQL_USER
saul.gillef208b02023-04-26 16:16:05 +0100371 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
waynedunican368aced2022-02-15 08:27:57 +0000372 - name: SQL_PASSWORD
saul.gillef208b02023-04-26 16:16:05 +0100373 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
waynedunican368aced2022-02-15 08:27:57 +0000374 - name: SQL_DB
375 value: {{ .Values.dbmigrator.schema }}
376 - name: POLICY_HOME
377 value: {{ .Values.dbmigrator.policy_home }}
378 - name: SCRIPT_DIRECTORY
379 value: "postgres"
380 - name: PGPASSWORD
saul.gillef208b02023-04-26 16:16:05 +0100381 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
miroslavmasaryka7ac7f02023-03-01 14:12:26 +0100382 resources: {{ include "common.resources" . | nindent 10 }}
Andreas Geissler57681132024-07-29 10:18:26 +0200383 {{- if (include "common.requireSidecarKiller" .) }}
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200384 - name: policy-service-mesh-wait-for-job-container
385 image: {{ include "repositoryGenerator.image.quitQuit" . }}
386 imagePullPolicy: Always
387 command:
388 - /bin/sh
389 - "-c"
390 args:
391 - echo "waiting 10s for istio side cars to be up"; sleep 10s;
392 /app/ready.py --service-mesh-check {{ include "common.name" . }}-pg-db-migrator -t 45;
393 env:
394 - name: NAMESPACE
395 valueFrom:
396 fieldRef:
397 apiVersion: v1
398 fieldPath: metadata.namespace
Andreas Geissler57681132024-07-29 10:18:26 +0200399 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
400 resources:
401 limits:
402 cpu: 100m
403 memory: 500Mi
404 requests:
405 cpu: 10m
406 memory: 10Mi
Andreas Geisslerc50f0892023-06-14 14:21:31 +0200407 {{- end }}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +0100408 restartPolicy: Never
farida azmyc1178372021-04-11 12:55:33 +0200409 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +0100410 volumes:
411 - name: {{ include "common.fullname" . }}-config
412 configMap:
413 name: {{ include "common.fullname" . }}-db-configmap
amatthews736bf372021-12-14 16:04:15 +0000414 defaultMode: 0755
Sylvain Desbureaux4898dc02019-11-14 13:35:13 +0100415 items:
waynedunican368aced2022-02-15 08:27:57 +0000416 - key: db_migrator_pg_policy_init.sh
417 path: db_migrator_pg_policy_init.sh
Andreas Geissler57681132024-07-29 10:18:26 +0200418 - name: db-conf
419 emptyDir:
420 medium: Memory
421 sizeLimit: 64Mi
amatthews736bf372021-12-14 16:04:15 +0000422{{ end }}