1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018-2020 AT&T Intellectual Property
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.
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 - {{ include "common.release" . }}-policy-galera-config
49 fieldPath: metadata.namespace
50 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 name: {{ include "common.name" . }}-db-readiness
53 {{- if not .Values.nexus.offline }}
58 - {{ .Values.nexus.name }}
64 fieldPath: metadata.namespace
65 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
66 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
67 name: {{ include "common.name" . }}-readiness
69 {{ include "common.certInitializer.initContainer" . | indent 6 }}
71 - name: {{ include "common.name" . }}
72 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
73 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 command: ["bash","-c"]
75 args: ["if [ -f {{ .Values.certInitializer.credsPath }}/.ci ]; then \
76 source {{ .Values.certInitializer.credsPath }}/.ci; fi;\
77 /opt/app/policy/bin/pdpd-cl-entrypoint.sh boot"]
79 - containerPort: {{ .Values.service.externalPort }}
80 - containerPort: {{ .Values.service.externalPort2 }}
81 {{- if eq .Values.liveness.enabled true }}
84 port: {{ .Values.service.externalPort }}
85 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
86 periodSeconds: {{ .Values.liveness.periodSeconds }}
90 port: {{ .Values.service.externalPort }}
91 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
92 periodSeconds: {{ .Values.readiness.periodSeconds }}
95 value: "{{ .Values.replicaCount }}"
97 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
99 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
101 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
102 - mountPath: /etc/localtime
105 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
106 - mountPath: /tmp/policy-install/config/{{ base $path }}
108 subPath: {{ base $path }}
110 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
111 - mountPath: /tmp/policy-install/config/{{ base $path }}
113 subPath: {{ base $path }}
116 {{ include "common.resources" . }}
117 {{- if .Values.nodeSelector }}
119 {{ toYaml .Values.nodeSelector | indent 10 }}
121 {{- if .Values.affinity }}
123 {{ toYaml .Values.affinity | indent 10 }}
126 {{ include "common.certInitializer.volumes" . | indent 8 }}
130 - name: drools-config
132 name: {{ include "common.fullname" . }}-configmap
134 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
135 - key: {{ base $path }}
136 path: {{ base $path }}
139 - name: drools-secret
141 secretName: {{ include "common.fullname" . }}-secret
143 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
144 - key: {{ base $path }}
145 path: {{ base $path }}
149 - name: "{{ include "common.namespace" . }}-docker-registry-key"