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
60 {{ if .Values.config.msb_enabled }}
61 {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for.msb ) | indent 6 | trim }}
66 - chown -R 1000:1000 /service/modeling/etsicatalog/static
67 image: {{ include "repositoryGenerator.image.busybox" . }}
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 name: {{ include "common.name" . }}-init
71 - name: {{ include "common.fullname" . }}-etsicatalog
72 mountPath: /service/modeling/etsicatalog/static
74 - name: {{ include "common.name" . }}
75 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 - containerPort: {{ .Values.service.internalPort }}
79 # disable liveness probe when breakpoints set in debugger
80 # so K8s doesn't restart unresponsive container
81 {{ if .Values.liveness.enabled }}
84 port: {{ .Values.service.internalPort }}
85 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
86 periodSeconds: {{ .Values.liveness.periodSeconds }}
90 port: {{ .Values.service.internalPort }}
91 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
92 periodSeconds: {{ .Values.readiness.periodSeconds }}
94 {{- if and (include "common.needTLS" .) (eq .Values.config.ssl_enabled true) }}
102 value: "{{ .Values.config.msb_enabled }}"
103 {{- if (include "common.needTLS" .) }}
105 value: "{{ .Values.config.msbProtocol }}s://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPort }}"
107 value: "{{ .Values.config.sdcProtocol }}s://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPort }}"
110 value: "{{ .Values.config.msbProtocol }}://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPlainPort }}"
112 value: "{{ .Values.config.sdcProtocol }}://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPlainPort }}"
114 - name: DMAAP_ENABLED
115 value: "{{ .Values.config.dmaap_enabled }}"
117 value: "{{ .Values.config.dmaapProtocol }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}://{{ .Values.config.dmaapServiceName }}:{{ .Values.config.dmaapPort }}"
119 value: "{{ include "common.mariadbService" . }}"
121 value: "{{ include "common.mariadbPort" . }}"
123 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "login") | indent 12 }}
125 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "password") | indent 12 }}
127 - name: {{ include "common.fullname" . }}-etsicatalog
128 mountPath: /service/modeling/etsicatalog/static
129 - name: {{ include "common.fullname" . }}-localtime
130 mountPath: /etc/localtime
132 - name: {{ include "common.fullname" . }}-logs
133 mountPath: {{ .Values.log.path }}
134 - name: {{ include "common.fullname" . }}-logconfig
135 mountPath: /opt/modeling/etsicatalog/config/log.yml
137 resources: {{ include "common.resources" . | nindent 12 }}
138 {{- if .Values.nodeSelector }}
140 {{ toYaml .Values.nodeSelector | indent 10 }}
142 {{- if .Values.affinity }}
144 {{ toYaml .Values.affinity | indent 10 }}
147 # side car containers
148 {{ include "common.log.sidecar" . | nindent 8 }}
149 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
151 - name: {{ include "common.fullname" . }}-etsicatalog
152 {{- if .Values.persistence.enabled }}
153 persistentVolumeClaim:
154 claimName: {{ include "common.fullname" . }}
158 - name: {{ include "common.fullname" . }}-localtime
161 - name: {{ include "common.fullname" . }}-logs
163 - name: {{ include "common.fullname" . }}-logconfig
165 name : {{ include "common.fullname" . }}-logging-configmap
167 {{ include "common.log.volumes" . | nindent 8 }}
169 - name: "{{ include "common.namespace" . }}-docker-registry-key"