Skip to content

Commit 94814e4

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Move Postgres Helm chart to use defaults and requires
This starts pushing the chart towards more acceptable conventions, as well as greater usability.
1 parent 6bb5ee3 commit 94814e4

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

helm/postgres/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: postgrescluster
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.1.0
5+
version: 0.1.1
66
appVersion: 5.0.3

helm/postgres/templates/postgres.yaml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: postgres-operator.crunchydata.com/v1beta1
22
kind: PostgresCluster
33
metadata:
4-
name: {{ .Values.name }}
4+
name: {{ required "You must give your Postgres cluster a name" .Values.name }}
55
spec:
6-
image: {{ .Values.postgres }}
7-
postgresVersion: {{ .Values.postgresVersion }}
6+
image: {{ default "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.4-1" .Values.postgres | quote }}
7+
postgresVersion: {{ default 13 .Values.postgresVersion }}
88
instances:
99
- name: instance1
1010
dataVolumeClaimSpec:
@@ -15,7 +15,7 @@ spec:
1515
storage: 1Gi
1616
backups:
1717
pgbackrest:
18-
image: {{ .Values.pgBackRest}}
18+
image: {{ default "registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.35-0" .Values.pgBackRest | quote }}
1919
repos:
2020
- name: repo1
2121
volume:
@@ -25,14 +25,6 @@ spec:
2525
resources:
2626
requests:
2727
storage: 1Gi
28-
- name: repo2
29-
volume:
30-
volumeClaimSpec:
31-
accessModes:
32-
- "ReadWriteOnce"
33-
resources:
34-
requests:
35-
storage: 1Gi
3628
proxy:
3729
pgBouncer:
38-
image: {{ .Values.pgBouncer}}
30+
image: {{ default "registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.15-3" .Values.pgBouncer | quote}}

helm/postgres/values.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
# Cluster name
33
name: hippo
44

5-
# PostgreSQL Version
6-
# Version should match version defined in PostgreSQL images
7-
postgresVersion: 13
8-
9-
# Images
10-
postgres: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.4-1
11-
pgBackRest: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.35-0
12-
pgBouncer: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.15-3
5+
# postgresVersion should match the version of Potsgres you are deploying from
6+
# the image. This defaults to the below value.
7+
# postgresVersion: 13
8+
9+
# postgres can be a Postgres or GIS-enabled Postgres image. This defaults to the
10+
# below value
11+
# postgres: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.4-1
12+
13+
# pgBackRest is the pgBackRest backup utility image. This defaults to the below
14+
# value
15+
# pgBackRest: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.35-0
16+
17+
# pgBouncer is the image for the PgBouncer connection pooler. This defaults to
18+
# the below value
19+
# pgBouncer: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.15-3

0 commit comments

Comments
 (0)