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
62 image: {{ include "repositoryGenerator.image.readiness" . }}
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 name: {{ include "common.name" . }}-readiness
74 - name: {{ include "common.name" . }}
75 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 args: ["/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot"]
79 ports: {{ include "common.containerPorts" . | nindent 12 }}
80 {{- if eq .Values.liveness.enabled true }}
83 path: /healthcheck/controllers
85 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
86 periodSeconds: {{ .Values.liveness.periodSeconds }}
87 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
91 port: {{ .Values.service.internalPort }}
92 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
93 periodSeconds: {{ .Values.readiness.periodSeconds }}
96 value: "{{ .Values.replicaCount }}"
98 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
100 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
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 }}
115 resources: {{ include "common.resources" . | nindent 12 }}
116 {{- if .Values.nodeSelector }}
118 {{ toYaml .Values.nodeSelector | indent 10 }}
120 {{- if .Values.affinity }}
122 {{ toYaml .Values.affinity | indent 10 }}
124 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
129 - name: drools-config
131 name: {{ include "common.fullname" . }}-configmap
133 {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }}
134 - key: {{ base $path }}
135 path: {{ base $path }}
138 - name: drools-secret
140 secretName: {{ include "common.fullname" . }}-secret
142 {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
143 - key: {{ base $path }}
144 path: {{ base $path }}
147 {{- include "common.imagePullSecrets" . | nindent 6 }}