blob: 141b5ab1c97f11fe14b792a1f35d602b48d01d05 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +00002# Copyright © 2018 AT&T USA
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Jakub Latusek44f0fdd2020-10-21 13:36:29 +020015*/}}
Grzegorz-Lisd1c1f6a2020-07-29 12:22:40 +020016apiVersion: apps/v1
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000017kind: Deployment
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010018metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000019spec:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010020 selector: {{- include "common.selectors" . | nindent 4 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000021 replicas: {{ index .Values.replicaCount }}
22 minReadySeconds: {{ index .Values.minReadySeconds }}
23 strategy:
24 type: {{ index .Values.updateStrategy.type }}
25 rollingUpdate:
26 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
27 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
28 template:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010029 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000030 spec:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000031 containers:
32 - name: {{ include "common.name" . }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010033 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010034 resources: {{ include "common.resources" . | nindent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000035 env:
36 - name: DB_HOST
krishnaa9692b606b2020-10-30 11:29:21 +053037 value: {{ include "common.mariadbService" . }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000038 - name: DB_PORT
krishnaa9692b606b2020-10-30 11:29:21 +053039 value: {{ include "common.mariadbPort" . | quote }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000040 - name: DB_USERNAME
Krzysztof Opasiak57431412020-03-24 23:18:49 +010041 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000042 - name: DB_PASSWORD
Krzysztof Opasiak57431412020-03-24 23:18:49 +010043 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000044 - name: DB_ADMIN_USERNAME
Krzysztof Opasiak57431412020-03-24 23:18:49 +010045 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000046 - name: DB_ADMIN_PASSWORD
Krzysztof Opasiak57431412020-03-24 23:18:49 +010047 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
seshukm610d97d2021-03-19 02:57:36 +053048 - name: MSO_KEY
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-adapter-mso-key" "key" "password") | indent 10 }}
50 - name: MSO_AUTH
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-adapter-mso-auth" "key" "password") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000052 envFrom:
53 - configMapRef:
54 name: {{ include "common.fullname" . }}-configmap
jmacc4f04d32018-10-12 18:24:24 +000055 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010056 volumeMounts:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000057 - name: logs
58 mountPath: /app/logs
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000059 - name: config
60 mountPath: /app/config
61 readOnly: true
sunilb0a97ab22020-02-25 10:18:48 +053062 - name: {{ include "common.fullname" . }}-logs
63 mountPath: /var/log/onap
seshukm0df1f8e2020-08-17 21:45:49 +053064{{ include "so.helpers.livenessProbe" .| indent 8 }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010065 ports: {{- include "common.containerPorts" . | nindent 10 }}
sunilb0a97ab22020-02-25 10:18:48 +053066 # Filebeat sidecar container
Maciej Wereskidf9ba222021-11-05 14:38:18 +000067 {{ include "common.log.sidecar" . | nindent 6 }}
farida azmy87f46222021-04-06 15:25:15 +020068 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010069 volumes:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000070 - name: logs
71 emptyDir: {}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000072 - name: config
73 configMap:
74 name: {{ include "common.fullname" . }}-app-configmap
sunilb0a97ab22020-02-25 10:18:48 +053075 - name: {{ include "common.fullname" . }}-log-conf
76 configMap:
77 name: {{ include "common.fullname" . }}-log
Maciej Wereskidf9ba222021-11-05 14:38:18 +000078 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
sunilb0a97ab22020-02-25 10:18:48 +053079 - name: {{ include "common.fullname" . }}-logs
80 emptyDir: {}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000081 imagePullSecrets:
vaibhav16dec0da88292018-08-13 06:10:27 +000082 - name: "{{ include "common.namespace" . }}-docker-registry-key"