1 apiVersion: extensions/v1beta1
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 - {{ .Values.global.mariadb.service.name }}
21 fieldPath: metadata.namespace
22 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
23 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
24 name: {{ include "common.name" . }}-readiness
30 - "export SQL_PASSWORD_BASE64=`echo -n ${SQL_PASSWORD} | base64`; cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
33 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
35 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
36 - name: RESTSERVER_USER
37 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-secret" "key" "login") | indent 10 }}
38 - name: RESTSERVER_PASSWORD
39 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-secret" "key" "password") | indent 10 }}
41 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "api-secret" "key" "login") | indent 10 }}
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "api-secret" "key" "password") | indent 10 }}
44 - name: DISTRIBUTION_USER
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "distribution-secret" "key" "login") | indent 10 }}
46 - name: DISTRIBUTION_PASSWORD
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "distribution-secret" "key" "password") | indent 10 }}
49 - mountPath: /config-input
52 name: papconfig-processed
53 image: "{{ .Values.global.envsubstImage }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 name: {{ include "common.name" . }}-update-config
57 - name: {{ include "common.name" . }}
58 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
59 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 command: ["/opt/app/policy/pap/bin/policy-pap.sh"]
61 args: ["/opt/app/policy/pap/etc/mounted/config.json"]
62 ports: {{ include "common.containerPorts" . | nindent 12 }}
63 # disable liveness probe when breakpoints set in debugger
64 # so K8s doesn't restart unresponsive container
65 {{- if eq .Values.liveness.enabled true }}
68 port: {{ .Values.liveness.port }}
69 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
70 periodSeconds: {{ .Values.liveness.periodSeconds }}
74 port: {{ .Values.readiness.port }}
75 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
76 periodSeconds: {{ .Values.readiness.periodSeconds }}
78 - mountPath: /etc/localtime
81 - mountPath: /opt/app/policy/pap/etc/mounted
82 name: papconfig-processed
84 {{ include "common.resources" . | indent 12 }}
85 {{- if .Values.nodeSelector }}
87 {{ toYaml .Values.nodeSelector | indent 10 }}
89 {{- if .Values.affinity }}
91 {{ toYaml .Values.affinity | indent 10 }}
99 name: {{ include "common.fullname" . }}-configmap
101 - name: papconfig-processed
105 - name: "{{ include "common.namespace" . }}-docker-registry-key"