2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2018 Ericsson. All rights reserved.
4 # Modifications Copyright © 2020 Nokia
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20 # @author: gareth.roper@ericsson.com
24 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
26 selector: {{- include "common.selectors" . | nindent 4 }}
27 replicas: {{ .Values.replicaCount }}
28 minReadySeconds: {{ index .Values.minReadySeconds }}
30 type: {{ index .Values.updateStrategy.type }}
32 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
33 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
35 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
39 image: {{ include "repositoryGenerator.image.busybox" . }}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 command: ["/bin/sh", "-c", "chown -Rf 1000:1000 /app/logs"]
47 - name: {{ include "common.name" . }}
48 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
49 resources: {{ include "common.resources" . | nindent 10 }}
55 export SO_COCKPIT_PASSWORD=`htpasswd -bnBC 10 "" $SO_COCKPIT_PASS | tr -d ':\n' | sed 's/\$2y/\$2a/'`
59 value: {{ include "common.mariadbService" . }}
61 value: {{ include "common.mariadbPort" . | quote }}
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
66 - name: DB_ADMIN_USERNAME
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
68 - name: DB_ADMIN_PASSWORD
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
70 - name: SO_COCKPIT_USERNAME
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "login") | indent 10 }}
72 - name: SO_COCKPIT_PASS
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "password") | indent 10 }}
77 name: {{ include "common.fullname" . }}
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
83 mountPath: /app/config
87 port: {{ index .Values.readinessProbe.port }}
88 initialDelaySeconds: {{ index .Values.readinessProbe.initialDelaySeconds}}
89 periodSeconds: {{ index .Values.readinessProbe.periodSeconds}}
92 port: {{ index .Values.livenessProbe.port }}
93 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
94 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
95 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
96 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
98 ports: {{ include "common.containerPorts" . | nindent 10 }}
99 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
105 name: {{ include "common.fullname" . }}-app
107 - name: "{{ include "common.namespace" . }}-docker-registry-key"