blob: befb6098705dfcc0ab6d588dafca5430c412f44b [file] [log] [blame]
Jakub Latusekd8eaff62020-10-21 13:36:29 +02001{{/*
Mandeep Khindab1f9efe2018-03-28 19:01:55 +00002# Copyright © 2017 Amdocs, Bell Canada
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00003# Modifications Copyright © 2018 AT&T, ZTE
Andreas Geisslerdd34ead2023-03-20 17:16:45 +01004# Modifications Copyright © 2023 Deutsche Telekom
Mandeep Khindab1f9efe2018-03-28 19:01:55 +00005#
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*/}}
Mandeep Khindab1f9efe2018-03-28 19:01:55 +000018
kwasiel59cc6a42020-07-23 10:02:49 +000019apiVersion: apps/v1
Mandeep Khindaa1047f42018-03-22 02:12:15 +000020kind: Deployment
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010021metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000022spec:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010023 selector: {{- include "common.selectors" . | nindent 4 }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000024 replicas: {{ .Values.replicaCount }}
25 template:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010026 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000027 spec:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010028 initContainers:
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000029 - name: {{ include "common.name" . }}-job-completion
Sylvain Desbureaux0a1eaf32020-11-19 17:56:08 +010030 image: {{ include "repositoryGenerator.image.readiness" . }}
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000031 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
32 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020033 - /app/ready.py
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000034 args:
35 - --job-name
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010036 - {{ include "common.release" . }}-sdc-be
ChrisC32172342020-10-02 16:39:13 +020037 - "-t"
38 - "35"
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000039 env:
40 - name: NAMESPACE
41 valueFrom:
42 fieldRef:
43 apiVersion: v1
44 fieldPath: metadata.namespace
ChrisC32172342020-10-02 16:39:13 +020045 resources:
46 limits:
Andreas Geissler47537432024-02-27 08:55:23 +010047 cpu: "100m"
Andreas Geissler8cbb3d92024-03-12 16:44:56 +010048 memory: "500Mi"
ChrisC32172342020-10-02 16:39:13 +020049 requests:
Andreas Geissler47537432024-02-27 08:55:23 +010050 cpu: "3m"
Andreas Geissler8cbb3d92024-03-12 16:44:56 +010051 memory: "20Mi"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000052 containers:
53 - name: {{ include "common.name" . }}
Sylvain Desbureaux0a1eaf32020-11-19 17:56:08 +010054 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000055 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010056 ports: {{ include "common.containerPorts" . | nindent 12 }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000057 {{ if eq .Values.liveness.enabled true }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000058 livenessProbe:
59 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010060 port: {{ .Values.service.internalPort }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000061 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.liveness.periodSeconds }}
Brian Freeman6142d942019-10-02 09:50:19 -050063 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020064 successThreshold: {{ .Values.liveness.successThreshold }}
65 failureThreshold: {{ .Values.liveness.failureThreshold }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000066 {{ end }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000067 readinessProbe:
68 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010069 port: {{ .Values.service.internalPort }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000070 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.readiness.periodSeconds }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020072 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
73 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 timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
81 successThreshold: {{ .Values.startup.successThreshold }}
82 failureThreshold: {{ .Values.startup.failureThreshold }}
ChrisC32172342020-10-02 16:39:13 +020083 resources: {{ include "common.resources" . | nindent 12 }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000084 env:
85 - name: ENVNAME
ChrisC742a7b22020-09-04 11:29:57 +020086 value: {{ .Values.env.name }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000087 - name: HOST_IP
88 valueFrom:
89 fieldRef:
90 fieldPath: status.podIP
91 - name: JAVA_OPTIONS
Mandeep Khinda403c1c12018-04-19 23:15:43 +000092 value: {{ .Values.config.javaOptions }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000093 volumeMounts:
othman touijer2b764d02022-01-05 14:40:37 +010094 - name: sdc-environments
Joanna Jeremiczfe52bf52021-04-21 14:31:29 +020095 mountPath: /app/jetty/chef-solo/environments/
othman touijer2b764d02022-01-05 14:40:37 +010096 - name: localtime
Mandeep Khindaa1047f42018-03-22 02:12:15 +000097 mountPath: /etc/localtime
98 readOnly: true
Maciej Wereski771ec2a2021-10-14 13:59:12 +000099 - name: logs
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000100 mountPath: /var/log/onap
othman touijer2b764d02022-01-05 14:40:37 +0100101 - name: configs
Joanna Jeremiczfe52bf52021-04-21 14:31:29 +0200102 mountPath: /app/jetty/config/catalog-fe/plugins-configuration.yaml
shrikantawachar0c84bc32019-01-16 13:12:21 +0530103 subPath: plugins-configuration.yaml
othman touijer2b764d02022-01-05 14:40:37 +0100104 - name: logback
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000105 mountPath: /tmp/logback.xml
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +0000106 subPath: logback.xml
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000107 lifecycle:
108 postStart:
109 exec:
Joanna Jeremiczfe52bf52021-04-21 14:31:29 +0200110 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/app/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000111 # side car containers
Maciej Wereski771ec2a2021-10-14 13:59:12 +0000112 {{ include "common.log.sidecar" . | nindent 8 }}
farida azmy1383b4c2021-04-06 12:33:31 +0200113 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerdd34ead2023-03-20 17:16:45 +0100114 volumes:
othman touijer2b764d02022-01-05 14:40:37 +0100115 - name: localtime
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000116 hostPath:
117 path: /etc/localtime
Maciej Wereski771ec2a2021-10-14 13:59:12 +0000118 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
othman touijer2b764d02022-01-05 14:40:37 +0100119 - name: configs
shrikantawachar0c84bc32019-01-16 13:12:21 +0530120 configMap:
121 name : {{ include "common.fullname" . }}-plugins-configmap
122 defaultMode: 0777
othman touijer2b764d02022-01-05 14:40:37 +0100123 - name: logback
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000124 configMap:
125 name : {{ include "common.fullname" . }}-logging-configmap
othman touijer2b764d02022-01-05 14:40:37 +0100126 - name: sdc-environments
127 {{- if .Values.global.aafEnabled }}
128 emptyDir: { medium: "Memory" }
129 - name: sdc-environments-input
130 {{- end }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000131 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100132 name: {{ include "common.release" . }}-sdc-environments-configmap
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000133 defaultMode: 0755
Maciej Wereski771ec2a2021-10-14 13:59:12 +0000134 - name: logs
Mandeep Khindaa1047f42018-03-22 02:12:15 +0000135 emptyDir: {}
136 imagePullSecrets:
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +0000137 - name: "{{ include "common.namespace" . }}-docker-registry-key"