blob: f59840984887ef0f8d7855b420db1811dbac381e [file] [log] [blame]
Jerome Doucerain67746cc2018-08-29 16:46:23 -04001{{/*
2# Copyright © 2018 Amdocs, AT&T, Bell Canada
3# #
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
7# #
8# # http://www.apache.org/licenses/LICENSE-2.0
9# #
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.
15*/}}
16kind: Deployment
17apiVersion: extensions/v1beta1
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 replicas: 2
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}
33 spec:
34 containers:
35 - name: pgpool
36 image: "{{.Values.image.repository}}/{{.Values.image.container}}:{{.Values.image.tag}}"
37 env:
38 - name: PG_PRIMARY_SERVICE_NAME
39 value: {{.Values.container.name.primary}}
40 - name: PG_REPLICA_SERVICE_NAME
41 value: {{.Values.container.name.replica}}
42 - name: PG_USERNAME
43 value: {{.Values.credentials.pgusername}}
44 - name: PG_PASSWORD
45 value: {{.Values.credentials.pgpassword}}
46 ports:
47 - containerPort: 5432
48 name: pgpool
49 protocol: TCP
50 readinessProbe:
51 tcpSocket:
52 port: 5432
53 initialDelaySeconds: 20
54 periodSeconds: 10
55 livenessProbe:
56 tcpSocket:
57 port: 5432
58 initialDelaySeconds: 15
59 periodSeconds: 20
60 volumeMounts:
61 - name: pgpool-pgconf
62 mountPath: /pgconf/pgpoolconfigdir
63 readOnly: false
64 volumes:
65 - name: pgpool-pgconf
66 configMap:
67 name: {{ .Release.Name }}-pgpool-configmap