blob: b8c32b33edc3bb6b56ead2aa8acb2e8877354001 [file] [log] [blame]
Jakub Latusek67f4e8d2020-10-21 13:36:29 +02001{{/*
Fiachra Corcoranbe966552018-08-07 16:58:45 +01002# Copyright © 2017 Amdocs, Bell Canada
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 Latusek67f4e8d2020-10-21 13:36:29 +020015*/}}
Grzegorz-Lisb1da7722020-07-23 09:32:48 +020016apiVersion: apps/v1
Fiachra Corcoranbe966552018-08-07 16:58:45 +010017kind: Deployment
efiacor2123fec2022-12-09 13:40:55 +000018metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010019spec:
efiacor2123fec2022-12-09 13:40:55 +000020 selector: {{- include "common.selectors" . | nindent 4 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010021 template:
efiacor2123fec2022-12-09 13:40:55 +000022 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010023 spec:
rope252f2db5c12022-01-10 14:15:16 +000024 {{ include "common.podSecurityContext" . | indent 6 | trim}}
efiacor2123fec2022-12-09 13:40:55 +000025 initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010026 containers:
27 - name: {{ include "common.name" . }}
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010028 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010029 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
efiacor2123fec2022-12-09 13:40:55 +000030 ports: {{ include "common.containerPorts" . | nindent 12 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010031 {{- if eq .Values.liveness.enabled true }}
32 livenessProbe:
efiacor2123fec2022-12-09 13:40:55 +000033 httpGet:
34 port: {{ .Values.liveness.port }}
35 path: /internal/prov
Fiachra Corcoranbe966552018-08-07 16:58:45 +010036 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
37 periodSeconds: {{ .Values.liveness.periodSeconds }}
38 {{ end -}}
39 readinessProbe:
efiacor2123fec2022-12-09 13:40:55 +000040 httpGet:
41 port: {{ .Values.liveness.port }}
42 path: /internal/prov
43 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
44 periodSeconds: {{ .Values.liveness.periodSeconds }}
Krzysztof Opasiake55b4d52020-02-07 22:54:20 +010045 env:
46 - name: DB_USERNAME
Mahmoud Abdelhamid7fc530c2021-09-15 20:27:19 +020047 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-credentials" "key" "login") | indent 12 }}
Krzysztof Opasiake55b4d52020-02-07 22:54:20 +010048 - name: DB_PASSWORD
Mahmoud Abdelhamid7fc530c2021-09-15 20:27:19 +020049 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-credentials" "key" "password") | indent 12 }}
efiacor2123fec2022-12-09 13:40:55 +000050 volumeMounts:
51 - mountPath: /etc/localtime
52 name: localtime
53 readOnly: false
54 - mountPath: /opt/app/datartr/etc/provserver.properties
55 name: {{ include "common.fullname" . }}-config
56 subPath: provserver.properties
57 - mountPath: /opt/app/datartr/etc/logback.xml
58 name: {{ include "common.fullname" . }}-log-conf
59 subPath: logback.xml
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010060 resources: {{ include "common.resources" . | nindent 12 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010061 {{- if .Values.nodeSelector }}
62 nodeSelector:
63{{ toYaml .Values.nodeSelector | indent 10 }}
64 {{- end -}}
65 {{- if .Values.affinity }}
66 affinity:
67{{ toYaml .Values.affinity | indent 10 }}
Sylvain Desbureauxe6153432021-02-04 18:26:23 +010068 {{- end }}
farida azmy13388ba2021-03-17 11:33:28 +020069 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
efiacor2123fec2022-12-09 13:40:55 +000070 volumes:
Fiachra Corcoranbe966552018-08-07 16:58:45 +010071 - name: localtime
72 hostPath:
73 path: /etc/localtime
efiacoreabb6522019-04-08 09:46:09 +000074 - name: {{ include "common.fullname" . }}-config
Fiachra Corcoranbe966552018-08-07 16:58:45 +010075 configMap:
efiacoreabb6522019-04-08 09:46:09 +000076 name: {{ include "common.fullname" . }}-configmap
77 items:
78 - key: provserver.properties
79 path: provserver.properties
econwar378cf192019-01-08 16:19:59 +000080 - name: {{ include "common.fullname" . }}-log-conf
81 configMap:
82 name: {{ include "common.fullname" . }}-log
Sylvain Desbureaux435ef532018-12-20 10:58:09 +010083 imagePullSecrets:
84 - name: "{{ include "common.namespace" . }}-docker-registry-key"