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 }} |
Fiete Ostkamp | 464b650 | 2024-08-06 15:00:30 +0200 | [diff] [blame^] | 26 | revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} |
Rommel Pawar | 63db716 | 2022-11-16 10:11:24 -0800 | [diff] [blame] | 27 | strategy: |
| 28 | type: {{ .Values.updateStrategy.type }} |
| 29 | {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }} |
| 30 | rollingUpdate: |
| 31 | maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }} |
| 32 | maxSurge: {{ .Values.updateStrategy.maxSurge }} |
| 33 | {{- end }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 34 | template: |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 35 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 36 | spec: |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 37 | containers: |
| 38 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 5b65132 | 2020-12-07 15:34:15 +0100 | [diff] [blame] | 39 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 40 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | 5846a6e | 2023-03-30 17:26:14 +0200 | [diff] [blame] | 41 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 42 | # disable liveness probe when breakpoints set in debugger |
| 43 | # so K8s doesn't restart unresponsive container |
| 44 | {{ if .Values.liveness.enabled }} |
| 45 | livenessProbe: |
| 46 | tcpSocket: |
| 47 | port: {{ .Values.service.internalPort }} |
| 48 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 49 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 50 | {{ end }} |
| 51 | readinessProbe: |
| 52 | tcpSocket: |
| 53 | port: {{ .Values.service.internalPort }} |
| 54 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 55 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 56 | env: |
othman touijer | 5ef62c1 | 2021-12-03 09:45:37 +0100 | [diff] [blame] | 57 | - name: KEY_STORE_PASSWORD |
| 58 | value: NotUsed |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 59 | - name: CONFIG_HOME |
| 60 | value: /opt/app/babel/config |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 61 | volumeMounts: |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 62 | - mountPath: /opt/app/babel/config/application.properties |
| 63 | name: config |
| 64 | subPath: application.properties |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 65 | - mountPath: /opt/app/babel/config/artifact-generator.properties |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 66 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 67 | subPath: artifact-generator.properties |
| 68 | - mountPath: /opt/app/babel/config/tosca-mappings.json |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 69 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 70 | subPath: tosca-mappings.json |
| 71 | - mountPath: /opt/app/babel/config/babel-auth.properties |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 72 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 73 | subPath: babel-auth.properties |
| 74 | - mountPath: /opt/app/babel/config/auth |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 75 | name: secrets |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 76 | - mountPath: {{ .Values.log.path }} |
| 77 | name: logs |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 78 | - mountPath: /opt/app/babel/config/logback.xml |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 79 | name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 80 | subPath: logback.xml |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 81 | resources: {{ include "common.resources" . | nindent 12 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 82 | {{- if .Values.nodeSelector }} |
| 83 | nodeSelector: |
| 84 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 85 | {{- end -}} |
| 86 | {{- if .Values.affinity }} |
| 87 | affinity: |
| 88 | {{ toYaml .Values.affinity | indent 8 }} |
| 89 | {{- end }} |
| 90 | |
| 91 | # side car containers |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 92 | {{ include "common.log.sidecar" . | nindent 8 }} |
farida azmy | d893733 | 2021-03-09 12:20:42 +0200 | [diff] [blame] | 93 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 94 | volumes: |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 95 | - name: config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 96 | configMap: |
| 97 | name: {{ include "common.fullname" . }}-configmap |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 98 | - name: secrets |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 99 | secret: |
| 100 | secretName: {{ include "common.fullname" . }}-babel-secrets |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 101 | - name: logs |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 102 | emptyDir: {} |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 103 | {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 104 | |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame] | 105 | {{- include "common.imagePullSecrets" . | nindent 6 }} |