Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, AT&T, Bell Canada |
| 3 | # Modifications Copyright © 2018 ZTE |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 4 | # Modifications Copyright © 2023 Deutsche Telekom |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 17 | */}} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 18 | |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 19 | apiVersion: apps/v1 |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 20 | kind: Deployment |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 21 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 22 | spec: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 23 | selector: {{- include "common.selectors" . | nindent 4 }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 24 | replicas: {{ .Values.replicaCount }} |
| 25 | template: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 26 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 27 | spec: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 28 | initContainers: |
priyanshu | 617e90b | 2019-03-14 12:56:55 +0530 | [diff] [blame] | 29 | {{- if .Values.initJob.enabled }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 30 | - name: {{ include "common.name" . }}-job-completion |
Sylvain Desbureaux | 0a1eaf3 | 2020-11-19 17:56:08 +0100 | [diff] [blame] | 31 | image: {{ include "repositoryGenerator.image.readiness" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 32 | imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" |
| 33 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 34 | - /app/ready.py |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 35 | args: |
| 36 | - --job-name |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 37 | - {{ include "common.fullname" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 38 | env: |
| 39 | - name: NAMESPACE |
| 40 | valueFrom: |
| 41 | fieldRef: |
| 42 | apiVersion: v1 |
| 43 | fieldPath: metadata.namespace |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 44 | resources: |
| 45 | limits: |
| 46 | cpu: 100m |
| 47 | memory: 100Mi |
| 48 | requests: |
| 49 | cpu: 3m |
| 50 | memory: 20Mi |
priyanshu | 9be6347 | 2019-03-13 14:43:36 +0530 | [diff] [blame] | 51 | {{ end }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 52 | containers: |
| 53 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 0a1eaf3 | 2020-11-19 17:56:08 +0100 | [diff] [blame] | 54 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 55 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 56 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 57 | # disable liveness probe when breakpoints set in debugger |
| 58 | # so K8s doesn't restart unresponsive container |
| 59 | {{ if .Values.liveness.enabled }} |
| 60 | livenessProbe: |
| 61 | tcpSocket: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 62 | port: {{ .Values.service.internalPort }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 63 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 64 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Sylvain Desbureaux | 8c9416b | 2021-05-05 11:12:48 +0200 | [diff] [blame] | 65 | successThreshold: {{ .Values.liveness.successThreshold }} |
| 66 | failureThreshold: {{ .Values.liveness.failureThreshold }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 67 | {{ end }} |
| 68 | readinessProbe: |
| 69 | tcpSocket: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 70 | port: {{ .Values.service.internalPort }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 71 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 72 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Sylvain Desbureaux | 8c9416b | 2021-05-05 11:12:48 +0200 | [diff] [blame] | 73 | successThreshold: {{ .Values.readiness.successThreshold }} |
| 74 | failureThreshold: {{ .Values.readiness.failureThreshold }} |
| 75 | startupProbe: |
| 76 | tcpSocket: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 77 | port: {{ .Values.service.internalPort }} |
Sylvain Desbureaux | 8c9416b | 2021-05-05 11:12:48 +0200 | [diff] [blame] | 78 | initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }} |
| 79 | periodSeconds: {{ .Values.startup.periodSeconds }} |
| 80 | successThreshold: {{ .Values.startup.successThreshold }} |
| 81 | failureThreshold: {{ .Values.startup.failureThreshold }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 82 | env: |
| 83 | - name: JAVA_OPTIONS |
| 84 | value: {{ .Values.config.javaOptions }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 85 | - name: CS_HOSTS |
Andreas Geissler | fd450c4 | 2021-12-10 08:36:45 +0000 | [diff] [blame] | 86 | value: "{{ .Values.global.sdc_cassandra.serviceName }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 87 | - name: CS_PORT |
| 88 | value: "{{ .Values.config.cassandraClientPort }}" |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 89 | - name: CS_AUTHENTICATE |
| 90 | value: "{{ .Values.config.cassandraAuthenticationEnabled }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 91 | - name: CS_USER |
| 92 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 93 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 94 | - name: CS_PASSWORD |
| 95 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 96 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password} |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 97 | - name: CS_SSL_ENABLED |
| 98 | value: "{{ .Values.config.cassandraSSLEnabled }}" |
| 99 | - name: CS_TRUST_STORE_PATH |
| 100 | value: "{{ .Values.config.cassandraTrustStorePath }}" |
| 101 | - name: CS_TRUST_STORE_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 102 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 103 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_truststore_password} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 104 | - name: SDC_PROTOCOL |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 105 | value: "HTTP" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 106 | - name: SDC_ENDPOINT |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 107 | value: "{{ .Values.config.sdcEndpoint.http }}" |
priyanshu | c00acbb | 2018-09-06 11:29:23 +0530 | [diff] [blame] | 108 | - name: SDC_USER |
| 109 | value: "{{ .Values.config.sdcExternalUser }}" |
| 110 | - name: SDC_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 111 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 112 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: wf_external_user_password} |
othman touijer | 2b764d0 | 2022-01-05 14:40:37 +0100 | [diff] [blame] | 113 | - name: SERVER_SSL_ENABLED |
| 114 | value: "false" |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 115 | resources: {{ include "common.resources" . | nindent 12 }} |
farida azmy | 1383b4c | 2021-04-06 12:33:31 +0200 | [diff] [blame] | 116 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 117 | imagePullSecrets: |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 118 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |