2 # Copyright © 2018 Amdocs, AT&T, Bell Canada
4 # # Licensed under the Apache License, Version 2.0 (the "License");
5 # # you may not use this file except in compliance with the License.
6 # # You may obtain a copy of the License at
8 # # http://www.apache.org/licenses/LICENSE-2.0
10 # # Unless required by applicable law or agreed to in writing, software
11 # # distributed under the License is distributed on an "AS IS" BASIS,
12 # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # # See the License for the specific language governing permissions and
14 # # limitations under the License.
16 apiVersion: apps/v1beta1
19 name: {{ include "common.fullname" . }}-replica
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}-replica
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26 name: "{{ .Values.container.name.replica }}"
28 serviceName: {{ .Values.service.name }}
33 app: {{ include "common.name" . }}-replica
34 release: {{ .Release.Name }}
35 name: "{{ .Values.container.name.replica }}"
43 chown 26:26 /podroot/;
45 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.busyboxImage }}
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 - name: {{ include "common.fullname" . }}-data
51 - name: {{ include "common.name" . }}
52 image: "{{ .Values.postgresRepository }}/{{ .Values.image }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 - containerPort: {{ .Values.service.internalPort }}
56 name: {{ .Values.service.portName }}
57 # disable liveness probe when breakpoints set in debugger
58 # so K8s doesn't restart unresponsive container
59 {{- if eq .Values.liveness.enabled true }}
62 port: {{ .Values.service.internalPort }}
63 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.liveness.periodSeconds }}
65 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
69 port: {{ .Values.service.internalPort }}
70 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.readiness.periodSeconds }}
75 - name: PG_PRIMARY_USER
79 - name: PG_PRIMARY_HOST
80 value: "{{.Values.container.name.primary}}"
81 - name: PG_REPLICA_HOST
82 value: "{{.Values.container.name.replica}}"
83 - name: PG_PRIMARY_PORT
84 value: "{{.Values.service.internalPort}}"
85 - name: PG_PRIMARY_PASSWORD
88 name: {{ template "common.fullname" . }}
89 key: pg-primary-password
91 value: "{{.Values.config.pgUserName}}"
95 name: {{ template "common.fullname" . }}
98 value: "{{.Values.config.pgDatabase}}"
99 - name: PG_ROOT_PASSWORD
102 name: {{ template "common.fullname" . }}
103 key: pg-root-password
105 - name: pool-hba-conf
106 mountPath: /pgconf/pool_hba.conf
107 subPath: pool_hba.conf
109 name: {{ include "common.fullname" . }}-data
111 name: {{ include "common.fullname" . }}-backup
114 {{ include "common.resources" . | indent 12 }}
115 {{- if .Values.nodeSelector }}
117 {{ toYaml .Values.nodeSelector | indent 10 }}
119 {{- if .Values.affinity }}
121 {{ toYaml .Values.affinity | indent 10 }}
127 - name: {{ include "common.fullname" . }}-backup
129 - name: {{ include "common.fullname" . }}-data
130 {{- if .Values.persistence.enabled }}
131 persistentVolumeClaim:
132 claimName: {{ include "common.fullname" . }}-replica
136 - name: pool-hba-conf
138 name: {{ include "common.fullname" . }}