1 apiVersion: extensions/v1beta1
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ include "common.release" . }}
10 heritage: {{ .Release.Service }}
12 replicas: {{ .Values.replicaCount }}
16 app: {{ include "common.name" . }}
17 release: {{ include "common.release" . }}
24 - {{ include "common.release" . }}-galera-config
30 fieldPath: metadata.namespace
31 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
33 name: {{ include "common.name" . }}-readiness
39 - "export SQL_PASSWORD_BASE64=`echo -n ${SQL_PASSWORD} | base64`; cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "login") | indent 12 }}
44 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "password") | indent 12 }}
45 - name: RESTSERVER_USER
46 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 12 }}
47 - name: RESTSERVER_PASSWORD
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 12 }}
50 - mountPath: /config-input
53 name: apiconfig-processed
54 image: "{{ .Values.global.envsubstImage }}"
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 name: {{ include "common.name" . }}-update-config
59 - name: {{ include "common.name" . }}
60 image: "{{ include "common.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/config.json"]
65 - containerPort: {{ .Values.service.internalPort }}
66 # disable liveness probe when breakpoints set in debugger
67 # so K8s doesn't restart unresponsive container
68 {{- if eq .Values.liveness.enabled true }}
71 port: {{ .Values.service.internalPort }}
72 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
73 periodSeconds: {{ .Values.liveness.periodSeconds }}
77 port: {{ .Values.service.internalPort }}
78 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
79 periodSeconds: {{ .Values.readiness.periodSeconds }}
81 - mountPath: /etc/localtime
84 - mountPath: /opt/app/policy/api/etc/mounted
85 name: apiconfig-processed
87 {{ include "common.resources" . | indent 12 }}
88 {{- if .Values.nodeSelector }}
90 {{ toYaml .Values.nodeSelector | indent 10 }}
92 {{- if .Values.affinity }}
94 {{ toYaml .Values.affinity | indent 10 }}
102 name: {{ include "common.fullname" . }}-configmap
104 - name: apiconfig-processed
108 - name: "{{ include "common.namespace" . }}-docker-registry-key"