postgresql

by jouve

Helm chartv0.9.2App 17.5Verified publisher

Deploy postgresql using cloudnative-pg operator

About this chart

postgresql

usage

Prefered using oci:

helm install mailpit oci://ghcr.io/jouve/charts/postgresql

Charts pushed to oci:// are signed keyless via cosign and GitHub Actions OIDC. Verify with:

cosign verify ghcr.io/jouve/charts/postgresql:<version> \
  --certificate-identity-regexp 'https://github.com/jouve/charts/\.github/workflows/release\.yaml@.*' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Or legacy repo:

helm repo add jouve https://jouve.github.io/charts/
helm install mailpit jouve/postgresql

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""
replicaCountNumber of PostgreSQL replicas1
affinity.podAntiAffinityTypeAllowed values are: "preferred" or "required".required
image.registryimage registryghcr.io
image.repositoryimage repositorycloudnative-pg/postgresql
image.tagimage tag (immutable tags are recommended)17.4-3
image.digestimage digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended)""
image.pullPolicyimage pull policyIfNotPresent
image.pullSecretsimage pull secrets[]
backup.enabledEnable backupfalse
backup.endpointURLEndpoint to be used to upload data to the cloud""
backup.endpointCASecretSecret containing ca for the endpoint""
backup.s3.enabledUse s3 for backup storagetrue
backup.s3.bucketNameName of the bucket""
backup.s3.existingSecretName of the secret containing the credentials""
backup.s3.objectBucketClaim.enabledCreate the bucket from an ObjectBucketClaimfalse
backup.s3.objectBucketClaim.storageClassNameStorageClass for the ObjectBucketClaim""
backup.scheduled.enabledEnabled creation of a scheduled backupfalse
backup.scheduled.scheduleSchedule of the scheduled backup0 0 0 * * *
backup.retentionPolicyRetention for backups7d
persistence.storageClassPVC Storage Class for PostgreSQL Primary data volume""
persistence.sizePVC Storage Request for PostgreSQL volume8Gi
networkPolicy.enabledEnable network policiesfalse
networkPolicy.apiserver.peernetworkPolicyPeer of the apiserver{}
networkPolicy.apiserver.portport of the apiserver6443
networkPolicy.backup.peernetworkPolicyPeer of the object storage (see backup){}
networkPolicy.cnpg.peernetworkPolicyPeer of the operator, matches https://cloudnative-pg.io/documentation/1.20/installation_upgrade/ if not defined{}
networkPolicy.metrics.peernetworkPolicyPeer of the metrics scrape{}
networkPolicy.egressRulesadditional egress rules[]
networkPolicy.ingressRulesadditional ingress rules[]
certificates.modemanage certificates by the operator or cert-manageroperator-manager
certificates.issuerRefcert-manager issuer for certificates. selfSigned issuer is created if empty{}

Metrics Parameters

NameDescriptionValue
metrics.enabledStart a prometheus exporterfalse
metrics.podMonitor.enabledCreate PodMonitor Resource for scraping metrics using Prometheus Operatorfalse

Deploy postgresql with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has postgresql on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpostgresql is pinned at v0.9.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply