Jerome Doucerain | 67746cc | 2018-08-29 16:46:23 -0400 | [diff] [blame] | 1 | {{/* |
| 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 | */}} |
| 16 | kind: Deployment |
| 17 | apiVersion: extensions/v1beta1 |
jasmineWen | 6715c7d | 2018-10-10 19:48:21 +0000 | [diff] [blame] | 18 | metadata: |
Jerome Doucerain | 67746cc | 2018-08-29 16:46:23 -0400 | [diff] [blame] | 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 }} |
jasmineWen | 6715c7d | 2018-10-10 19:48:21 +0000 | [diff] [blame] | 26 | spec: |
Jerome Doucerain | 67746cc | 2018-08-29 16:46:23 -0400 | [diff] [blame] | 27 | replicas: 2 |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
| 32 | release: {{ .Release.Name }} |
| 33 | spec: |
| 34 | containers: |
jasmineWen | f7997b4 | 2018-09-19 23:37:35 +0000 | [diff] [blame] | 35 | - image: "{{.Values.repository}}/{{.Values.image}}" |
| 36 | imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }} |
| 37 | name: {{ include "common.name" . }} |
Jerome Doucerain | 67746cc | 2018-08-29 16:46:23 -0400 | [diff] [blame] | 38 | 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 |
jasmineWen | 6715c7d | 2018-10-10 19:48:21 +0000 | [diff] [blame] | 56 | livenessProbe: |
| 57 | tcpSocket: |
Jerome Doucerain | 67746cc | 2018-08-29 16:46:23 -0400 | [diff] [blame] | 58 | 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: |
jasmineWen | 6715c7d | 2018-10-10 19:48:21 +0000 | [diff] [blame] | 68 | name: {{ include "common.fullname" . }}-pgpool-configmap |