stolon

by kvaps

Helm chartv1.7.0App 0.16.0Apache-2.0

Stolon - PostgreSQL cloud native High Availability.

About this chart

Stolon Helm Chart

TL;DR;

$ helm install stable/stolon

Installing the Chart

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

$ helm install --name my-release stable/stolon

Backend

Kubernetes is the default store backend. consul, etcdv2 or etcdv3 can also be used as the store backend.

Configuration

ParameterDescriptionDefault
clusterNamestolon cluster namenil
image.repositorystolon image repositorysorintlab/stolon
image.tagstolon image tagv0.13.0-pg10
image.pullPolicystolon image pull policyIfNotPresent
image.pullSecretsstolon image pull secrets as an array[] (does not add image pull secrets to deployed pods)
etcdImage.repositoryetcd image repositoryk8s.gcr.io/etcd-amd64
etcdImage.tagetcd image tag2.3.7
etcdImage.pullPolicyetcd image pull policyIfNotPresent
debugDebug modefalse
shmVolume.enabledEnable emptyDir volume for /dev/shm on keepers podsfalse
persistence.enabledUse a PVC to persist datatrue
persistence.storageClassNameStorage class name of backing PVC""
persistence.accessModesPersistent volumes access modes["ReadWriteOnce"]
persistence.sizeSize of data volume10Gi
rbac.createSpecifies if RBAC resources should be createdtrue
serviceAccount.createSpecifies if ServiceAccount should be createdtrue
serviceAccount.nameName of the generated ServiceAccountDefaults to fullname template
superuserSecret.namePostgres superuser credential secret name""
superuserSecret.usernameKeyUsername key of Postgres superuser in secretpg_su_username
superuserSecret.passwordKeyPassword key of Postgres superuser in secretpg_su_password
superuserUsernamePostgres superuser usernamestolon
superuserPasswordFileFile where to read the Postgres superuser password
superuserPasswordPostgres superuser password(Required if superuserSecret.name and superuserPasswordFile are not set)
replicationSecret.namePostgres replication credential secret name""
replicationSecret.usernameKeyUsername key of Postgres replication in secretpg_repl_username
replicationSecret.passwordKeyPassword key of Postgres replication in secretpg_repl_password
replicationUsernameReplication usernamerepluser
replicationPasswordFileFile where to read the replication password
replicationPasswordReplication password(Required if replicationSecret.name and replicationPasswordFile are not set)
store.backendStore backend (kubernetes/consul/etcd)kubernetes
store.endpointsStore backend endpointsnil
store.kubeResourceKindKubernetes resource kind (only for kubernetes)configmap
pgParameters[postgresql.conf][pgconf] options used during cluster creation{}
portsPorts to expose on pods{"stolon":{"containerPort": 5432},"metrics":{"containerPort": 8080}}
serviceMonitor.enabledCreates a Prometheus serviceMonitor and service objectfalse
serviceMonitor.labelsOverrides the default labels added by chart to the ServiceMonitor with labels specified.{}
serviceMonitor.namespaceSet to use a different value than the release namespace for deploying the ServiceMonitor objectnil
serviceMonitor.intervalSet to use a different value than the default Prometheus scrape intervalnil
serviceMonitor.scrapeTimeoutSet to use a different value than the default Prometheus scrape timeoutnil
job.autoCreateCluster.enabledSet to false to force-disable auto-cluster-creation which may clear pre-existing postgres db datatrue
job.autoCreateCluster.resourcesJob autoCreaterCluster containers resources{}
job.autoCreateCluster.initContainers.resourcesJob autoCreaterCluster initContainers resources{}
job.initdbScripts.enabledSet to false to force-disable initdb script executiontrue
job.initdbScripts.resourcesJob initdbScripts containers resources{}
job.initdbScripts.initContainers.resourcesJob autoUpdateClusterSpec initContainers resources{}
job.autoUpdateClusterSpec.enabledSet to false to force-disable auto-cluster-spec-updatetrue
job.autoUpdateClusterSpec.resourcesJob autoUpdateClusterSpec containers resources{}
job.autoUpdateClusterSpec.initContainers.resourcesJob autoUpdateClusterSpec initContainers resources{}
job.annotationsAnnotations for Jobs, the value is evaluated as a template.{}
clusterSpecStolon cluster spec reference{}
tls.enabledEnable tls support to postgresqlfalse
tls.rootCaCa certificate""
tls.serverCrtServer cerfificate""
tls.serverKeyServer key""
tls.existingSecretExisting secret with certificate content to stolon credentials""
keeper.uid_prefixKeeper prefix namekeeper
keeper.replicaCountNumber of keeper nodes2
keeper.resourcesKeeper resource requests/limit{}
keeper.priorityClassNameKeeper priorityClassNamenil
keeper.fsGroupKeeper securityContext fsGroup, do not set if pg9 or 10``
keeper.nodeSelectorNode labels for keeper pod assignment{}
keeper.affinityAffinity settings for keeper pod assignment{}
keeper.tolerationsToleration labels for keeper pod assignment[]
keeper.volumesAdditional volumes[]
keeper.volumeMountsMount paths for keeper.volumes[]
keeper.hooks.failKeeper.enabledEnable failkeeper pre-stop hookfalse
keeper.podDisruptionBudget.enabledIf true, create a pod disruption budget for keeper pods.false
keeper.podDisruptionBudget.minAvailableMinimum number / percentage of pods that should remain scheduled""
keeper.podDisruptionBudget.maxUnavailableMaximum number / percentage of pods that may be made unavailable""
keeper.extraEnvExtra environment variables for keeper[]
proxy.replicaCountNumber of proxy nodes2
proxy.resourcesProxy resource requests/limit{}
proxy.priorityClassNameProxy priorityClassNamenil
proxy.nodeSelectorNode labels for proxy pod assignment{}
proxy.affinityAffinity settings for proxy pod assignment{}
proxy.tolerationsToleration labels for proxy pod assignment[]
proxy.podDisruptionBudget.enabledIf true, create a pod disruption budget for proxy pods.false
proxy.podDisruptionBudget.minAvailableMinimum number / percentage of pods that should remain scheduled""
proxy.podDisruptionBudget.maxUnavailableMaximum number / percentage of pods that may be made unavailable""
proxy.extraEnvExtra environment variables for proxy[]
sentinel.replicaCountNumber of sentinel nodes2
sentinel.resourcesSentinel resource requests/limit{}
sentinel.priorityClassNameSentinel priorityClassNamenil
sentinel.nodeSelector

Deploy stolon with OpenTenant

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