1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018 AT&T
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.
16 apiVersion: extensions/v1beta1
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
27 replicas: {{ .Values.replicaCount }}
31 app: {{ include "common.name" . }}
32 release: {{ include "common.release" . }}
39 - "cd /config-input && for PFILE in `ls -1 *.conf`; do envsubst <${PFILE} >/config/${PFILE}; done"
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
44 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
46 - mountPath: /config-input
50 image: "{{ .Values.global.envsubstImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 name: {{ include "common.name" . }}-update-config
57 - {{ include "common.release" . }}-galera-config
63 fieldPath: metadata.namespace
64 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
65 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
66 name: {{ include "common.name" . }}-readiness
72 name: {{ include "common.name" . }}
73 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
74 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
76 {{ include "common.resources" . | indent 12 }}
78 - containerPort: {{ .Values.service.externalPort }}
79 - containerPort: {{ .Values.service.externalPort2 }}
80 {{- if eq .Values.liveness.enabled true }}
83 port: {{ .Values.service.externalPort }}
84 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
85 periodSeconds: {{ .Values.liveness.periodSeconds }}
89 port: {{ .Values.service.externalPort }}
90 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
91 periodSeconds: {{ .Values.readiness.periodSeconds }}
93 - name: PRELOAD_POLICIES
94 value: "{{ .Values.config.preloadPolicies }}"
96 - mountPath: /etc/localtime
99 - mountPath: /tmp/policy-install/config/pap-tweaks.sh
101 subPath: pap-tweaks.sh
102 - mountPath: /tmp/policy-install/config/paplp.conf
105 - mountPath: /tmp/policy-install/config/pap.conf
108 - mountPath: /tmp/policy-install/config/mysql.conf
111 - mountPath: /tmp/policy-install/config/elk.conf
114 - mountPath: /tmp/policy-install/config/console.conf
116 subPath: console.conf
117 - mountPath: /tmp/policy-install/config/base.conf
120 - mountPath: /tmp/policy-install/do-start.sh
123 - mountPath: /var/log/onap
125 - mountPath: /tmp/policy-install/logback.xml
126 name: policy-sdk-logback
128 - mountPath: /tmp/logback.xml
134 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pap/webapps/pap/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; export SRC=/tmp/policy-install/logback.xml; export DST=/opt/app/policy/servers/console/webapps/onap/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
135 - image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.global.loggingImage | default .Values.loggingImage }}"
136 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
139 - mountPath: /usr/share/filebeat/filebeat.yml
141 subPath: filebeat.yml
142 - mountPath: /var/log/onap
144 - mountPath: /usr/share/filebeat/data
145 name: policy-data-filebeat
150 - name: filebeat-conf
152 name: {{ include "common.release" . }}-filebeat-configmap
155 - name: policy-data-filebeat
157 - name: policy-logback
159 name: {{ include "common.fullname" . }}-log-configmap
160 - name: policy-sdk-logback
162 name: {{ include "common.fullname" . }}-sdk-log-configmap
165 name: {{ include "common.release" . }}-pe-configmap
169 name: {{ include "common.release" . }}-pe-scripts-configmap
173 name: {{ include "common.fullname" . }}-pe-configmap
179 - name: "{{ include "common.namespace" . }}-docker-registry-key"