2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2018-2020 AT&T Intellectual Property
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
29 serviceName: {{ include "common.servicename" . }}
30 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
45 - {{ include "common.release" . }}-policy-galera-config
51 fieldPath: metadata.namespace
52 image: {{ include "repositoryGenerator.image.readiness" . }}
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 name: {{ include "common.name" . }}-db-readiness
55 {{- if not .Values.nexus.offline }}
60 - {{ .Values.nexus.name }}
66 fieldPath: metadata.namespace
67 image: {{ include "repositoryGenerator.image.readiness" . }}
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 name: {{ include "common.name" . }}-readiness
71 {{ include "common.certInitializer.initContainer" . | indent 6 }}
73 - name: {{ include "common.name" . }}
74 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
75 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 args: ["if [ -f {{ .Values.certInitializer.credsPath }}/.ci ]; then \
78 source {{ .Values.certInitializer.credsPath }}/.ci; fi;\
79 cp {{ .Values.certInitializer.credsPath }}/org.onap.policy.p12 ${POLICY_HOME}/etc/ssl/policy-keystore;\
80 /opt/app/policy/bin/pdpd-cl-entrypoint.sh boot"]
82 - containerPort: {{ .Values.service.externalPort }}
83 - containerPort: {{ .Values.service.externalPort2 }}
84 {{- if eq .Values.liveness.enabled true }}
87 port: {{ .Values.service.externalPort }}
88 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
89 periodSeconds: {{ .Values.liveness.periodSeconds }}
93 port: {{ .Values.service.externalPort }}
94 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
95 periodSeconds: {{ .Values.readiness.periodSeconds }}
98 value: "{{ .Values.replicaCount }}"
100 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
102 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
104 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
105 - mountPath: /etc/localtime
108 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
109 - mountPath: /tmp/policy-install/config/{{ base $path }}
111 subPath: {{ base $path }}
113 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
114 - mountPath: /tmp/policy-install/config/{{ base $path }}
116 subPath: {{ base $path }}
119 {{ include "common.resources" . }}
120 {{- if .Values.nodeSelector }}
122 {{ toYaml .Values.nodeSelector | indent 10 }}
124 {{- if .Values.affinity }}
126 {{ toYaml .Values.affinity | indent 10 }}
129 {{ include "common.certInitializer.volumes" . | indent 8 }}
133 - name: drools-config
135 name: {{ include "common.fullname" . }}-configmap
137 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
138 - key: {{ base $path }}
139 path: {{ base $path }}
142 - name: drools-secret
144 secretName: {{ include "common.fullname" . }}-secret
146 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
147 - key: {{ base $path }}
148 path: {{ base $path }}
152 - name: "{{ include "common.namespace" . }}-docker-registry-key"