postgresql

by joaquinito2051

Helm chartv5.0.0App 11.3.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.

TL;DR;

$ helm install <helm-repo>/postgresql

$ helm install stable/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.10+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

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

$ helm install --name my-release <helm-repo>/postgresql

$ helm install --name my-release stable/postgresql The command deploys PostgreSQL on the Kubernetes cluster in the default configuration. The configuration 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 associated with the chart and deletes the release.

Configuration

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.postgresqlPasswordName of existing secret to use for PostgreSQL passwords (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)
image.registryPostgreSQL Image registrydocker.io
image.repositoryPostgreSQL Image namebitnami/postgresql
image.tagPostgreSQL Image tag{VERSION}
image.pullPolicyPostgreSQL Image pull policyAlways
image.pullSecretsSpecify Image pull secretsnil (does not add image pull secrets to deployed pods)
image.debugSpecify if debug values should be setfalse
volumePermissions.image.registryInit container volume-permissions image registrydocker.io
volumePermissions.image.repositoryInit container volume-permissions image namebitnami/minideb
volumePermissions.image.tagInit container volume-permissions image taglatest
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.securityContext.runAsUserUser ID for the init container0
usePasswordFileHave the secrets mounted as a file instead of env varsfalse
replication.enabledWould you like to enable replicationfalse
replication.userReplication userrepl_user
replication.passwordReplication user passwordrepl_password
replication.slaveReplicasNumber of slaves replicas1
replication.synchronousCommitSet synchronous commit mode. Allowed values: on, remote_apply, remote_write, local and offoff
replication.numSynchronousReplicasNumber of replicas that will have synchronous replication. Note: Cannot be greater than replication.slaveReplicas.0
replication.applicationNameCluster application name. Useful for advanced replication settingsmy_application
existingSecretName of existing secret to use for PostgreSQL passwordsnil
postgresqlUsernamePostgreSQL admin userpostgres
postgresqlPasswordPostgreSQL admin passwordrandom 10 character alphanumeric string
postgresqlDatabasePostgreSQL databasenil
postgresqlDataDirPostgreSQL data dir folder/bitnami/postgresql (same value as persistence.mountPath)
postgresqlInitdbArgsPostgreSQL initdb extra argumentsnil
postgresqlInitdbWalDirPostgreSQL location for transaction lognil
postgresqlConfigurationRuntime Config Parametersnil
postgresqlExtendedConfExtended Runtime Config Parameters (appended to main or default configuration)nil
pgHbaConfigurationContent of pg_hba.confnil (do not create pg_hba.conf)
configurationConfigMapConfigMap with the PostgreSQL configuration files (Note: Overrides postgresqlConfiguration and pgHbaConfiguration). The value is evaluated as a template.nil
extendedConfConfigMapConfigMap with the extended PostgreSQL configuration files. The value is evaluated as a template.nil
initdbScriptsDictionary of initdb scriptsnil
initdbScriptsConfigMapConfigMap with the initdb scripts (Note: Overrides initdbScripts). The value is evaluated as a template.nil
initdbScriptsSecretSecret with initdb scripts that contain sensitive information (Note: can be used with initdbScriptsConfigMap or initdbScripts). The value is evaluated as a template.nil
service.typeKubernetes Service typeClusterIP
service.portPostgreSQL port5432
service.nodePortKubernetes Service nodePortnil
service.annotationsAnnotations for PostgreSQL service{}
service.loadBalancerIPloadBalancerIP if service type is LoadBalancernil
service.loadBalancerSourceRangesAddress that are allowed when svc is LoadBalancer[]
persistence.enabledEnable persistence using PVCtrue
persistence.existingClaimProvide an existing PersistentVolumeClaim, the value is evaluated as a template.nil
persistence.mountPathPath to mount the volume at

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 v5.0.0 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