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 `ls -1 *.conf`; do envsubst <${PFILE} >/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 }}
50 - mountPath: /config-input
54 image: "{{ .Values.global.envsubstImage }}"
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 name: {{ include "common.name" . }}-update-config
61 - {{ .Values.global.pap.nameOverride }}
67 fieldPath: metadata.namespace
68 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
69 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 name: {{ include "common.name" . }}-readiness
76 name: {{ include "common.name" . }}
77 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
83 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
85 {{ include "common.resources" . | indent 12 }}
87 - containerPort: {{ .Values.service.externalPort }}
88 {{- if eq .Values.liveness.enabled true }}
91 port: {{ .Values.service.externalPort }}
92 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
93 periodSeconds: {{ .Values.liveness.periodSeconds }}
97 port: {{ .Values.service.externalPort }}
98 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.readiness.periodSeconds }}
101 - mountPath: /etc/localtime
104 - mountPath: /tmp/policy-install/config/base.conf
107 - mountPath: /tmp/policy-install/config/pdp-tweaks.sh
109 subPath: pdp-tweaks.sh
110 - mountPath: /tmp/policy-install/config/pdplp.conf
113 - mountPath: /tmp/policy-install/config/pdp.conf
116 - mountPath: /tmp/policy-install/do-start.sh
119 - mountPath: /var/log/onap
121 - mountPath: /tmp/logback.xml
127 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"]
128 - image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
129 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
132 - mountPath: /usr/share/filebeat/filebeat.yml
134 subPath: filebeat.yml
135 - mountPath: /var/log/onap
137 - mountPath: /usr/share/filebeat/data
138 name: policy-data-filebeat
143 - name: filebeat-conf
145 name: {{ include "common.release" . }}-filebeat-configmap
148 - name: policy-data-filebeat
150 - name: policy-logback
152 name: {{ include "common.fullname" . }}-log-configmap
155 name: {{ include "common.release" . }}-pe-configmap
159 name: {{ include "common.release" . }}-pe-scripts-configmap
163 name: {{ include "common.fullname" . }}-pe-configmap
169 - name: "{{ include "common.namespace" . }}-docker-registry-key"