Jakub Latusek | 67f4e8d | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 2 | # 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 Latusek | 67f4e8d | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 15 | */}} |
Grzegorz-Lis | b1da772 | 2020-07-23 09:32:48 +0200 | [diff] [blame] | 16 | apiVersion: apps/v1 |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 17 | kind: Deployment |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 18 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 19 | spec: |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 20 | selector: {{- include "common.selectors" . | nindent 4 }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 21 | template: |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 22 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 23 | spec: |
rope252 | f2db5c1 | 2022-01-10 14:15:16 +0000 | [diff] [blame] | 24 | {{ include "common.podSecurityContext" . | indent 6 | trim}} |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 25 | initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 26 | containers: |
| 27 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 6b09654 | 2020-11-21 22:51:24 +0100 | [diff] [blame] | 28 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 29 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 30 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 31 | {{- if eq .Values.liveness.enabled true }} |
| 32 | livenessProbe: |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 33 | httpGet: |
| 34 | port: {{ .Values.liveness.port }} |
| 35 | path: /internal/prov |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 36 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 37 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 38 | {{ end -}} |
| 39 | readinessProbe: |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 40 | httpGet: |
| 41 | port: {{ .Values.liveness.port }} |
| 42 | path: /internal/prov |
| 43 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 44 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Krzysztof Opasiak | e55b4d5 | 2020-02-07 22:54:20 +0100 | [diff] [blame] | 45 | env: |
| 46 | - name: DB_USERNAME |
Mahmoud Abdelhamid | 7fc530c | 2021-09-15 20:27:19 +0200 | [diff] [blame] | 47 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-credentials" "key" "login") | indent 12 }} |
Krzysztof Opasiak | e55b4d5 | 2020-02-07 22:54:20 +0100 | [diff] [blame] | 48 | - name: DB_PASSWORD |
Mahmoud Abdelhamid | 7fc530c | 2021-09-15 20:27:19 +0200 | [diff] [blame] | 49 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-credentials" "key" "password") | indent 12 }} |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 50 | 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 |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame^] | 60 | resources: {{ include "common.resources" . | nindent 12 }} |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 61 | {{- 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 Desbureaux | e615343 | 2021-02-04 18:26:23 +0100 | [diff] [blame] | 68 | {{- end }} |
farida azmy | 13388ba | 2021-03-17 11:33:28 +0200 | [diff] [blame] | 69 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 70 | volumes: |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 71 | - name: localtime |
| 72 | hostPath: |
| 73 | path: /etc/localtime |
efiacor | eabb652 | 2019-04-08 09:46:09 +0000 | [diff] [blame] | 74 | - name: {{ include "common.fullname" . }}-config |
Fiachra Corcoran | be96655 | 2018-08-07 16:58:45 +0100 | [diff] [blame] | 75 | configMap: |
efiacor | eabb652 | 2019-04-08 09:46:09 +0000 | [diff] [blame] | 76 | name: {{ include "common.fullname" . }}-configmap |
| 77 | items: |
| 78 | - key: provserver.properties |
| 79 | path: provserver.properties |
econwar | 378cf19 | 2019-01-08 16:19:59 +0000 | [diff] [blame] | 80 | - name: {{ include "common.fullname" . }}-log-conf |
| 81 | configMap: |
| 82 | name: {{ include "common.fullname" . }}-log |
Sylvain Desbureaux | 435ef53 | 2018-12-20 10:58:09 +0100 | [diff] [blame] | 83 | imagePullSecrets: |
| 84 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |