postgresql

by Helm

Helm chartv16.6.0App 16.6.0

Asgard of Choerodon.

About this chart

postgresql

Asgard of Choerodon.

Installing the Chart

To install the chart with the release name postgresql:

$ helm repo add c7n https://openchart.choerodon.com.cn/choerodon/c7n
$ helm repo update
$ helm install postgresql c7n/postgresql

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Uninstalling the Chart

$ helm delete postgresql

Requirements

RepositoryNameVersion
https://openchart.choerodon.com.cn/choerodon/c7ncommon1.x.x

Values

KeyTypeDefaultDescription
affinityobject{}Affinity for pod assignment. Evaluated as a template. Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity #
argslist[]Args for running the server container (set to default if not set). Use array form #
automountServiceAccountTokenboolfalseAutomountServiceAccountToken indicates whether a service account token should be automatically mounted. #
backup.enabledboolfalse
backup.extraEnv.S3_ACCESS_KEYstringnil
backup.extraEnv.S3_BUCKETstring"zkc7n-backup/pgsql"
backup.extraEnv.S3_ENDPOINTstringnil
backup.extraEnv.S3_SECRET_KEYstringnil
backup.mc.pullPolicystring"IfNotPresent"Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' # ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images #
backup.mc.pullSecretslist[]Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ # e.g: # pullSecrets: # - myRegistryKeySecretName #
backup.mc.registrystring"registry.cn-shanghai.aliyuncs.com"minio client image registry
backup.mc.repositorystring"c7n/mc"minio client image repository
backup.mc.tagstring"RELEASE.2025-04-16T18-13-26Z"xtrabackup image tag.
backup.schedulestring"0 2 * * *"
commandlist[]Command for running the server container (set to default if not set). Use array form #
commonAnnotationsobject{}Add annotations to all the deployed resources #
commonLabelsobject{}Add labels to all the deployed resources #
containerPort.serverPortint5432server port
customLivenessProbeobject{}Custom Liveness
customReadinessProbeobject{}Custom Readiness
customStartupProbeobject{}Custom Startup probes
enableServiceLinksboolfalseEnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to false. #
extraEnv.POSTGRESQL_DATABASEstring"gitlabhq_production"
extraEnv.POSTGRESQL_LOG_TIMEZONEstring"Asia/Shanghai"
extraEnv.POSTGRESQL_PASSWORDstring"PXrSY7JtGwvM4Vo0"
extraEnv.POSTGRESQL_POSTGRES_PASSWORDstring"PXrSY7JtGwvM4Vo0"
extraEnv.POSTGRESQL_REPLICATION_PASSWORDstring"PXrSY7JtGwvM4Vo0"
extraEnv.POSTGRESQL_REPLICATION_USERstring"replication_user"
extraEnv.POSTGRESQL_TIMEZONEstring"Asia/Shanghai"
extraEnv.POSTGRESQL_USERNAMEstring"choerodon"
extraEnv.TZstring"Asia/Shanghai"
extraEnvVarsCMstring""ConfigMap with extra environment variables #
extraEnvVarsSecretstring""Secret with extra environment variables #
extraVolumeMountslist[]Extra volume mounts to add to server containers #
extraVolumeslist[]Extra volumes to add to the server statefulset #
fullnameOverridestringnilString to fully override common.names.fullname template #
global.imagePullSecretslist[]Global Docker registry secret names as an array # E.g. # imagePullSecrets: # - myRegistryKeySecretName #
global.imageRegistrystringnilGlobal Docker image registry
global.storageClassstringnilGlobal StorageClass for Persistent Volume(s)
hostAliaseslist[]server pod host aliases # https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ #
image.pullPolicystring"IfNotPresent"Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' # ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images #
image.pullSecretslist[]Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ # e.g: # pullSecrets: # - myRegistryKeySecretName #
image.registrystring"registry.cn-shanghai.aliyuncs.com"service image registry
image.repositorystring"c7n/postgresql"service image repository
image.tagstringnilservice image tag. Default Chart.AppVersion
ingress.annotationsobject{}Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. # Use this parameter to set the required annotations for cert-manager, see # ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations # e.g: # annotations: # kubernetes.io/ingress.class: nginx # cert-manager.io/cluster-issuer: cluster-issuer-name #
ingress.apiVersionstring""Force Ingress API version (automatically detected if not set) #
ingress.enabledboolfalseEnable ingress record generation for Discourse #
ingress.extraHostslist[]An array with additional hostname(s) to be covered with the ingress record # e.g: # extraHosts: # - name: discourse.local # path: / #
ingress.extraPathslist[]An array with additional arbitrary paths that may need to be added to the ingress under the main host # e.g: # extraPaths: # - path: /* # backend: # serviceName: ssl-redirect # servicePort: use-annotation #
ingress.extraTlslist[]TLS configuration for additional hostname(s) to be covered with this ingress record # ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls # e.g: # extraTls: # - hosts: # - discourse.local # secretName: discourse.local-tls #
ingress.hostnamestring"server.local"Default host for the ingress record #
ingress.ingressClassNamestring""IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) # This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster . # ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/ #
ingress.pathstring"/"Default path for the ingress record # NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers #
ingress.pathTypestring"ImplementationSpecific"Ingress path type #
ingress.secretslist[]Custom TLS certificates as secrets # NOTE: 'key' and 'certificate' are expected in PEM format # NOTE: 'name' should line up with a 'secretName' set further up # If it is not set and you're using cert-manager, this is unneeded, as it will create a secret for you with valid certificates # If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days # It is also possible to create and manage the certificates outside of this helm chart # Please see README.md for more information # e.g: # secrets: # - name: discourse.local-tls # key:
ingress.selfSignedboolfalseCreate a TLS secret for this ingress record using self-signed certificates generated by Helm #
ingress.tlsboolfalseEnable TLS configuration for the host defined at ingress.hostname parameter # TLS certificates will be retrieved from a TLS secret with name: {{- printf "%s-tls" .Values.ingress.hostname }} # You can: # - Use the ingress.secrets parameter to create this TLS secret # - Relay on cert-manager to create it by setting the corresponding annotations # - Relay on Helm to create self-signed certificates by setting ingress.selfSigned=true #
initContainersobject{}Add init containers to the server pods. # e.g: # initContainers: # - name: your-image-name # image: your-image # imagePullPolicy: Always # ports: # - name: portname # containerPort: 1234 #
kubeVersionstringnilForce target Kubernetes version (using Helm capabilites if not set) #
livenessProbe.enabledbooltrueEnable livenessProbe
livenessProbe.failureThresholdint2Failure threshold for livenessProbe
livenessProbe.initialDelaySecondsint300Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint5Period seconds for livenessProbe
livenessProbe.successThresholdint1Success threshold for livenessProbe
livenessProbe.timeoutSecondsint3Timeout seconds for livenessProbe
nameOverridestringnilString to partially override common.names.fullname template (will maintain the release name) #
nodeAffinityPreset.keystring""Node label key to match # E.g. # key: "kubernetes.io/e2e-az-name" #
nodeAffinityPreset.typestring""Node affinity type. Allowed values: soft, hard #
nodeAffinityPreset.valueslist[]Node label values to match # E.g. # values: # - e2e-az1 # - e2e-az2 #
nodeSelectorobject{}Node labels for pod assignment. Evaluated as a template. # ref: https://kubernetes.io/docs/user-guide/node-selection/ #
persistence.accessModeslist["ReadWriteOnce"]Persistent Volume Access Mode #
persistence.annotationsobject{}Persistent Volume Claim annotations #
persistence.enabledboolfalseIf true, use a Persistent Volume Claim, If false, use emptyDir #
persistence.existingClaimstringnilEnable persistence using an existing PVC #
persistence.sizestring"50Gi"Persistent Volume size #
persistence.storageClassstringnilPersistent Volume Storage Class # If defined, storageClassName: # If set to "-", storageClassName: "", which disables dynamic provisioning # If undefined (the default) or set to null, no storageClassName spec is # set, choosing the default provisioner. (gp2 on AWS, standard on # GKE, AWS & OpenStack) #
podAffinityPresetstring""Pod affinity preset. Allowed values: soft, hard # ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity #
podAnnotationsobject{}Pod annotations # ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ #
podAntiAffinityPresetstring"soft"Pod anti-affinity preset. Allowed values: soft, hard # ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity #
podLabelsobject{}Pod labels # Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ #
readinessProbe.enabledbooltrueEnable readinessProbe
readinessProbe.failureThresholdint2Failure threshold for readinessProbe
readinessProbe.initialDelaySecondsint20Initial delay seconds for readinessProbe
readinessProbe.periodSecondsint5Period seconds for readinessProbe
readinessProbe.successThresholdint1Success threshold for readinessProbe
readinessProbe.timeoutSecondsint3Timeout seconds for readinessProbe
replicaCountint1Number of deployment replicas #
resources.limitsstringnilThe resources limits for the init container
resources.requestsstringnilThe requested resources for the init container
schedulerNamestringnilScheduler name # https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ #
securityContextobject{"enabled":false,"fsGroup":1000,"runAsUser":1000}Security Context # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ #
service.annotationsobject{}Provide any additional annotations which may be required. This can be used to set the LoadBalancer service type to internal only. # ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer #
service.enabledbooltrueSet to true to enable service record generation #
service.externalTrafficPolicystring"Cluster"Enable client source IP preservation # ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip #
service.loadBalancerIPstringnilloadBalancerIP for the server Service (optional, cloud specific) # ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer #
service.loadBalancerSourceRangeslist[]Load Balancer sources # https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service # e.g: # loadBalancerSourceRanges: # - 10.10.10.0/24 #
service.nodePortobject{"server":null}Specify the nodePort value f

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 v16.6.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