Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 1 | {{/* |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 2 | # Copyright © 2018 Amdocs, AT&T |
| 3 | # Modifications Copyright © 2018 Bell Canada |
Sylvain Desbureaux | 6212bb2 | 2021-01-18 11:43:33 +0100 | [diff] [blame] | 4 | # Modifications Copyright © 2020,2021 Orange |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 5 | # Modifications Copyright © 2023 Nordix Foundation |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 6 | # |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 18 | */}} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 19 | |
| 20 | apiVersion: apps/v1 |
| 21 | kind: Deployment |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 22 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 23 | spec: |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 24 | selector: {{- include "common.selectors" . | nindent 4 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 25 | replicas: {{ .Values.replicaCount }} |
Rommel Pawar | 63db716 | 2022-11-16 10:11:24 -0800 | [diff] [blame] | 26 | strategy: |
| 27 | type: {{ .Values.updateStrategy.type }} |
| 28 | {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }} |
| 29 | rollingUpdate: |
| 30 | maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }} |
| 31 | maxSurge: {{ .Values.updateStrategy.maxSurge }} |
| 32 | {{- end }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 33 | template: |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 34 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 35 | spec: |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 36 | containers: |
| 37 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 5b65132 | 2020-12-07 15:34:15 +0100 | [diff] [blame] | 38 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 39 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 40 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 41 | # disable liveness probe when breakpoints set in debugger |
| 42 | # so K8s doesn't restart unresponsive container |
| 43 | {{ if .Values.liveness.enabled }} |
| 44 | livenessProbe: |
| 45 | tcpSocket: |
| 46 | port: {{ .Values.service.internalPort }} |
| 47 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 48 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 49 | {{ end }} |
| 50 | readinessProbe: |
| 51 | tcpSocket: |
| 52 | port: {{ .Values.service.internalPort }} |
| 53 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 54 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 55 | env: |
othman touijer | 5ef62c1 | 2021-12-03 09:45:37 +0100 | [diff] [blame] | 56 | - name: KEY_STORE_PASSWORD |
| 57 | value: NotUsed |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 58 | - name: CONFIG_HOME |
| 59 | value: /opt/app/babel/config |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 60 | volumeMounts: |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 61 | - mountPath: /etc/localtime |
| 62 | name: localtime |
| 63 | readOnly: true |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 64 | - mountPath: /opt/app/babel/config/application.properties |
| 65 | name: config |
| 66 | subPath: application.properties |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 67 | - mountPath: /opt/app/babel/config/artifact-generator.properties |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 68 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 69 | subPath: artifact-generator.properties |
| 70 | - mountPath: /opt/app/babel/config/tosca-mappings.json |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 71 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 72 | subPath: tosca-mappings.json |
| 73 | - mountPath: /opt/app/babel/config/babel-auth.properties |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 74 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 75 | subPath: babel-auth.properties |
| 76 | - mountPath: /opt/app/babel/config/auth |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 77 | name: secrets |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 78 | - mountPath: {{ .Values.log.path }} |
| 79 | name: logs |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 80 | - mountPath: /opt/app/babel/config/logback.xml |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 81 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 82 | subPath: logback.xml |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 83 | resources: {{ include "common.resources" . | nindent 12 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 84 | {{- if .Values.nodeSelector }} |
| 85 | nodeSelector: |
| 86 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 87 | {{- end -}} |
| 88 | {{- if .Values.affinity }} |
| 89 | affinity: |
| 90 | {{ toYaml .Values.affinity | indent 8 }} |
| 91 | {{- end }} |
| 92 | |
| 93 | # side car containers |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 94 | {{ include "common.log.sidecar" . | nindent 8 }} |
farida azmy | d893733 | 2021-03-09 12:20:42 +0200 | [diff] [blame] | 95 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 96 | volumes: |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 97 | - name: localtime |
| 98 | hostPath: |
| 99 | path: /etc/localtime |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 100 | - name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 101 | configMap: |
| 102 | name: {{ include "common.fullname" . }}-configmap |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 103 | - name: secrets |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 104 | secret: |
| 105 | secretName: {{ include "common.fullname" . }}-babel-secrets |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 106 | - name: logs |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 107 | emptyDir: {} |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 108 | {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 109 | |
| 110 | imagePullSecrets: |
| 111 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |