stolon
by kvaps
Helm chartv1.7.0App 0.16.0Apache-2.0
Stolon - PostgreSQL cloud native High Availability.
About this chart
Stolon Helm Chart
- Installs Stolon (HA PostgreSQL cluster)
- Based on lwolf/stolon-chart and stolon examples
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
| Parameter | Description | Default |
|---|---|---|
clusterName | stolon cluster name | nil |
image.repository | stolon image repository | sorintlab/stolon |
image.tag | stolon image tag | v0.13.0-pg10 |
image.pullPolicy | stolon image pull policy | IfNotPresent |
image.pullSecrets | stolon image pull secrets as an array | [] (does not add image pull secrets to deployed pods) |
etcdImage.repository | etcd image repository | k8s.gcr.io/etcd-amd64 |
etcdImage.tag | etcd image tag | 2.3.7 |
etcdImage.pullPolicy | etcd image pull policy | IfNotPresent |
debug | Debug mode | false |
shmVolume.enabled | Enable emptyDir volume for /dev/shm on keepers pods | false |
persistence.enabled | Use a PVC to persist data | true |
persistence.storageClassName | Storage class name of backing PVC | "" |
persistence.accessModes | Persistent volumes access modes | ["ReadWriteOnce"] |
persistence.size | Size of data volume | 10Gi |
rbac.create | Specifies if RBAC resources should be created | true |
serviceAccount.create | Specifies if ServiceAccount should be created | true |
serviceAccount.name | Name of the generated ServiceAccount | Defaults to fullname template |
superuserSecret.name | Postgres superuser credential secret name | "" |
superuserSecret.usernameKey | Username key of Postgres superuser in secret | pg_su_username |
superuserSecret.passwordKey | Password key of Postgres superuser in secret | pg_su_password |
superuserUsername | Postgres superuser username | stolon |
superuserPasswordFile | File where to read the Postgres superuser password | |
superuserPassword | Postgres superuser password | (Required if superuserSecret.name and superuserPasswordFile are not set) |
replicationSecret.name | Postgres replication credential secret name | "" |
replicationSecret.usernameKey | Username key of Postgres replication in secret | pg_repl_username |
replicationSecret.passwordKey | Password key of Postgres replication in secret | pg_repl_password |
replicationUsername | Replication username | repluser |
replicationPasswordFile | File where to read the replication password | |
replicationPassword | Replication password | (Required if replicationSecret.name and replicationPasswordFile are not set) |
store.backend | Store backend (kubernetes/consul/etcd) | kubernetes |
store.endpoints | Store backend endpoints | nil |
store.kubeResourceKind | Kubernetes resource kind (only for kubernetes) | configmap |
pgParameters | [postgresql.conf][pgconf] options used during cluster creation | {} |
ports | Ports to expose on pods | {"stolon":{"containerPort": 5432},"metrics":{"containerPort": 8080}} |
serviceMonitor.enabled | Creates a Prometheus serviceMonitor and service object | false |
serviceMonitor.labels | Overrides the default labels added by chart to the ServiceMonitor with labels specified. | {} |
serviceMonitor.namespace | Set to use a different value than the release namespace for deploying the ServiceMonitor object | nil |
serviceMonitor.interval | Set to use a different value than the default Prometheus scrape interval | nil |
serviceMonitor.scrapeTimeout | Set to use a different value than the default Prometheus scrape timeout | nil |
job.autoCreateCluster.enabled | Set to false to force-disable auto-cluster-creation which may clear pre-existing postgres db data | true |
job.autoCreateCluster.resources | Job autoCreaterCluster containers resources | {} |
job.autoCreateCluster.initContainers.resources | Job autoCreaterCluster initContainers resources | {} |
job.initdbScripts.enabled | Set to false to force-disable initdb script execution | true |
job.initdbScripts.resources | Job initdbScripts containers resources | {} |
job.initdbScripts.initContainers.resources | Job autoUpdateClusterSpec initContainers resources | {} |
job.autoUpdateClusterSpec.enabled | Set to false to force-disable auto-cluster-spec-update | true |
job.autoUpdateClusterSpec.resources | Job autoUpdateClusterSpec containers resources | {} |
job.autoUpdateClusterSpec.initContainers.resources | Job autoUpdateClusterSpec initContainers resources | {} |
job.annotations | Annotations for Jobs, the value is evaluated as a template. | {} |
clusterSpec | Stolon cluster spec reference | {} |
tls.enabled | Enable tls support to postgresql | false |
tls.rootCa | Ca certificate | "" |
tls.serverCrt | Server cerfificate | "" |
tls.serverKey | Server key | "" |
tls.existingSecret | Existing secret with certificate content to stolon credentials | "" |
keeper.uid_prefix | Keeper prefix name | keeper |
keeper.replicaCount | Number of keeper nodes | 2 |
keeper.resources | Keeper resource requests/limit | {} |
keeper.priorityClassName | Keeper priorityClassName | nil |
keeper.fsGroup | Keeper securityContext fsGroup, do not set if pg9 or 10 | `` |
keeper.nodeSelector | Node labels for keeper pod assignment | {} |
keeper.affinity | Affinity settings for keeper pod assignment | {} |
keeper.tolerations | Toleration labels for keeper pod assignment | [] |
keeper.volumes | Additional volumes | [] |
keeper.volumeMounts | Mount paths for keeper.volumes | [] |
keeper.hooks.failKeeper.enabled | Enable failkeeper pre-stop hook | false |
keeper.podDisruptionBudget.enabled | If true, create a pod disruption budget for keeper pods. | false |
keeper.podDisruptionBudget.minAvailable | Minimum number / percentage of pods that should remain scheduled | "" |
keeper.podDisruptionBudget.maxUnavailable | Maximum number / percentage of pods that may be made unavailable | "" |
keeper.extraEnv | Extra environment variables for keeper | [] |
proxy.replicaCount | Number of proxy nodes | 2 |
proxy.resources | Proxy resource requests/limit | {} |
proxy.priorityClassName | Proxy priorityClassName | nil |
proxy.nodeSelector | Node labels for proxy pod assignment | {} |
proxy.affinity | Affinity settings for proxy pod assignment | {} |
proxy.tolerations | Toleration labels for proxy pod assignment | [] |
proxy.podDisruptionBudget.enabled | If true, create a pod disruption budget for proxy pods. | false |
proxy.podDisruptionBudget.minAvailable | Minimum number / percentage of pods that should remain scheduled | "" |
proxy.podDisruptionBudget.maxUnavailable | Maximum number / percentage of pods that may be made unavailable | "" |
proxy.extraEnv | Extra environment variables for proxy | [] |
sentinel.replicaCount | Number of sentinel nodes | 2 |
sentinel.resources | Sentinel resource requests/limit | {} |
sentinel.priorityClassName | Sentinel priorityClassName | nil |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartstolon is pinned at v1.7.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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