Skip to content

Commit 9f6b8d8

Browse files
committed
feat(helm): Adding pgAdmin configuration
+ a few typos in the docs
1 parent f14aeff commit 9f6b8d8

File tree

2 files changed

+62
-5
lines changed

2 files changed

+62
-5
lines changed

Diff for: helm/postgres/templates/postgres.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,22 @@ spec:
212212
customReplicationTLSSecret:
213213
{{ toYaml .Values.customReplicationTLSSecret | indent 4 }}
214214
{{- end }}
215+
{{- if .Values.pgAdmin }}
216+
userInterface:
217+
pgAdmin:
218+
image: {{ default "" .Values.imagePgAdmin | quote }}
219+
{{- if .Values.pgAdminConfig }}
220+
{{ toYaml .Values.pgAdminConfig | nindent 6 }}
221+
{{- else }}
222+
replicas: {{ default 1 .Values.pgAdminReplicas }}
223+
dataVolumeClaimSpec:
224+
{{- if .Values.pgAdminStorageClassName }}
225+
storageClassName: {{ .Values.pgAdminStorageClassName | quote }}
226+
{{- end }}
227+
accessModes:
228+
- "ReadWriteOnce"
229+
resources:
230+
requests:
231+
storage: {{ default "1Gi" .Values.pgAdminSize | quote }}
232+
{{- end }}
233+
{{- end }}

Diff for: helm/postgres/values.yaml

+43-5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ postgresVersion: 14
6161
# This defaults to the value below.
6262
# imageExporter: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.3.1-0
6363

64+
# imagePgAdmin is the image name for the optional pgAdmin instance
65+
# imagePgAdmin: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-10
66+
6467
###########################
6568
# Basic Postgres Settings #
6669
###########################
@@ -133,7 +136,7 @@ postgresVersion: 14
133136
# patroni: {}
134137

135138
# users sets any custom Postgres users and databases that they have access to
136-
# as well as any permissions assoicated with the user account.
139+
# as well as any permissions associated with the user account.
137140
# users: {}
138141

139142
# dataSource specifies a data source for bootstrapping a Postgres cluster.
@@ -149,14 +152,14 @@ postgresVersion: 14
149152
# provides the information for the replication user.
150153
# customReplicationTLSSecret: {}
151154

152-
# databaseInitSQL referencs a ConfigMap that contains a SQL file that should be
155+
# databaseInitSQL references a ConfigMap that contains a SQL file that should be
153156
# run a cluster bootstrap.
154157
# databaseInitSQL:
155158
# name: bootstrap-sql
156159
# key: bootstrap.sql
157160

158161
# standby sets whether or not to run this as a standby cluster. Setting "enabled" to
159-
# "true" eunables the standby cluster while "repoName" points to a pgBackRest
162+
# "true" enables the standby cluster while "repoName" points to a pgBackRest
160163
# archive to replay WAL files from, and "host" and "port" point to a primary
161164
# cluster from which to stream data.
162165
# standby:
@@ -191,7 +194,7 @@ postgresVersion: 14
191194
# # endpoint specifies the S3 endpoint to use.
192195
# endpoint: ""
193196
# # region specifies the S3 region to use. If your S3 storage system does not
194-
# # use "region", fill this in with a random vaule.
197+
# # use "region", fill this in with a random value.
195198
# region: ""
196199
# # key is the S3 key. This is stored in a Secret.
197200
# key: ""
@@ -201,7 +204,7 @@ postgresVersion: 14
201204
# keyType: ""
202205
# # encryptionPassphrase is an optional parameter to enable encrypted backups
203206
# # with pgBackRest. This is encrypted by pgBackRest and does not use S3's
204-
# # built-in encrpytion system.
207+
# # built-in encryption system.
205208
# encryptionPassphrase: ""
206209

207210
# gcs allows for Google Cloud Storage (GCS) to be used for backups. This allows
@@ -277,6 +280,41 @@ postgresVersion: 14
277280
# "monitoring" setting.
278281
# monitoringConfig: {}
279282

283+
# backupsSize sets the storage size of the backups to a volume in Kubernetes.
284+
# can be overridden by "pgBackRestConfig", if set. Defaults to the value below.
285+
# backupsSize: 1Gi
286+
287+
# backupsStorageClassName sets the storage class to a class existing in Kubernetes.
288+
# Defaults to the "default" storage class defined in the cluster.
289+
# Can be overridden by "pgBackRestConfig", if set.
290+
# backupsStorageClassName: "hostpath"
291+
292+
############################
293+
# User Interface, pgAdmin4 #
294+
############################
295+
296+
# Install optional pgAdmin 4 instance
297+
pgAdmin: false
298+
299+
# pgAdminReplicas sets the number of pgBouncer instances to deploy. The
300+
# default is 1. Setting "pgAdminConfig" will override the value of
301+
# pgAdminReplicas.
302+
# pgAdminReplicas: 1
303+
304+
# pgAdminSize sets the size of the volume that contains the pgAdmin data.
305+
# pgAdminSize: 1Gi
306+
307+
# pgAdminStorageClassName sets the storage class for the volume that volume that
308+
# contains the pgAdmin data. This defaults to the "default" storage class defined
309+
# in the cluster.
310+
# See: 'kubectl get storageclasses.storage.k8s.io | grep default'
311+
# pgAdminStorageClassName: "hostpath"
312+
313+
# pgAdminConfig permits to sets all of the userInterface.pgAdmin entries except
314+
# for the image.
315+
# pgAdminConfig: {}
316+
317+
280318
#######################
281319
# Kubernetes Settings #
282320
#######################

0 commit comments

Comments
 (0)