blob: da620359dae442f692adc5f1f6f8c07d4171114e [file] [log] [blame]
Jakub Latusekd8eaff62020-10-21 13:36:29 +02001{{/*
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Copyright © 2017 Amdocs, AT&T, Bell Canada
3# Modifications Copyright © 2018 ZTE
Andreas Geisslerdd34ead2023-03-20 17:16:45 +01004# Modifications Copyright © 2023 Deutsche Telekom
priyanshua1b061392018-05-29 12:50:14 +05305#
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 Latusekd8eaff62020-10-21 13:36:29 +020017*/}}
priyanshua1b061392018-05-29 12:50:14 +053018
kwasiel59cc6a42020-07-23 10:02:49 +000019apiVersion: apps/v1
priyanshua1b061392018-05-29 12:50:14 +053020kind: Deployment
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010021metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
priyanshua1b061392018-05-29 12:50:14 +053022spec:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010023 selector: {{- include "common.selectors" . | nindent 4 }}
priyanshua1b061392018-05-29 12:50:14 +053024 replicas: {{ .Values.replicaCount }}
25 template:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010026 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
priyanshua1b061392018-05-29 12:50:14 +053027 spec:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010028 initContainers:
priyanshu617e90b2019-03-14 12:56:55 +053029 {{- if .Values.initJob.enabled }}
priyanshua1b061392018-05-29 12:50:14 +053030 - name: {{ include "common.name" . }}-job-completion
Sylvain Desbureaux0a1eaf32020-11-19 17:56:08 +010031 image: {{ include "repositoryGenerator.image.readiness" . }}
priyanshua1b061392018-05-29 12:50:14 +053032 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
33 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020034 - /app/ready.py
priyanshua1b061392018-05-29 12:50:14 +053035 args:
36 - --job-name
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010037 - {{ include "common.fullname" . }}
priyanshua1b061392018-05-29 12:50:14 +053038 env:
39 - name: NAMESPACE
40 valueFrom:
41 fieldRef:
42 apiVersion: v1
43 fieldPath: metadata.namespace
ChrisC32172342020-10-02 16:39:13 +020044 resources:
45 limits:
46 cpu: 100m
47 memory: 100Mi
48 requests:
49 cpu: 3m
50 memory: 20Mi
priyanshu9be63472019-03-13 14:43:36 +053051 {{ end }}
priyanshua1b061392018-05-29 12:50:14 +053052 containers:
53 - name: {{ include "common.name" . }}
Sylvain Desbureaux0a1eaf32020-11-19 17:56:08 +010054 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
priyanshua1b061392018-05-29 12:50:14 +053055 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010056 ports: {{ include "common.containerPorts" . | nindent 12 }}
priyanshua1b061392018-05-29 12:50:14 +053057 # 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 Geisslerdd34ead2023-03-20 17:16:45 +010062 port: {{ .Values.service.internalPort }}
priyanshua1b061392018-05-29 12:50:14 +053063 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.liveness.periodSeconds }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020065 successThreshold: {{ .Values.liveness.successThreshold }}
66 failureThreshold: {{ .Values.liveness.failureThreshold }}
priyanshua1b061392018-05-29 12:50:14 +053067 {{ end }}
68 readinessProbe:
69 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010070 port: {{ .Values.service.internalPort }}
priyanshua1b061392018-05-29 12:50:14 +053071 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
72 periodSeconds: {{ .Values.readiness.periodSeconds }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020073 successThreshold: {{ .Values.readiness.successThreshold }}
74 failureThreshold: {{ .Values.readiness.failureThreshold }}
75 startupProbe:
76 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010077 port: {{ .Values.service.internalPort }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020078 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
79 periodSeconds: {{ .Values.startup.periodSeconds }}
80 successThreshold: {{ .Values.startup.successThreshold }}
81 failureThreshold: {{ .Values.startup.failureThreshold }}
priyanshua1b061392018-05-29 12:50:14 +053082 env:
83 - name: JAVA_OPTIONS
84 value: {{ .Values.config.javaOptions }}
priyanshu3af9db62018-08-16 16:23:52 +053085 - name: CS_HOSTS
Andreas Geisslerfd450c42021-12-10 08:36:45 +000086 value: "{{ .Values.global.sdc_cassandra.serviceName }}"
priyanshu3af9db62018-08-16 16:23:52 +053087 - name: CS_PORT
88 value: "{{ .Values.config.cassandraClientPort }}"
priyanshubd7fbe22019-03-20 12:45:21 +053089 - name: CS_AUTHENTICATE
90 value: "{{ .Values.config.cassandraAuthenticationEnabled }}"
priyanshu3af9db62018-08-16 16:23:52 +053091 - name: CS_USER
92 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010093 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user}
priyanshu3af9db62018-08-16 16:23:52 +053094 - name: CS_PASSWORD
95 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010096 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password}
priyanshubd7fbe22019-03-20 12:45:21 +053097 - 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
IlanaPc80bff92019-11-18 21:10:08 +0200102 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100103 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_truststore_password}
priyanshu3af9db62018-08-16 16:23:52 +0530104 - name: SDC_PROTOCOL
Andreas Geisslerdd34ead2023-03-20 17:16:45 +0100105 value: "HTTP"
priyanshu3af9db62018-08-16 16:23:52 +0530106 - name: SDC_ENDPOINT
Andreas Geisslerdd34ead2023-03-20 17:16:45 +0100107 value: "{{ .Values.config.sdcEndpoint.http }}"
priyanshuc00acbb2018-09-06 11:29:23 +0530108 - name: SDC_USER
109 value: "{{ .Values.config.sdcExternalUser }}"
110 - name: SDC_PASSWORD
IlanaPc80bff92019-11-18 21:10:08 +0200111 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100112 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: wf_external_user_password}
othman touijer2b764d02022-01-05 14:40:37 +0100113 - name: SERVER_SSL_ENABLED
114 value: "false"
ChrisC32172342020-10-02 16:39:13 +0200115 resources: {{ include "common.resources" . | nindent 12 }}
farida azmy1383b4c2021-04-06 12:33:31 +0200116 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
priyanshua1b061392018-05-29 12:50:14 +0530117 imagePullSecrets:
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +0000118 - name: "{{ include "common.namespace" . }}-docker-registry-key"