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}}"
44 {{- if .Values.global.mariadbGalera.localCluster }}
46 - {{ index .Values "mariadb-galera" "nameOverride" }}
49 - {{ include "common.release" . }}-etsicatalog-db-config-job
56 fieldPath: metadata.namespace
57 image: {{ include "repositoryGenerator.image.readiness" . }}
58 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
59 name: {{ include "common.name" . }}-job-readiness
67 {{ if .Values.config.msb_enabled }}
68 {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for.msb ) | indent 6 | trim }}
73 - chown -R 1000:1000 /service/modeling/etsicatalog/static
74 image: {{ include "repositoryGenerator.image.busybox" . }}
75 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
76 name: {{ include "common.name" . }}-init
78 - name: {{ include "common.fullname" . }}-etsicatalog
79 mountPath: /service/modeling/etsicatalog/static
81 - name: {{ include "common.name" . }}
82 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
83 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 - containerPort: {{ .Values.service.internalPort }}
86 # disable liveness probe when breakpoints set in debugger
87 # so K8s doesn't restart unresponsive container
88 {{ if .Values.liveness.enabled }}
91 port: {{ .Values.service.internalPort }}
92 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
93 periodSeconds: {{ .Values.liveness.periodSeconds }}
97 port: {{ .Values.service.internalPort }}
98 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.readiness.periodSeconds }}
101 {{- if and (include "common.needTLS" .) (eq .Values.config.ssl_enabled true) }}
109 value: "{{ .Values.config.msb_enabled }}"
110 {{- if (include "common.needTLS" .) }}
112 value: "{{ .Values.config.msbProtocol }}s://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPort }}"
114 value: "{{ .Values.config.sdcProtocol }}s://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPort }}"
117 value: "{{ .Values.config.msbProtocol }}://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPlainPort }}"
119 value: "{{ .Values.config.sdcProtocol }}://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPlainPort }}"
121 - name: DMAAP_ENABLED
122 value: "{{ .Values.config.dmaap_enabled }}"
124 value: "{{ .Values.config.dmaapProtocol }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}://{{ .Values.config.dmaapServiceName }}:{{ .Values.config.dmaapPort }}"
126 value: "{{ include "common.mariadbService" . }}"
128 value: "{{ include "common.mariadbPort" . }}"
130 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "login") | indent 12 }}
132 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "password") | indent 12 }}
134 - name: {{ include "common.fullname" . }}-etsicatalog
135 mountPath: /service/modeling/etsicatalog/static
136 - name: {{ include "common.fullname" . }}-localtime
137 mountPath: /etc/localtime
139 - name: {{ include "common.fullname" . }}-logs
140 mountPath: {{ .Values.log.path }}
141 - name: {{ include "common.fullname" . }}-logconfig
142 mountPath: /opt/modeling/etsicatalog/config/log.yml
144 resources: {{ include "common.resources" . | nindent 12 }}
145 {{- if .Values.nodeSelector }}
147 {{ toYaml .Values.nodeSelector | indent 10 }}
149 {{- if .Values.affinity }}
151 {{ toYaml .Values.affinity | indent 10 }}
154 # side car containers
155 {{ include "common.log.sidecar" . | nindent 8 }}
156 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
158 - name: {{ include "common.fullname" . }}-etsicatalog
159 {{- if .Values.persistence.enabled }}
160 persistentVolumeClaim:
161 claimName: {{ include "common.fullname" . }}
165 - name: {{ include "common.fullname" . }}-localtime
168 - name: {{ include "common.fullname" . }}-logs
170 - name: {{ include "common.fullname" . }}-logconfig
172 name : {{ include "common.fullname" . }}-logging-configmap
174 {{ include "common.log.volumes" . | nindent 8 }}
176 - name: "{{ include "common.namespace" . }}-docker-registry-key"