2 # Copyright © 2018 Amdocs, Bell Canada
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
30 app: {{ include "common.name" . }}
31 replicas: {{ .Values.replicaCount }}
35 app: {{ include "common.name" . }}
36 release: {{ include "common.release" . }}
38 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
39 - name: {{ include "common.name" . }}-readiness
50 fieldPath: metadata.namespace
51 image: {{ include "repositoryGenerator.image.readiness" . }}
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 {{- if .Values.global.aafEnabled }}
61 - name: {{ include "common.fullname" . }}-move-cert
67 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /sdc-certs/{{ .Values.certInitializer.keystoreFile }}
68 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /sdc-certs/{{ .Values.certInitializer.truststoreFile }}
69 cp {{ .Values.certInitializer.credsPath }}/mycreds.prop /sdc-certs/mycreds.prop
70 image: {{ include "repositoryGenerator.image.busybox" . }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
84 - name: {{ include "common.name" . }}
85 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
86 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
87 {{- if .Values.global.aafEnabled }}
93 export $(grep '^c' /sdc-certs/mycreds.prop | xargs -0)
94 export KEYSTORE_PASS=$cadi_keystore_password_p12
95 export TRUSTSTORE_PASS=$cadi_truststore_password
96 export KEYSTORE_PATH=/etc/{{ .Values.certInitializer.keystoreFile }}
97 export TRUSTSTORE_PATH=/etc/{{ .Values.certInitializer.truststoreFile }}
101 - containerPort: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
102 {{ if .Values.liveness.enabled }}
105 port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
106 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
107 periodSeconds: {{ .Values.liveness.periodSeconds }}
108 successThreshold: {{ .Values.liveness.successThreshold }}
109 failureThreshold: {{ .Values.liveness.failureThreshold }}
113 port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
114 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
115 periodSeconds: {{ .Values.readiness.periodSeconds }}
116 successThreshold: {{ .Values.readiness.successThreshold }}
117 failureThreshold: {{ .Values.readiness.failureThreshold }}
120 port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort2 .Values.service.internalPort }}
121 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
122 periodSeconds: {{ .Values.startup.periodSeconds }}
123 successThreshold: {{ .Values.startup.successThreshold }}
124 failureThreshold: {{ .Values.startup.failureThreshold }}
127 value: {{ .Values.env.name }}
129 value: {{ .Values.config.javaOptions }}
131 value: "{{ (eq "true" (include "common.needTLS" .)) | ternary .Values.config.backendServerURL.https .Values.config.backendServerURL.http }}"
133 value: "{{ (eq "true" (include "common.needTLS" .)) | ternary "true" "false" }}"
134 {{- if and (include "common.needTLS" .) (eq .Values.security.isDefaultStore false) }}
136 value: "{{ .Values.config.isTrustAll}}"
139 - name: {{ include "common.fullname" . }}-localtime
140 mountPath: /etc/localtime
142 {{- if .Values.global.aafEnabled }}
144 mountPath: /sdc-certs/mycreds.prop
145 subPath: mycreds.prop
147 mountPath: /var/lib/jetty/etc/{{ .Values.certInitializer.keystoreFile }}
148 subPath: {{ .Values.certInitializer.keystoreFile }}
150 mountPath: /var/lib/jetty/etc/{{ .Values.certInitializer.truststoreFile }}
151 subPath: {{ .Values.certInitializer.truststoreFile }}
153 resources: {{ include "common.resources" . | nindent 12 }}
154 {{- if .Values.nodeSelector }}
156 {{ toYaml .Values.nodeSelector | indent 10 }}
158 {{- if .Values.affinity }}
160 {{ toYaml .Values.affinity | indent 10 }}
162 # side car containers
163 {{ include "common.log.sidecar" . | nindent 8 }}
164 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
165 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
166 - name: {{ include "common.fullname" . }}-localtime
169 {{- if .Values.global.aafEnabled }}
174 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
178 - name: "{{ include "common.namespace" . }}-docker-registry-key"