radondb-postgresql

by KubeSphere

Helm chartv1.0.2App 11.11.0Verified publisher

Chart for PostgreSQL with HA architecture.

About this chart

What is RadonDB PostgreSQL

RadonDB PostgreSQL is an open-source, cloud-native, highly availability cluster solutions based on PostgreSQL.

RadonDB PostgreSQL supports Kubernetes or KubeShpere platforms.

Architecture

  • Supporting automatic failover through repmgr
  • Load-balancing I/O traffic through Pgpool-II
  • Keeping data consistency through PostgreSQL Streaming Replication

Features

  • High Availability PostgreSQL database
    • Leader-follower switching in second-level
    • Asynchronous or Synchronous streaming replication
    • Automatic failover
  • Cluster Management
  • Failover and Load-Balancing
  • Parameter Tuning

Installing the Chart

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

## For Helm v2
$ helm install . --name my-release

## For Helm v3
$ helm install --name my-release .

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

Uninstall

To uninstall/delete the my-release deployment:

$ helm delete my-release

To delete the pvc:

kubectl delete pvc data-my-release-radondb-postgresql-0
kubectl delete pvc data-my-release-radondb-postgresql-1
kubectl delete pvc data-my-release-radondb-postgresql-2

The commands remove all the Kubernetes components associated with the chart and deletes the release completely.

Configuration

ParameterDescriptionDefault
Global
global.imageRegistryGlobal Docker image registrynil
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
global.postgresql.existingSecretName of existing secret to use for PostgreSQL passwords (overrides postgresql.existingSecret)nil
global.postgresql.usernamePostgreSQL username (overrides postgresql.username)nil
global.postgresql.passwordPostgreSQL password (overrides postgresql.password)nil
global.postgresql.databasePostgreSQL database (overrides postgresql.database)nil
global.postgresql.repmgrUsernamePostgreSQL repmgr username (overrides postgresql.repmgrUsername)nil
global.postgresql.repmgrPasswordPostgreSQL repmgr password (overrides postgresql.repmgrpassword)nil
global.postgresql.repmgrDatabasePostgreSQL repmgr database (overrides postgresql.repmgrDatabase)nil
global.ldap.existingSecretName of existing secret to use for LDAP passwords (overrides ldap.existingSecret)nil
global.ldap.bindpwLDAP bind password (overrides ldap.bindpw)nil
global.pgpool.adminUsernamePgpool Admin username (overrides pgpool.adminUsername)nil
global.pgpool.adminPasswordPgpool Admin password (overrides pgpool.adminPassword)nil
General
commonLabelsLabels to add to all deployed objectsnil
commonAnnotationsAnnotations to add to all deployed objects[]
nameOverrideString to partially override postgres-ha.fullname template with a stringnil
fullnameOverrideString to fully override postgres-ha.fullname template with a stringnil
clusterDomainDefault Kubernetes cluster domaincluster.local
extraDeployArray of extra objects to deploy with the release (evaluated as a template).nil
serviceAccount.enabledEnable service account (Note: Service Account will only be automatically created if serviceAccount.name is not set)false
serviceAccount.nameName of existing service accountnil
PostgreSQL with Repmgr
postgresqlImage.registryRegistry for PostgreSQL with Repmgr imagedocker.io
postgresqlImage.tagTag for PostgreSQL with Repmgr image{TAG_NAME}
postgresqlImage.pullPolicyPostgreSQL with Repmgr image pull policyIfNotPresent
postgresqlImage.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
postgresqlImage.debugSpecify if debug logs should be enabledfalse
postgresql.hostAliasesAdd deployment host aliases[]
postgresql.labelsMap of labels to add to the statefulset. Evaluated as a template{}
postgresql.podLabelsMap of labels to add to the pods. Evaluated as a template{}
postgresql.replicaCountThe number of replicas to deploy2
postgresql.updateStrategyTypeStatefulset update strategy policyRollingUpdate
postgresql.podAnnotationsAdditional pod annotations{}
postgresql.priorityClassNamePod priority class``
postgresql.podAffinityPresetPostgreSQL pod affinity preset. Ignored if postgresql.affinity is set. Allowed values: soft or hard""
postgresql.podAntiAffinityPresetPostgreSQL pod anti-affinity preset. Ignored if postgresql.affinity is set. Allowed values: soft or hardsoft
postgresql.nodeAffinityPreset.typePostgreSQL node affinity preset type. Ignored if postgresql.affinity is set. Allowed values: soft or hard""
postgresql.nodeAffinityPreset.keyPostgreSQL node label key to match Ignored if postgresql.affinity is set.""
postgresql.nodeAffinityPreset.valuesPostgreSQL node label values to match. Ignored if postgresql.affinity is set.[]
postgresql.affinityAffinity for PostgreSQL pods assignment{} (evaluated as a template)
postgresql.nodeSelectorNode labels for PostgreSQL pods assignment{} (evaluated as a template)
postgresql.tolerationsTolerations for PostgreSQL pods assignment[] (evaluated as a template)
postgresql.securityContext.*Other pod security context to be included as-is in the pod spec{}
postgresql.securityContext.enabledEnable security context for PostgreSQL with Repmgrtrue
postgresql.securityContext.fsGroupGroup ID for the PostgreSQL with Repmgr filesystem1001
postgresql.containerSecurityContext.*Other container security context to be included as-is in the container spec{}
postgresql.containerSecurityContext.enabledEnable container security contexttrue
postgresql.containerSecurityContext.runAsUserUser ID for the PostgreSQL with Repmgr container1001
postgresql.resourcesThe [resources] to allocate for container{}
postgresql.livenessProbeLiveness probe configuration for PostgreSQL with RepmgrCheck values.yaml file
postgresql.readinessProbeReadiness probe configuration for PostgreSQL with RepmgrCheck values.yaml file
postgresql.startupProbeStartup probe configuration for PostgreSQL with RepmgrCheck values.yaml file
postgresql.customLivenessProbeOverride default liveness probenil
postgresql.customReadinessProbeOverride default readiness probenil
postgresql.customStartupProbeOverride default startup probenil
postgresql.extraVolumeMountsArray of extra volume mounts to be added to the container (evaluated as template). Normally used with extraVolumes.nil
postgresql.sidecarsAttach additional containers to the pod (evaluated as a template)nil
postgresql.initContainersAdd additional init containers to the pod (evaluated as a template)nil
postgresql.extraEnvVarsArray containing extra env varsnil
postgresql.extraEnvVarsCMConfigMap containing extra env varsnil
postgresql.extraEnvVarsSecretSecret containing extra env vars (in case of sensitive data)nil
postgresql.commandOverride default container command (useful when using custom images)nil

Deploy radondb-postgresql with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has radondb-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 chartradondb-postgresql is pinned at v1.0.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