2 # Copyright © 2017 Amdocs, Bell Canada
3 # Copyright © 2020 Samsung Electronics
4 # Copyright © 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 }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
40 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
45 - {{ include "common.fullname" . }}-mariadb-init-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" . }}-readiness
56 - name: {{ include "common.name" . }}
57 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
58 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
59 {{- if .Values.global.aafEnabled }}
65 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
66 export VID_TRUSTSTORE_PLAIN_PASSWORD=${VID_TRUSTSTORE_PASSWORD}
67 export VID_TRUSTSTORE_PASSWORD=`java -cp /usr/local/tomcat/webapps/vid/WEB-INF/lib/jetty-util-9.4.20.v20190813.jar org.eclipse.jetty.util.security.Password ${VID_TRUSTSTORE_PLAIN_PASSWORD} 2>&1 | grep "OBF:"`
71 - containerPort: {{ .Values.service.internalPort }}
72 # disable liveness probe when breakpoints set in debugger
73 # so K8s doesn't restart unresponsive container
74 {{- if eq .Values.liveness.enabled true }}
77 port: {{ .Values.service.internalPort }}
78 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
79 periodSeconds: {{ .Values.liveness.periodSeconds }}
83 port: {{ .Values.service.internalPort }}
84 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
85 periodSeconds: {{ .Values.readiness.periodSeconds }}
87 - name: ASDC_CLIENT_REST_HOST
88 value: sdc-be.{{ include "common.namespace" . }}
89 - name: ASDC_CLIENT_REST_AUTH
90 value: "{{ .Values.config.asdcclientrestauth }}"
91 - name: ASDC_CLIENT_REST_PORT
92 value: "{{ .Values.config.asdcclientrestport }}"
93 - name: ASDC_CLIENT_REST_PROTOCOL
96 value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }}
97 - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
98 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
99 - name: VID_MSO_SERVER_URL
100 value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra
102 value: "{{ .Values.config.vidmsopass }}"
103 - name: MSO_DME2_SERVER_URL
104 value: "{{ .Values.config.msodme2serverurl }}"
105 - name: MSO_DME2_ENABLED
106 value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
107 - name: VID_ECOMP_REDIRECT_URL
108 value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
109 - name: VID_ECOMP_REST_URL
110 value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi
111 - name: VID_ROLE_ACCESS_CENTRALIZED
112 value: "{{ .Values.config.roleaccesscentralized }}"
113 - name: VID_CONTACT_US_LINK
114 value: "{{ .Values.config.vidcontactuslink }}"
115 - name: VID_UEB_URL_LIST
116 value: message-router.{{ include "common.namespace" . }}
117 - name: VID_MYSQL_HOST
118 value: {{ include "common.mariadbService" . }}
119 - name: VID_MYSQL_PORT
120 value: "{{ include "common.mariadbPort" . }}"
121 - name: VID_MYSQL_DBNAME
122 value: {{ index .Values "mariadb-galera" "db" "name" }}
123 - name: VID_MYSQL_USER
124 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 14 }}
125 - name: VID_MYSQL_PASS
126 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 14 }}
127 - name: VID_MYSQL_MAXCONNECTIONS
128 value: "{{ .Values.config.vidmysqlmaxconnections }}"
129 {{- if .Values.global.aafEnabled }}
130 - name: VID_KEYSTORE_FILENAME
131 value: "{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.fqi_namespace }}.jks"
132 - name: VID_TRUSTSTORE_FILENAME
133 value: "{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.fqi_namespace }}.trust.jks"
135 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
136 - mountPath: /etc/localtime
139 - mountPath: "{{ .Values.log.path }}"
141 - mountPath: /tmp/logback.xml
144 - mountPath: /opt/app/vid
147 {{ include "common.resources" . | indent 12 }}
148 {{- if .Values.nodeSelector }}
150 {{ toYaml .Values.nodeSelector | indent 10 }}
152 {{- if .Values.affinity }}
154 {{ toYaml .Values.affinity | indent 10 }}
156 # side car containers
157 {{ include "common.log.sidecar" . | nindent 8 }}
158 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
162 {{ include "common.log.volumes" . | nindent 8 }}
169 name: {{ include "common.fullname" . }}-log-configmap
171 - name: "{{ include "common.namespace" . }}-docker-registry-key"