2 # Copyright © 2017 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 sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
45 - "{{ include "common.release" . }}-{{ include "common.name" . }}-config-job"
51 fieldPath: metadata.namespace
52 image: {{ include "repositoryGenerator.image.readiness" . }}
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 name: {{ include "common.name" . }}-job-readiness
55 {{ if .Values.config.msb_enabled }}
56 {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for.msb ) | indent 6 | trim }}
61 - chown -R 1000:1000 /service/modeling/etsicatalog/static
62 image: {{ include "repositoryGenerator.image.busybox" . }}
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 name: {{ include "common.name" . }}-init
66 - name: {{ include "common.fullname" . }}-etsicatalog
67 mountPath: /service/modeling/etsicatalog/static
69 - name: {{ include "common.name" . }}
70 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 - containerPort: {{ .Values.service.internalPort }}
74 # disable liveness probe when breakpoints set in debugger
75 # so K8s doesn't restart unresponsive container
76 {{ if .Values.liveness.enabled }}
79 port: {{ .Values.service.internalPort }}
80 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.liveness.periodSeconds }}
85 port: {{ .Values.service.internalPort }}
86 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
87 periodSeconds: {{ .Values.readiness.periodSeconds }}
89 {{- if and (include "common.needTLS" .) (eq .Values.config.ssl_enabled true) }}
97 value: "{{ .Values.config.msb_enabled }}"
98 {{- if (include "common.needTLS" .) }}
100 value: "{{ .Values.config.msbProtocol }}s://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPort }}"
102 value: "{{ .Values.config.sdcProtocol }}s://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPort }}"
105 value: "{{ .Values.config.msbProtocol }}://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPlainPort }}"
107 value: "{{ .Values.config.sdcProtocol }}://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPlainPort }}"
109 - name: DMAAP_ENABLED
110 value: "{{ .Values.config.dmaap_enabled }}"
112 value: "{{ .Values.config.dmaapProtocol }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}://{{ .Values.config.dmaapServiceName }}:{{ .Values.config.dmaapPort }}"
114 value: "{{ include "common.mariadbService" . }}"
116 value: "{{ include "common.mariadbPort" . }}"
118 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "login") | indent 12 }}
120 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "password") | indent 12 }}
122 - name: {{ include "common.fullname" . }}-etsicatalog
123 mountPath: /service/modeling/etsicatalog/static
124 - name: {{ include "common.fullname" . }}-localtime
125 mountPath: /etc/localtime
127 - name: {{ include "common.fullname" . }}-logs
128 mountPath: {{ .Values.log.path }}
129 - name: {{ include "common.fullname" . }}-logconfig
130 mountPath: /opt/modeling/etsicatalog/config/log.yml
133 {{ include "common.resources" . | indent 12 }}
134 {{- if .Values.nodeSelector }}
136 {{ toYaml .Values.nodeSelector | indent 10 }}
138 {{- if .Values.affinity }}
140 {{ toYaml .Values.affinity | indent 10 }}
143 # side car containers
144 {{ include "common.log.sidecar" . | nindent 8 }}
145 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
147 - name: {{ include "common.fullname" . }}-etsicatalog
148 {{- if .Values.persistence.enabled }}
149 persistentVolumeClaim:
150 claimName: {{ include "common.fullname" . }}
154 - name: {{ include "common.fullname" . }}-localtime
157 - name: {{ include "common.fullname" . }}-logs
159 - name: {{ include "common.fullname" . }}-logconfig
161 name : {{ include "common.fullname" . }}-logging-configmap
163 {{ include "common.log.volumes" . | nindent 8 }}
165 - name: "{{ include "common.namespace" . }}-docker-registry-key"