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" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
27 serviceName: {{ .Values.service.name }}
28 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
33 release: {{ .Release.Name }}
40 chown -R 26:26 /podroot/;
42 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.busyboxImage }}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 name: {{ include "common.name" . }}-prepare
46 - name: {{ include "common.fullname" . }}-data
49 - name: {{ include "common.name" . }}
50 image: "{{ .Values.postgresRepository }}/{{ .Values.image }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - containerPort: {{ .Values.service.internalPort }}
55 # disable liveness probe when breakpoints set in debugger
56 # so K8s doesn't restart unresponsive container
57 {{- if eq .Values.liveness.enabled true }}
60 port: {{ .Values.service.internalPort }}
61 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.liveness.periodSeconds }}
63 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
67 port: {{ .Values.service.internalPort }}
68 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.readiness.periodSeconds }}
73 - name: PG_PRIMARY_USER
77 - name: PG_PRIMARY_HOST
78 value: "{{.Values.container.name.primary}}"
79 - name: PG_REPLICA_HOST
80 value: "{{.Values.container.name.replica}}"
81 - name: PG_PRIMARY_PORT
82 value: "{{.Values.service.internalPort}}"
83 - name: PG_PRIMARY_PASSWORD
86 name: {{ template "common.fullname" . }}
87 key: pg-primary-password
89 value: "{{.Values.config.pgUserName}}"
93 name: {{ template "common.fullname" . }}
96 value: "{{.Values.config.pgDatabase}}"
97 - name: PG_ROOT_PASSWORD
100 name: {{ template "common.fullname" . }}
101 key: pg-root-password
104 name: {{ include "common.fullname" . }}-data
106 name: {{ include "common.fullname" . }}-backup
109 {{ include "common.resources" . | indent 12 }}
110 {{- if .Values.nodeSelector }}
112 {{ toYaml .Values.nodeSelector | indent 10 }}
114 {{- if .Values.affinity }}
116 {{ toYaml .Values.affinity | indent 10 }}
122 - name: {{ include "common.fullname" . }}-backup
124 {{- if not .Values.persistence.enabled }}
125 - name: {{ include "common.fullname" . }}-data
128 volumeClaimTemplates:
130 name: {{ include "common.fullname" . }}-data
132 name: {{ include "common.fullname" . }}
133 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
134 release: "{{ .Release.Name }}"
135 heritage: "{{ .Release.Service }}"
138 - {{ .Values.persistence.accessMode | quote }}
139 storageClassName: {{ include "common.storageClass" . }}
142 storage: {{ .Values.persistence.size | quote }}