1 # Copyright © 2023 Nordix Foundation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
17 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19 selector: {{- include "common.selectors" . | nindent 4 }}
20 replicas: {{ index .Values.replicaCount }}
21 minReadySeconds: {{ index .Values.minReadySeconds }}
23 type: {{ index .Values.updateStrategy.type }}
25 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
26 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
28 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
31 {{ include "common.readinessCheck.waitFor" . | indent 8 | trim }}
33 - name: {{ include "common.name" . }}
34 command: [ "./start-app.sh" ]
35 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
36 resources: {{ include "common.resources" . | nindent 12 }}
39 value: {{ include "common.mariadbService" . }}
41 value: {{ include "common.mariadbPort" . | quote }}
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 14 }}
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 14 }}
46 - name: DB_ADMIN_USERNAME
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 14 }}
48 - name: DB_ADMIN_PASSWORD
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 14 }}
52 name: {{ include "common.fullname" . }}-configmap
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
58 mountPath: /app/config
62 port: {{ index .Values.livenessProbe.port }}
63 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
64 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
65 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
66 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
67 ports: {{ include "common.containerPorts" . | nindent 12 }}
68 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
74 name: {{ include "common.fullname" . }}-app-configmap
75 {{- include "common.imagePullSecrets" . | nindent 6 }}