1 # Copyright © 2017 Amdocs, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: extensions/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
26 replicas: {{ .Values.replicaCount }}
30 app: {{ include "common.name" . }}
31 release: {{ .Release.Name }}
38 - {{ .Values.global.mariadb.nameOverride }}
44 fieldPath: metadata.namespace
45 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 name: {{ include "common.name" . }}-readiness
53 name: {{ include "common.name" . }}
54 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
57 - containerPort: {{ .Values.service.externalPort }}
58 - containerPort: {{ .Values.service.externalPort2 }}
59 {{- if eq .Values.liveness.enabled true }}
62 port: {{ .Values.service.externalPort }}
63 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.liveness.periodSeconds }}
68 port: {{ .Values.service.externalPort }}
69 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
70 periodSeconds: {{ .Values.readiness.periodSeconds }}
72 - name: PRELOAD_POLICIES
73 value: "{{ .Values.config.preloadPolicies }}"
75 - mountPath: /etc/localtime
78 - mountPath: /tmp/policy-install/config/push-policies.sh
80 subPath: push-policies.sh
81 - mountPath: /tmp/policy-install/config/pap-tweaks.sh
83 subPath: pap-tweaks.sh
84 - mountPath: /tmp/policy-install/config/paplp.conf
87 - mountPath: /tmp/policy-install/config/pap.conf
90 - mountPath: /tmp/policy-install/config/mysql.conf
93 - mountPath: /tmp/policy-install/config/elk.conf
96 - mountPath: /tmp/policy-install/config/console.conf
99 - mountPath: /tmp/policy-install/config/base.conf
102 - mountPath: /tmp/policy-install/do-start.sh
105 - mountPath: /var/log/onap
107 - mountPath: /tmp/policy-install/logback.xml
108 name: policy-sdk-logback
110 - mountPath: /tmp/logback.xml
116 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"]
117 - image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.global.loggingImage | default .Values.loggingImage }}"
118 imagePullPolicy: {{ .Values.pullPolicy }}
121 - mountPath: /usr/share/filebeat/filebeat.yml
123 subPath: filebeat.yml
124 - mountPath: /var/log/onap
126 - mountPath: /usr/share/filebeat/data
127 name: policy-data-filebeat
129 {{ toYaml .Values.resources | indent 12 }}
130 {{- if .Values.nodeSelector }}
132 {{ toYaml .Values.nodeSelector | indent 10 }}
134 {{- if .Values.affinity }}
136 {{ toYaml .Values.affinity | indent 10 }}
142 - name: filebeat-conf
144 name: {{ .Release.Name }}-filebeat-configmap
147 - name: policy-data-filebeat
149 - name: policy-logback
151 name: {{ include "common.fullname" . }}-log-configmap
152 - name: policy-sdk-logback
154 name: {{ include "common.fullname" . }}-sdk-log-configmap
157 name: {{ .Release.Name }}-pe-configmap
161 name: {{ .Release.Name }}-pe-scripts-configmap
165 name: {{ include "common.fullname" . }}-pe-configmap
168 - name: "{{ include "common.namespace" . }}-docker-registry-key"