2 # Copyright © 2018 Amdocs, AT&T
3 # Modifications Copyright © 2018 Bell Canada
4 # Modifications Copyright © 2020,2021 Orange
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
35 type: {{ .Values.updateStrategy.type }}
36 {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
38 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
39 maxSurge: {{ .Values.updateStrategy.maxSurge }}
44 app: {{ include "common.name" . }}
45 release: {{ include "common.release" . }}
47 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
49 - name: {{ include "common.name" . }}
50 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 {{- if .Values.global.aafEnabled }}
58 echo "*** retrieve Truststore and Keystore password"
59 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
60 echo "*** actual launch of AAI Babel"
61 /bin/bash /opt/app/babel/bin/start.sh
64 - containerPort: {{ .Values.service.internalPort }}
65 # disable liveness probe when breakpoints set in debugger
66 # so K8s doesn't restart unresponsive container
67 {{ if .Values.liveness.enabled }}
70 port: {{ .Values.service.internalPort }}
71 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
72 periodSeconds: {{ .Values.liveness.periodSeconds }}
76 port: {{ .Values.service.internalPort }}
77 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.readiness.periodSeconds }}
80 {{- if not (include "common.needTLS" .) }}
81 - name: KEY_STORE_PASSWORD
85 value: /opt/app/babel/config
86 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
87 - mountPath: /etc/localtime
90 - mountPath: /opt/app/babel/config/application.properties
92 subPath: application.properties
93 - mountPath: /opt/app/babel/config/artifact-generator.properties
95 subPath: artifact-generator.properties
96 - mountPath: /opt/app/babel/config/tosca-mappings.json
98 subPath: tosca-mappings.json
99 - mountPath: /opt/app/babel/config/babel-auth.properties
101 subPath: babel-auth.properties
102 - mountPath: /opt/app/babel/config/auth
104 - mountPath: {{ .Values.log.path }}
106 - mountPath: /opt/app/babel/config/logback.xml
110 {{ include "common.resources" . }}
111 {{- if .Values.nodeSelector }}
113 {{ toYaml .Values.nodeSelector | indent 8 }}
115 {{- if .Values.affinity }}
117 {{ toYaml .Values.affinity | indent 8 }}
120 # side car containers
121 {{ include "common.log.sidecar" . | nindent 8 }}
122 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
123 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
129 name: {{ include "common.fullname" . }}-configmap
132 secretName: {{ include "common.fullname" . }}-babel-secrets
135 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
138 - name: "{{ include "common.namespace" . }}-docker-registry-key"