blob: 4aa8d831fb80665124a264ff1e896c061bc65f65 [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
jasmineWen6715c7d2018-10-10 19:48:21 +000018metadata:
Jerome Doucerain67746cc2018-08-29 16:46:23 -040019 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 }}
jasmineWen6715c7d2018-10-10 19:48:21 +000026spec:
Jerome Doucerain67746cc2018-08-29 16:46:23 -040027 replicas: 2
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}
33 spec:
34 containers:
jasmineWenf7997b42018-09-19 23:37:35 +000035 - image: "{{.Values.repository}}/{{.Values.image}}"
36 imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
37 name: {{ include "common.name" . }}
Jerome Doucerain67746cc2018-08-29 16:46:23 -040038 env:
39 - name: PG_PRIMARY_SERVICE_NAME
40 value: {{.Values.container.name.primary}}
41 - name: PG_REPLICA_SERVICE_NAME
42 value: {{.Values.container.name.replica}}
43 - name: PG_USERNAME
44 value: {{.Values.credentials.pgusername}}
45 - name: PG_PASSWORD
46 value: {{.Values.credentials.pgpassword}}
47 ports:
48 - containerPort: 5432
49 name: pgpool
50 protocol: TCP
51 readinessProbe:
52 tcpSocket:
53 port: 5432
54 initialDelaySeconds: 20
55 periodSeconds: 10
jasmineWen6715c7d2018-10-10 19:48:21 +000056 livenessProbe:
57 tcpSocket:
Jerome Doucerain67746cc2018-08-29 16:46:23 -040058 port: 5432
59 initialDelaySeconds: 15
60 periodSeconds: 20
61 volumeMounts:
62 - name: pgpool-pgconf
63 mountPath: /pgconf/pgpoolconfigdir
64 readOnly: false
65 volumes:
66 - name: pgpool-pgconf
67 configMap:
jasmineWen6715c7d2018-10-10 19:48:21 +000068 name: {{ include "common.fullname" . }}-pgpool-configmap