postgresql

by KubeGems

Helm chartv10.5.1App 11.12.0

Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.

About this chart

PostgreSQL

PostgreSQL is an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.

For HA, please see this repo

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/postgresql

Introduction

This chart bootstraps a PostgreSQL deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.1.0
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release bitnami/postgresql

The command deploys PostgreSQL on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release.

To delete the PVC's associated with my-release:

$ kubectl delete pvc -l release=my-release

Note: Deleting the PVC's will delete postgresql data as well. Please be cautious before doing it.

Parameters

The following tables lists the configurable parameters of the PostgreSQL chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker Image registrynil
global.postgresql.postgresqlDatabasePostgreSQL database (overrides postgresqlDatabase)nil
global.postgresql.postgresqlUsernamePostgreSQL username (overrides postgresqlUsername)nil
global.postgresql.existingSecretName of existing secret to use for PostgreSQL passwords (overrides existingSecret)nil
global.postgresql.postgresqlPasswordPostgreSQL admin password (overrides postgresqlPassword)nil
global.postgresql.servicePortPostgreSQL port (overrides service.port)nil
global.postgresql.replicationPasswordReplication user password (overrides replication.password)nil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
image.registryPostgreSQL Image registrydocker.io
image.repositoryPostgreSQL Image namebitnami/postgresql
image.tagPostgreSQL Image tag{TAG_NAME}
image.pullPolicyPostgreSQL Image pull policyIfNotPresent
image.pullSecretsSpecify Image pull secretsnil (does not add image pull secrets to deployed pods)
image.debugSpecify if debug values should be setfalse
nameOverrideString to partially override common.names.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override common.names.fullname template with a stringnil
volumePermissions.enabledEnable init container that changes volume permissions in the data directory (for cases where the default k8s runAsUser and fsUser values do not work)false
volumePermissions.image.registryInit container volume-permissions image registrydocker.io

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 v10.5.1 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