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: apps/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 serviceName: {{ include "common.servicename" . }}
28 replicas: {{ .Values.replicaCount }}
31 app: {{ include "common.name" . }}
35 app: {{ include "common.name" . }}
36 release: {{ include "common.release" . }}
43 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; chmod 0755 /config/${PFILE}; done"
46 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
49 - name: PDP_HTTP_USER_ID
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "login") | indent 10 }}
51 - name: PDP_HTTP_PASSWORD
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "password") | indent 10 }}
53 - name: PDP_PAP_PDP_HTTP_USER_ID
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "login") | indent 10 }}
55 - name: PDP_PAP_PDP_HTTP_PASSWORD
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "password") | indent 10 }}
58 - mountPath: /config-input/pe
60 - mountPath: /config-input/pe-pdp
62 - mountPath: /config/pe
64 - mountPath: /config/pe-pdp
66 image: "{{ .Values.global.envsubstImage }}"
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 name: {{ include "common.name" . }}-update-config
73 - {{ .Values.global.pap.nameOverride }}
79 fieldPath: metadata.namespace
80 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
81 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
82 name: {{ include "common.name" . }}-readiness
88 name: {{ include "common.name" . }}
89 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
90 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
93 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
95 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
97 {{ include "common.resources" . | indent 12 }}
99 - containerPort: {{ .Values.service.externalPort }}
100 {{- if eq .Values.liveness.enabled true }}
103 port: {{ .Values.service.externalPort }}
104 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.liveness.periodSeconds }}
109 port: {{ .Values.service.externalPort }}
110 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
111 periodSeconds: {{ .Values.readiness.periodSeconds }}
113 - mountPath: /etc/localtime
116 - mountPath: /tmp/policy-install/config/base.conf
119 - mountPath: /tmp/policy-install/config/pdp-tweaks.sh
121 subPath: pdp-tweaks.sh
122 - mountPath: /tmp/policy-install/config/pdplp.conf
125 - mountPath: /tmp/policy-install/config/pdp.conf
128 - mountPath: /tmp/policy-install/do-start.sh
131 - mountPath: /var/log/onap
133 - mountPath: /tmp/logback.xml
139 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pdp/webapps/pdp/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"]
140 - image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
141 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
144 - mountPath: /usr/share/filebeat/filebeat.yml
146 subPath: filebeat.yml
147 - mountPath: /var/log/onap
149 - mountPath: /usr/share/filebeat/data
150 name: policy-data-filebeat
155 - name: filebeat-conf
157 name: {{ include "common.release" . }}-filebeat-configmap
160 - name: policy-data-filebeat
162 - name: policy-logback
164 name: {{ include "common.fullname" . }}-log-configmap
167 name: {{ include "common.release" . }}-pe-configmap
171 name: {{ include "common.release" . }}-pe-scripts-configmap
175 name: {{ include "common.fullname" . }}-pe-configmap
184 - name: "{{ include "common.namespace" . }}-docker-registry-key"