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
48 - command: ["/bin/bash", "-c", "echo $POD_IP > /config/ip_addr.txt"]
54 fieldPath: status.podIP
58 image: {{ .Values.global.ubuntuImage }}
59 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 name: generate-ip-addr-txt
66 name: {{ include "common.name" . }}
67 image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 - containerPort: {{ .Values.service.externalPort }}
71 - containerPort: {{ .Values.service.externalPort2 }}
72 {{- if eq .Values.liveness.enabled true }}
75 port: {{ .Values.service.externalPort }}
76 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
77 periodSeconds: {{ .Values.liveness.periodSeconds }}
81 port: {{ .Values.service.externalPort }}
82 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
83 periodSeconds: {{ .Values.readiness.periodSeconds }}
85 - name: PRELOAD_POLICIES
86 value: "{{ .Values.config.preloadPolicies }}"
88 - mountPath: /etc/localtime
91 - mountPath: /tmp/policy-install/config/base.conf
94 - mountPath: /tmp/policy-install/config/
96 - mountPath: /tmp/policy-install/do-start.sh
99 - mountPath: /var/log/onap
101 - mountPath: /tmp/policy-install/logback.xml
102 name: policy-sdk-logback
104 - mountPath: /tmp/logback.xml
110 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"]
111 - image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.global.loggingImage | default .Values.loggingImage }}"
112 imagePullPolicy: {{ .Values.pullPolicy }}
115 - mountPath: /usr/share/filebeat/filebeat.yml
117 subPath: filebeat.yml
118 - mountPath: /var/log/onap
120 - mountPath: /usr/share/filebeat/data
121 name: policy-data-filebeat
123 {{ toYaml .Values.resources | indent 12 }}
124 {{- if .Values.nodeSelector }}
126 {{ toYaml .Values.nodeSelector | indent 10 }}
128 {{- if .Values.affinity }}
130 {{ toYaml .Values.affinity | indent 10 }}
136 - name: filebeat-conf
138 name: {{ .Release.Name }}-filebeat-configmap
141 - name: policy-data-filebeat
143 - name: policy-logback
145 name: {{ include "common.fullname" . }}-log-configmap
146 - name: policy-sdk-logback
148 name: {{ include "common.fullname" . }}-sdk-log-configmap
151 name: {{ .Release.Name }}-pe-configmap
155 name: {{ .Release.Name }}-pe-scripts-configmap
159 name: {{ include "common.fullname" . }}-pe-configmap
162 - name: "{{ include "common.namespace" . }}-docker-registry-key"