Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): Adding pgAdmin configuration #196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions helm/postgres/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,22 @@ spec:
customReplicationTLSSecret:
{{ toYaml .Values.customReplicationTLSSecret | indent 4 }}
{{- end }}
{{- if .Values.pgAdmin }}
userInterface:
pgAdmin:
image: {{ default "" .Values.imagePgAdmin | quote }}
{{- if .Values.pgAdminConfig }}
{{ toYaml .Values.pgAdminConfig | nindent 6 }}
{{- else }}
replicas: {{ default 1 .Values.pgAdminReplicas }}
dataVolumeClaimSpec:
{{- if .Values.pgAdminStorageClassName }}
storageClassName: {{ .Values.pgAdminStorageClassName | quote }}
{{- end }}
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: {{ default "1Gi" .Values.pgAdminSize | quote }}
{{- end }}
{{- end }}
48 changes: 43 additions & 5 deletions helm/postgres/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ postgresVersion: 14
# This defaults to the value below.
# imageExporter: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.3.1-0

# imagePgAdmin is the image name for the optional pgAdmin instance
# imagePgAdmin: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-10

###########################
# Basic Postgres Settings #
###########################
Expand Down Expand Up @@ -133,7 +136,7 @@ postgresVersion: 14
# patroni: {}

# users sets any custom Postgres users and databases that they have access to
# as well as any permissions assoicated with the user account.
# as well as any permissions associated with the user account.
# users: {}

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

# databaseInitSQL referencs a ConfigMap that contains a SQL file that should be
# databaseInitSQL references a ConfigMap that contains a SQL file that should be
# run a cluster bootstrap.
# databaseInitSQL:
# name: bootstrap-sql
# key: bootstrap.sql

# standby sets whether or not to run this as a standby cluster. Setting "enabled" to
# "true" eunables the standby cluster while "repoName" points to a pgBackRest
# "true" enables the standby cluster while "repoName" points to a pgBackRest
# archive to replay WAL files from, and "host" and "port" point to a primary
# cluster from which to stream data.
# standby:
Expand Down Expand Up @@ -191,7 +194,7 @@ postgresVersion: 14
# # endpoint specifies the S3 endpoint to use.
# endpoint: ""
# # region specifies the S3 region to use. If your S3 storage system does not
# # use "region", fill this in with a random vaule.
# # use "region", fill this in with a random value.
# region: ""
# # key is the S3 key. This is stored in a Secret.
# key: ""
Expand All @@ -201,7 +204,7 @@ postgresVersion: 14
# keyType: ""
# # encryptionPassphrase is an optional parameter to enable encrypted backups
# # with pgBackRest. This is encrypted by pgBackRest and does not use S3's
# # built-in encrpytion system.
# # built-in encryption system.
# encryptionPassphrase: ""

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

# backupsSize sets the storage size of the backups to a volume in Kubernetes.
# can be overridden by "pgBackRestConfig", if set. Defaults to the value below.
# backupsSize: 1Gi

# backupsStorageClassName sets the storage class to a class existing in Kubernetes.
# Defaults to the "default" storage class defined in the cluster.
# Can be overridden by "pgBackRestConfig", if set.
# backupsStorageClassName: "hostpath"

############################
# User Interface, pgAdmin4 #
############################

# Install optional pgAdmin 4 instance
pgAdmin: false

# pgAdminReplicas sets the number of pgBouncer instances to deploy. The
# default is 1. Setting "pgAdminConfig" will override the value of
# pgAdminReplicas.
# pgAdminReplicas: 1

# pgAdminSize sets the size of the volume that contains the pgAdmin data.
# pgAdminSize: 1Gi

# pgAdminStorageClassName sets the storage class for the volume that volume that
# contains the pgAdmin data. This defaults to the "default" storage class defined
# in the cluster.
# See: 'kubectl get storageclasses.storage.k8s.io | grep default'
# pgAdminStorageClassName: "hostpath"

# pgAdminConfig permits to sets all of the userInterface.pgAdmin entries except
# for the image.
# pgAdminConfig: {}


#######################
# Kubernetes Settings #
#######################
Expand Down