2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2018-2020, 2022 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.
20 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
22 selector: {{- include "common.selectors" . | nindent 4 }}
23 serviceName: {{ include "common.servicename" . }}
24 replicas: {{ .Values.replicaCount }}
26 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
33 - {{ include "common.release" . }}-policy-galera-config
39 fieldPath: metadata.namespace
40 image: {{ include "repositoryGenerator.image.readiness" . }}
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 name: {{ include "common.name" . }}-db-readiness
50 {{- if not .Values.nexus.offline }}
55 - {{ .Values.nexus.name }}
61 fieldPath: metadata.namespace
63 value: {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
65 value: {{ .Values.kafkaUser.authenticationType | upper }}
67 value: {{ .Values.config.kafka.consumer.groupId }}
69 value: {{ .Values.config.app.listener.policyPdpPapTopic }}
70 image: {{ include "repositoryGenerator.image.readiness" . }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 name: {{ include "common.name" . }}-readiness
82 - name: {{ include "common.name" . }}
83 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
84 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
86 args: ["/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot"]
87 ports: {{ include "common.containerPorts" . | nindent 12 }}
88 {{- if eq .Values.liveness.enabled true }}
91 path: /healthcheck/controllers
93 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
94 periodSeconds: {{ .Values.liveness.periodSeconds }}
95 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
99 port: {{ .Values.service.internalPort }}
100 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
101 periodSeconds: {{ .Values.readiness.periodSeconds }}
104 value: "{{ .Values.replicaCount }}"
106 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
108 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
110 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
111 - mountPath: /tmp/policy-install/config/{{ base $path }}
113 subPath: {{ base $path }}
115 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
116 - mountPath: /tmp/policy-install/config/{{ base $path }}
118 subPath: {{ base $path }}
120 resources: {{ include "common.resources" . | nindent 12 }}
121 {{- if .Values.nodeSelector }}
123 {{ toYaml .Values.nodeSelector | indent 10 }}
125 {{- if .Values.affinity }}
127 {{ toYaml .Values.affinity | indent 10 }}
129 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
131 - name: drools-config
133 name: {{ include "common.fullname" . }}-configmap
135 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
136 - key: {{ base $path }}
137 path: {{ base $path }}
140 - name: drools-secret
142 secretName: {{ include "common.fullname" . }}-secret
144 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
145 - key: {{ base $path }}
146 path: {{ base $path }}
149 {{- include "common.imagePullSecrets" . | nindent 6 }}