3 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
5 selector: {{- include "common.selectors" . | nindent 4 }}
6 replicas: {{ .Values.replicaCount }}
8 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
15 {{ if not .Values.global.postgres.localCluster }}
16 - {{ include "common.release" . }}-policy-galera-config
18 - {{ include "common.release" . }}-policy-pg-config
25 fieldPath: metadata.namespace
26 image: {{ include "repositoryGenerator.image.readiness" . }}
27 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
28 name: {{ include "common.name" . }}-readiness
40 - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done"
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "login") | indent 12 }}
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "password") | indent 12 }}
46 - name: RESTSERVER_USER
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 12 }}
48 - name: RESTSERVER_PASSWORD
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 12 }}
51 - mountPath: /config-input
54 name: apiconfig-processed
55 image: {{ include "repositoryGenerator.image.envsubst" . }}
56 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
57 name: {{ include "common.name" . }}-update-config
59 - name: {{ include "common.name" . }}
60 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
62 command: ["/opt/app/policy/api/bin/policy-api.sh"]
63 args: ["/opt/app/policy/api/etc/mounted/apiParameters.yaml"]
64 ports: {{ include "common.containerPorts" . | nindent 12 }}
65 # disable liveness probe when breakpoints set in debugger
66 # so K8s doesn't restart unresponsive container
67 {{- if eq .Values.liveness.enabled true }}
70 port: {{ .Values.service.internalPort }}
71 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
72 periodSeconds: {{ .Values.liveness.periodSeconds }}
76 path: {{ .Values.readiness.api }}
77 port: {{ .Values.service.internalPort }}
80 value: Basic {{ printf "%s:%s" .Values.restServer.user .Values.restServer.password | b64enc }}
82 successThreshold: {{ .Values.readiness.successThreshold }}
83 failureThreshold: {{ .Values.readiness.failureThreshold }}
84 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
85 periodSeconds: {{ .Values.readiness.periodSeconds }}
86 timeoutSeconds: {{ .Values.readiness.timeout }}
88 - mountPath: /etc/localtime
91 - mountPath: /opt/app/policy/api/etc/mounted
92 name: apiconfig-processed
93 resources: {{ include "common.resources" . | nindent 12 }}
94 {{- if .Values.nodeSelector }}
96 {{ toYaml .Values.nodeSelector | indent 10 }}
98 {{- if .Values.affinity }}
100 {{ toYaml .Values.affinity | indent 10 }}
102 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
109 name: {{ include "common.fullname" . }}-configmap
111 - name: apiconfig-processed
115 - name: "{{ include "common.namespace" . }}-docker-registry-key"