[bitnami/postgresql-ha] Add standard Bitnami parameters (#3797)

* [bitnami/postgresql-ha] Add standard Bitnami parameters

* Extend the use of common

* Lint issues

* Lint
This commit is contained in:
Javier J. Salmerón-García
2020-10-08 10:24:41 +02:00
committed by GitHub
parent b5c34a1ed8
commit 8ee923ce98
26 changed files with 725 additions and 478 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: postgresql-ha
version: 3.9.2
version: 3.10.0
appVersion: 11.9.0
description: Chart for PostgreSQL with HA architecture (using Replication Manager (repmgr) and Pgpool).
keywords:

View File

@@ -44,190 +44,213 @@ Additionaly, if `persistence.resourcePolicy` is set to `keep`, you should manual
The following table lists the configurable parameters of the PostgreSQL HA chart and the default values. They can be configured in `values.yaml` or set via `--set` flag during installation.
| Parameter | Description | Default |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| **Global** | | |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
| `global.postgresql.existingSecret` | Name of existing secret to use for PostgreSQL passwords (overrides `postgresql.existingSecret`) | `nil` |
| `global.postgresql.username` | PostgreSQL username (overrides `postgresql.username`) | `nil` |
| `global.postgresql.password` | PostgreSQL password (overrides `postgresql.password`) | `nil` |
| `global.postgresql.database` | PostgreSQL database (overrides `postgresql.database`) | `nil` |
| `global.postgresql.repmgrUsername` | PostgreSQL repmgr username (overrides `postgresql.repmgrUsername`) | `nil` |
| `global.postgresql.repmgrPassword` | PostgreSQL repmgr password (overrides `postgresql.repmgrpassword`) | `nil` |
| `global.postgresql.repmgrDatabase` | PostgreSQL repmgr database (overrides `postgresql.repmgrDatabase`) | `nil` |
| `global.ldap.existingSecret` | Name of existing secret to use for LDAP passwords (overrides `ldap.existingSecret`) | `nil` |
| `global.ldap.bindpw` | LDAP bind password (overrides `ldap.bindpw`) | `nil` |
| `global.pgpool.adminUsername` | Pgpool Admin username (overrides `pgpool.adminUsername`) | `nil` |
| `global.pgpool.adminPassword` | Pgpool Admin password (overrides `pgpool.adminPassword`) | `nil` |
| **General** | | |
| `nameOverride` | String to partially override postgres-ha.fullname template with a string | `nil` |
| `fullnameOverride` | String to fully override postgres-ha.fullname template with a string | `nil` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| **PostgreSQL with Repmgr** | | |
| `postgresqlImage.registry` | Registry for PostgreSQL with Repmgr image | `docker.io` |
| `postgresqlImage.repository` | Repository for PostgreSQL with Repmgr image | `bitnami/postgresql-repmgr` |
| `postgresqlImage.tag` | Tag for PostgreSQL with Repmgr image | `{TAG_NAME}` |
| `postgresqlImage.pullPolicy` | PostgreSQL with Repmgr image pull policy | `IfNotPresent` |
| `postgresqlImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `postgresqlImage.debug` | Specify if debug logs should be enabled | `false` |
| `postgresql.labels` | Map of labels to add to the statefulset. Evaluated as a template | `{}` |
| `postgresql.podLabels` | Map of labels to add to the pods. Evaluated as a template | `{}` |
| `postgresql.replicaCount` | The number of replicas to deploy | `2` |
| `postgresql.updateStrategyType` | Statefulset update strategy policy | `RollingUpdate` |
| `postgresql.podAnnotations` | Additional pod annotations | `{}` |
| `postgresql.affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
| `postgresql.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
| `postgresql.priorityClassName` | Pod priority class | `` |
| `postgresql.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
| `postgresql.securityContext.*` | Other pod security context to be included as-is in the pod spec | `{}` |
| `postgresql.securityContext.enabled` | Enable security context for PostgreSQL with Repmgr | `true` |
| `postgresql.securityContext.fsGroup` | Group ID for the PostgreSQL with Repmgr filesystem | `1001` |
| `postgresql.containerSecurityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `postgrseql.containerSecurityContext.enabled` | Enable container security context | `true` |
| `postgresql.containerSecurityContext.runAsUser` | User ID for the PostgreSQL with Repmgr container | `1001` |
| `postgresql.resources` | The [resources] to allocate for container | `{}` |
| `postgresql.livenessProbe` | Liveness probe configuration for PostgreSQL with Repmgr | `Check values.yaml file` |
| `postgresql.readinessProbe` | Readiness probe configuration for PostgreSQL with Repmgr | `Check values.yaml file` |
| `postgresql.pdb.create` | If true, create a pod disruption budget for PostgreSQL with Repmgr pods | `false` |
| `postgresql.pdb.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
| `postgresql.pdb.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` |
| `postgresql.username` | PostgreSQL username | `postgres` |
| `postgresql.password` | PostgreSQL password | `nil` |
| `postgresql.existingSecret` | Name of existing secret to use for PostgreSQL passwords | `nil` |
| `postgresql.postgresPassword` | PostgreSQL password for the `postgres` user when `username` is not `postgres` | `nil` |
| `postgresql.database` | PostgreSQL database | `postgres` |
| `postgresql.usePasswordFile` | Have the secrets mounted as a file instead of env vars | `false` |
| `postgresql.upgradeRepmgrExtension` | Upgrade repmgr extension in the database | `false` |
| `postgresql.pgHbaTrustAll` | Configures PostgreSQL HBA to trust every user | `false` |
| `postgresql.syncReplication` | Make the replication synchronous. This will wait until the data is synchronized in all the replicas before other query can be run. This ensures the data availability at the expenses of speed. | `false` |
| `postgresql.repmgrUsername` | PostgreSQL repmgr username | `repmgr` |
| `postgresql.repmgrPassword` | PostgreSQL repmgr password | `nil` |
| `postgresql.repmgrDatabase` | PostgreSQL repmgr database | `repmgr` |
| `postgresql.repmgrLogLevel` | Repmgr log level (DEBUG, INFO, NOTICE, WARNING, ERROR, ALERT, CRIT or EMERG) | `NOTICE` |
| `postgresql.repmgrConnectTimeout` | Repmgr backend connection timeout (in seconds) | `5` |
| `postgresql.repmgrReconnectAttempts` | Repmgr backend reconnection attempts | `3` |
| `postgresql.repmgrReconnectInterval` | Repmgr backend reconnection interval (in seconds) | `5` |
| `postgresql.repmgrConfiguration` | Repmgr Configuration | `nil` |
| `postgresql.configuration` | PostgreSQL Configuration | `nil` |
| `postgresql.pgHbaConfiguration` | Content of pg\_hba.conf | `nil (do not create pg_hba.conf)` |
| `postgresql.configurationCM` | ConfigMap with the PostgreSQL configuration files (Note: Overrides `postgresql.repmgrConfiguration`, `postgresql.configuration` and `postgresql.pgHbaConfiguration`) | `nil` (The value is evaluated as a template) |
| `postgresql.extendedConf` | Extended PostgreSQL Configuration (appended to main or default configuration) | `nil` |
| `postgresql.extendedConfCM` | ConfigMap with the extended PostgreSQL configuration files (Note: Overrides `postgresql.extendedConf`) | `nil` (The value is evaluated as a template) |
| `postgresql.initdbScripts` | Dictionary of initdb scripts | `nil` |
| `postgresql.initdbScriptsCM` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`). The value is evaluated as a template. | `nil` |
| `postgresql.initdbScriptsSecret` | Secret with initdb scripts that contain sensitive information (Note: can be used with initdbScriptsCM or initdbScripts). The value is evaluated as a template. | `nil` |
| `postgresql.extraInitContainers` | Additional init containers to add to the postgresql pods. | `[]` |
| `postgresql.extraVolumeMounts` | Additional volume mounts to add to the postgresql pods. | `[]` |
| `postgresql.extraVolumes` | Additional volumes to add to the postgresql pods. | `[]` |
| **Pgpool** | | |
| `pgpoolImage.registry` | Registry for Pgpool | `docker.io` |
| `pgpoolImage.repository` | Repository for Pgpool | `bitnami/pgpool` |
| `pgpoolImage.tag` | Tag for Pgpool | `{TAG_NAME}` |
| `pgpoolImage.pullPolicy` | Pgpool image pull policy | `IfNotPresent` |
| `pgpoolImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `pgpoolImage.debug` | Specify if debug logs should be enabled | `false` |
| `pgpool.customUsers.usernames` | Comma or semicolon separeted list of postgres usernames to be added to pgpool_passwd | `nil` |
| `pgpool.customUsers.passwords` | Comma or semicolon separeted list of the associated passwords for the users to be added to pgpool_passwd | `nil` |
| `pgpool.customUsersSecret` | Name of a secret containing the usernames and passwords of accounts that will be added to pgpool_passwd | `nil` |
| `pgpool.srCheckDatabase` | Name of the database to perform streaming replication checks | `postgres` |
| `pgpool.labels` | Map of labels to add to the deployment. Evaluated as a template | `{}` |
| `pgpool.podLabels` | Map of labels to add to the pods. Evaluated as a template | `{}` |
| `pgpool.replicaCount` | The number of replicas to deploy | `1` |
| `pgpool.podAnnotations` | Additional pod annotations | `{}` |
| `pgpool.affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
| `pgpool.initdbScripts` | Dictionary of initdb scripts | `nil` |
| `pgpool.initdbScriptsCM` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`). The value is evaluated as a template. | `nil` |
| `pgpool.initdbScriptsSecret` | Secret with initdb scripts that contain sensitive information (Note: can be used with initdbScriptsCM or initdbScripts). The value is evaluated as a template. | `nil` |
| `pgpool.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
| `pgpool.priorityClassName` | Pod priority class | `` |
| `pgpool.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
| `pgpool.securityContext.*` | Other pod security context to be included as-is in the pod spec | `{}` |
| `pgpool.securityContext.enabled` | Enable security context for Pgpool | `true` |
| `pgpool.securityContext.fsGroup` | Group ID for the Pgpool filesystem | `1001` |
| `pgpool.containerSecurityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `pgpool.containerSecurityContext.enabled` | Enable container security context | `true` |
| `pgpool.containerSecurityContext.runAsUser` | User ID for the Pgpool container | `1001` |
| `pgpool.resources` | The [resources] to allocate for container | `{}` |
| `pgpool.livenessProbe` | Liveness probe configuration for Pgpool | `Check values.yaml file` |
| `pgpool.readinessProbe` | Readiness probe configuration for Pgpool | `Check values.yaml file` |
| `pgpool.pdb.create` | If true, create a pod disruption budget for Pgpool pods. | `false` |
| `pgpool.pdb.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
| `pgpool.pdb.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` |
| `pgpool.updateStrategy` | Strategy used to replace old Pods by new ones | `{}` |
| `pgpool.minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `nil` |
| `pgpool.adminUsername` | Pgpool Admin username | `admin` |
| `pgpool.adminPassword` | Pgpool Admin password | `nil` |
| `pgpool.maxPool` | The maximum number of cached connections in each child process | `15` |
| `pgpool.numInitChildren` | The number of preforked Pgpool-II server processes. | `32` |
| `pgpool.configuration` | Content of pgpool.conf | `nil` |
| `pgpool.configurationCM` | ConfigMap with the Pgpool configuration file (Note: Overrides `pgpol.configuration`). The file used must be named `pgpool.conf`. | `nil` (The value is evaluated as a template) |
| `pgpool.useLoadBalancing` | If true, use Pgpool Load-Balancing | `true` |
| `pgpool.tls.enabled` | Enable TLS traffic support for end-client connections | `false` |
| `pgpool.tls.preferServerCiphers` | Whether to use the server's TLS cipher preferences rather than the client's | `true` |
| `pgpool.tls.certificatesSecret` | Name of an existing secret that contains the certificates | `nil` |
| `pgpool.tls.certFilename` | Certificate filename | `""` |
| `pgpool.tls.certKeyFilename` | Certificate key filename | `""` |
| `pgpool.tls.certCAFilename` | CA Certificate filename. If provided, PgPool will authenticate TLS/SSL clients by requesting them a certificate. |`nil` |
| **LDAP** | | |
| `ldap.enabled` | Enable LDAP support | `false` |
| `ldap.existingSecret` | Name of existing secret to use for LDAP passwords | `nil` |
| `ldap.uri` | LDAP URL beginning in the form `ldap[s]://<hostname>:<port>` | `nil` |
| `ldap.base` | LDAP base DN | `nil` |
| `ldap.binddn` | LDAP bind DN | `nil` |
| `ldap.bindpw` | LDAP bind password | `nil` |
| `ldap.bslookup` | LDAP base lookup | `nil` |
| `ldap.scope` | LDAP search scope | `nil` |
| `ldap.tlsReqcert` | LDAP TLS check on server certificates | `nil` |
| `ldap.nssInitgroupsIgnoreusers` | LDAP ignored users | `root,nslcd` |
| **Prometheus metrics** | | |
| `metricsImage.registry` | Registry for PostgreSQL Prometheus exporter | `docker.io` |
| `metricsImage.repository` | Repository for PostgreSQL Prometheus exporter | `bitnami/postgres-exporter` |
| `metricsImage.tag` | Tag for PostgreSQL Prometheus exporter | `{TAG_NAME}` |
| `metricsImage.pullPolicy` | PostgreSQL Prometheus exporter image pull policy | `IfNotPresent` |
| `metricsImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `metricsImage.debug` | Specify if debug logs should be enabled | `false` |
| `metrics.securityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `metrics.securityContext.enabled` | Enable security context for PostgreSQL Prometheus exporter | `true` |
| `metrics.securityContext.runAsUser` | User ID for the PostgreSQL Prometheus exporter container | `1001` |
| `metrics.resources` | The [resources] to allocate for container | `{}` |
| `metrics.livenessProbe` | Liveness probe configuration for PostgreSQL Prometheus exporter | `Check values.yaml file` |
| `metrics.readinessProbe` | Readiness probe configuration for PostgreSQL Prometheus exporter | `Check values.yaml file` |
| `metrics.annotations` | Annotations for PostgreSQL Prometheus exporter service | `{prometheus.io/scrape: "true", prometheus.io/port: "9187"}` |
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` |
| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` |
| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{prometheus: "kube-prometheus"}` |
| `metrics.serviceMonitor.relabelings` | ServiceMonitor relabelings. Value is evaluated as a template | `[]` |
| `metrics.serviceMonitor.metricRelabelings` | ServiceMonitor metricRelabelings. Value is evaluated as a template | `[]` |
| **Init Container to adapt volume permissions** | | |
| `volumePermissionsImage.registry` | Registry for Bitnami Minideb | `docker.io` |
| `volumePermissionsImage.repository` | Repository for Bitnami Minideb | `bitnami/minideb` |
| `volumePermissionsImage.tag` | Tag for Bitnami Minideb | `latest` |
| `volumePermissionsImage.pullPolicy` | Bitnami Minideb exporter image pull policy | `Always` |
| `volumePermissionsImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `volumePermissions.enabled` | Enable init container to adapt volume permissions | `false` |
| `volumePermissions.securityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `volumePermissions.securityContext.runAsUser` | User ID for the Bitnami Minideb container | `0` |
| **Persistence** | | |
| `persistence.enabled` | Enable data persistence | `true` |
| `persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `nil` |
| `persistence.storageClass` | Specify the `storageClass` used to provision the volume | `nil` |
| `persistence.mountPath` | Path to mount data volume at | `nil` |
| `persistence.accessMode` | Access mode of data volume | `ReadWriteOnce` |
| `persistence.size` | Size of data volume | `8Gi` |
| `persistence.annotations` | Persistent Volume Claim annotations | `{}` |
| **Expose** | | |
| `service.type` | Kubernetes service type (`ClusterIP`, `NodePort` or `LoadBalancer`) | `ClusterIP` |
| `service.port` | PostgreSQL port | `5432` |
| `service.nodePort` | Kubernetes service nodePort | `nil` |
| `service.annotations` | Annotations for PostgreSQL service | `{}` |
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
| `service.clusterIP` | Static clusterIP or None for headless services | `nil` |
| `networkPolicy.enabled` | Enable NetworkPolicy | `false` |
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |
| Parameter | Description | Default |
|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
| **Global** | | |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
| `global.postgresql.existingSecret` | Name of existing secret to use for PostgreSQL passwords (overrides `postgresql.existingSecret`) | `nil` |
| `global.postgresql.username` | PostgreSQL username (overrides `postgresql.username`) | `nil` |
| `global.postgresql.password` | PostgreSQL password (overrides `postgresql.password`) | `nil` |
| `global.postgresql.database` | PostgreSQL database (overrides `postgresql.database`) | `nil` |
| `global.postgresql.repmgrUsername` | PostgreSQL repmgr username (overrides `postgresql.repmgrUsername`) | `nil` |
| `global.postgresql.repmgrPassword` | PostgreSQL repmgr password (overrides `postgresql.repmgrpassword`) | `nil` |
| `global.postgresql.repmgrDatabase` | PostgreSQL repmgr database (overrides `postgresql.repmgrDatabase`) | `nil` |
| `global.ldap.existingSecret` | Name of existing secret to use for LDAP passwords (overrides `ldap.existingSecret`) | `nil` |
| `global.ldap.bindpw` | LDAP bind password (overrides `ldap.bindpw`) | `nil` |
| `global.pgpool.adminUsername` | Pgpool Admin username (overrides `pgpool.adminUsername`) | `nil` |
| `global.pgpool.adminPassword` | Pgpool Admin password (overrides `pgpool.adminPassword`) | `nil` |
| **General** | | |
| `commonLabels` | Labels to add to all deployed objects | `nil` |
| `commonAnnotations` | Annotations to add to all deployed objects | `[]` |
| `nameOverride` | String to partially override postgres-ha.fullname template with a string | `nil` |
| `fullnameOverride` | String to fully override postgres-ha.fullname template with a string | `nil` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template). | `nil` |
| **PostgreSQL with Repmgr** | | |
| `postgresqlImage.registry` | Registry for PostgreSQL with Repmgr image | `docker.io` |
| `postgresqlImage.repository` | Repository for PostgreSQL with Repmgr image | `bitnami/postgresql-repmgr` |
| `postgresqlImage.tag` | Tag for PostgreSQL with Repmgr image | `{TAG_NAME}` |
| `postgresqlImage.pullPolicy` | PostgreSQL with Repmgr image pull policy | `IfNotPresent` |
| `postgresqlImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `postgresqlImage.debug` | Specify if debug logs should be enabled | `false` |
| `postgresql.labels` | Map of labels to add to the statefulset. Evaluated as a template | `{}` |
| `postgresql.podLabels` | Map of labels to add to the pods. Evaluated as a template | `{}` |
| `postgresql.replicaCount` | The number of replicas to deploy | `2` |
| `postgresql.updateStrategyType` | Statefulset update strategy policy | `RollingUpdate` |
| `postgresql.podAnnotations` | Additional pod annotations | `{}` |
| `postgresql.affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
| `postgresql.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
| `postgresql.priorityClassName` | Pod priority class | `` |
| `postgresql.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
| `postgresql.securityContext.*` | Other pod security context to be included as-is in the pod spec | `{}` |
| `postgresql.securityContext.enabled` | Enable security context for PostgreSQL with Repmgr | `true` |
| `postgresql.securityContext.fsGroup` | Group ID for the PostgreSQL with Repmgr filesystem | `1001` |
| `postgresql.containerSecurityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `postgresql.containerSecurityContext.enabled` | Enable container security context | `true` |
| `postgresql.containerSecurityContext.runAsUser` | User ID for the PostgreSQL with Repmgr container | `1001` |
| `postgresql.resources` | The [resources] to allocate for container | `{}` |
| `postgresql.livenessProbe` | Liveness probe configuration for PostgreSQL with Repmgr | `Check values.yaml file` |
| `postgresql.readinessProbe` | Readiness probe configuration for PostgreSQL with Repmgr | `Check values.yaml file` |
| `postgresql.customLivenessProbe` | Override default liveness probe | `nil` |
| `postgresql.customReadinessProbe` | Override default readiness probe | `nil` |
| `postgresql.extraVolumeMounts` | Array of extra volume mounts to be added to the container (evaluated as template). Normally used with `extraVolumes`. | `nil` |
| `postgresql.sidecars` | Attach additional containers to the pod (evaluated as a template) | `nil` |
| `postgresql.initContainers` | Add additional init containers to the pod (evaluated as a template) | `nil` |
| `postgresql.extraEnvVars` | Array containing extra env vars | `nil` |
| `postgresql.extraEnvVarsCM` | ConfigMap containing extra env vars | `nil` |
| `postgresql.extraEnvVarsSecret` | Secret containing extra env vars (in case of sensitive data) | `nil` |
| `postgresql.command` | Override default container command (useful when using custom images) | `nil` |
| `postgresql.args` | Override default container args (useful when using custom images) | `nil` |
| `postgresql.lifecycleHooks` | LifecycleHook to set additional configuration at startup, e.g. LDAP settings via REST API. Evaluated as a template | `` |
| `postgresql.pdb.create` | If true, create a pod disruption budget for PostgreSQL with Repmgr pods | `false` |
| `postgresql.pdb.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
| `postgresql.pdb.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` |
| `postgresql.username` | PostgreSQL username | `postgres` |
| `postgresql.password` | PostgreSQL password | `nil` |
| `postgresql.existingSecret` | Name of existing secret to use for PostgreSQL passwords | `nil` |
| `postgresql.postgresPassword` | PostgreSQL password for the `postgres` user when `username` is not `postgres` | `nil` |
| `postgresql.database` | PostgreSQL database | `postgres` |
| `postgresql.usePasswordFile` | Have the secrets mounted as a file instead of env vars | `false` |
| `postgresql.upgradeRepmgrExtension` | Upgrade repmgr extension in the database | `false` |
| `postgresql.pgHbaTrustAll` | Configures PostgreSQL HBA to trust every user | `false` |
| `postgresql.syncReplication` | Make the replication synchronous. This will wait until the data is synchronized in all the replicas before other query can be run. This ensures the data availability at the expenses of speed. | `false` |
| `postgresql.repmgrUsername` | PostgreSQL repmgr username | `repmgr` |
| `postgresql.repmgrPassword` | PostgreSQL repmgr password | `nil` |
| `postgresql.repmgrDatabase` | PostgreSQL repmgr database | `repmgr` |
| `postgresql.repmgrLogLevel` | Repmgr log level (DEBUG, INFO, NOTICE, WARNING, ERROR, ALERT, CRIT or EMERG) | `NOTICE` |
| `postgresql.repmgrConnectTimeout` | Repmgr backend connection timeout (in seconds) | `5` |
| `postgresql.repmgrReconnectAttempts` | Repmgr backend reconnection attempts | `3` |
| `postgresql.repmgrReconnectInterval` | Repmgr backend reconnection interval (in seconds) | `5` |
| `postgresql.repmgrConfiguration` | Repmgr Configuration | `nil` |
| `postgresql.configuration` | PostgreSQL Configuration | `nil` |
| `postgresql.pgHbaConfiguration` | Content of pg\_hba.conf | `nil (do not create pg_hba.conf)` |
| `postgresql.configurationCM` | ConfigMap with the PostgreSQL configuration files (Note: Overrides `postgresql.repmgrConfiguration`, `postgresql.configuration` and `postgresql.pgHbaConfiguration`) | `nil` (The value is evaluated as a template) |
| `postgresql.extendedConf` | Extended PostgreSQL Configuration (appended to main or default configuration) | `nil` |
| `postgresql.extendedConfCM` | ConfigMap with the extended PostgreSQL configuration files (Note: Overrides `postgresql.extendedConf`) | `nil` (The value is evaluated as a template) |
| `postgresql.initdbScripts` | Dictionary of initdb scripts | `nil` |
| `postgresql.initdbScriptsCM` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`). The value is evaluated as a template. | `nil` |
| `postgresql.initdbScriptsSecret` | Secret with initdb scripts that contain sensitive information (Note: can be used with initdbScriptsCM or initdbScripts). The value is evaluated as a template. | `nil` |
| **Pgpool** | | |
| `pgpoolImage.registry` | Registry for Pgpool | `docker.io` |
| `pgpoolImage.repository` | Repository for Pgpool | `bitnami/pgpool` |
| `pgpoolImage.tag` | Tag for Pgpool | `{TAG_NAME}` |
| `pgpoolImage.pullPolicy` | Pgpool image pull policy | `IfNotPresent` |
| `pgpoolImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `pgpoolImage.debug` | Specify if debug logs should be enabled | `false` |
| `pgpool.customUsers.usernames` | Comma or semicolon separeted list of postgres usernames to be added to pgpool_passwd | `nil` |
| `pgpool.customUsers.passwords` | Comma or semicolon separeted list of the associated passwords for the users to be added to pgpool_passwd | `nil` |
| `pgpool.customUsersSecret` | Name of a secret containing the usernames and passwords of accounts that will be added to pgpool_passwd | `nil` |
| `pgpool.srCheckDatabase` | Name of the database to perform streaming replication checks | `postgres` |
| `pgpool.labels` | Map of labels to add to the deployment. Evaluated as a template | `{}` |
| `pgpool.podLabels` | Map of labels to add to the pods. Evaluated as a template | `{}` |
| `pgpool.replicaCount` | The number of replicas to deploy | `1` |
| `pgpool.customLivenessProbe` | Override default liveness probe | `nil` |
| `pgpool.customReadinessProbe` | Override default readiness probe | `nil` |
| `pgpool.extraVolumeMounts` | Array of extra volume mounts to be added to the container (evaluated as template). Normally used with `extraVolumes`. | `nil` |
| `pgpool.sidecars` | Attach additional containers to the pod (evaluated as a template) | `nil` |
| `pgpool.initContainers` | Add additional init containers to the pod (evaluated as a template) | `nil` |
| `pgpool.extraEnvVars` | Array containing extra env vars | `nil` |
| `pgpool.extraEnvVarsCM` | ConfigMap containing extra env vars | `nil` |
| `pgpool.extraEnvVarsSecret` | Secret containing extra env vars (in case of sensitive data) | `nil` |
| `pgpool.command` | Override default container command (useful when using custom images) | `nil` |
| `pgpool.args` | Override default container args (useful when using custom images) | `nil` |
| `pgpool.lifecycleHooks` | LifecycleHook to set additional configuration at startup, e.g. LDAP settings via REST API. Evaluated as a template | `` |
| `pgpool.podAnnotations` | Additional pod annotations | `{}` |
| `pgpool.affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
| `pgpool.initdbScripts` | Dictionary of initdb scripts | `nil` |
| `pgpool.initdbScriptsCM` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`). The value is evaluated as a template. | `nil` |
| `pgpool.initdbScriptsSecret` | Secret with initdb scripts that contain sensitive information (Note: can be used with initdbScriptsCM or initdbScripts). The value is evaluated as a template. | `nil` |
| `pgpool.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
| `pgpool.priorityClassName` | Pod priority class | `` |
| `pgpool.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
| `pgpool.securityContext.*` | Other pod security context to be included as-is in the pod spec | `{}` |
| `pgpool.securityContext.enabled` | Enable security context for Pgpool | `true` |
| `pgpool.securityContext.fsGroup` | Group ID for the Pgpool filesystem | `1001` |
| `pgpool.containerSecurityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `pgpool.containerSecurityContext.enabled` | Enable container security context | `true` |
| `pgpool.containerSecurityContext.runAsUser` | User ID for the Pgpool container | `1001` |
| `pgpool.resources` | The [resources] to allocate for container | `{}` |
| `pgpool.livenessProbe` | Liveness probe configuration for Pgpool | `Check values.yaml file` |
| `pgpool.readinessProbe` | Readiness probe configuration for Pgpool | `Check values.yaml file` |
| `pgpool.pdb.create` | If true, create a pod disruption budget for Pgpool pods. | `false` |
| `pgpool.pdb.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
| `pgpool.pdb.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` |
| `pgpool.updateStrategy` | Strategy used to replace old Pods by new ones | `{}` |
| `pgpool.minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `nil` |
| `pgpool.adminUsername` | Pgpool Admin username | `admin` |
| `pgpool.adminPassword` | Pgpool Admin password | `nil` |
| `pgpool.maxPool` | The maximum number of cached connections in each child process | `15` |
| `pgpool.numInitChildren` | The number of preforked Pgpool-II server processes. | `32` |
| `pgpool.configuration` | Content of pgpool.conf | `nil` |
| `pgpool.configurationCM` | ConfigMap with the Pgpool configuration file (Note: Overrides `pgpol.configuration`). The file used must be named `pgpool.conf`. | `nil` (The value is evaluated as a template) |
| `pgpool.useLoadBalancing` | If true, use Pgpool Load-Balancing | `true` |
| `pgpool.tls.enabled` | Enable TLS traffic support for end-client connections | `false` |
| `pgpool.tls.preferServerCiphers` | Whether to use the server's TLS cipher preferences rather than the client's | `true` |
| `pgpool.tls.certificatesSecret` | Name of an existing secret that contains the certificates | `nil` |
| `pgpool.tls.certFilename` | Certificate filename | `""` |
| `pgpool.tls.certKeyFilename` | Certificate key filename | `""` |
| `pgpool.tls.certCAFilename` | CA Certificate filename. If provided, PgPool will authenticate TLS/SSL clients by requesting them a certificate. | `nil` |
| **LDAP** | | |
| `ldap.enabled` | Enable LDAP support | `false` |
| `ldap.existingSecret` | Name of existing secret to use for LDAP passwords | `nil` |
| `ldap.uri` | LDAP URL beginning in the form `ldap[s]://<hostname>:<port>` | `nil` |
| `ldap.base` | LDAP base DN | `nil` |
| `ldap.binddn` | LDAP bind DN | `nil` |
| `ldap.bindpw` | LDAP bind password | `nil` |
| `ldap.bslookup` | LDAP base lookup | `nil` |
| `ldap.scope` | LDAP search scope | `nil` |
| `ldap.tlsReqcert` | LDAP TLS check on server certificates | `nil` |
| `ldap.nssInitgroupsIgnoreusers` | LDAP ignored users | `root,nslcd` |
| **Prometheus metrics** | | |
| `metricsImage.registry` | Registry for PostgreSQL Prometheus exporter | `docker.io` |
| `metricsImage.repository` | Repository for PostgreSQL Prometheus exporter | `bitnami/postgres-exporter` |
| `metricsImage.tag` | Tag for PostgreSQL Prometheus exporter | `{TAG_NAME}` |
| `metricsImage.pullPolicy` | PostgreSQL Prometheus exporter image pull policy | `IfNotPresent` |
| `metricsImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `metricsImage.debug` | Specify if debug logs should be enabled | `false` |
| `metrics.securityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `metrics.securityContext.enabled` | Enable security context for PostgreSQL Prometheus exporter | `true` |
| `metrics.securityContext.runAsUser` | User ID for the PostgreSQL Prometheus exporter container | `1001` |
| `metrics.resources` | The [resources] to allocate for container | `{}` |
| `metrics.livenessProbe` | Liveness probe configuration for PostgreSQL Prometheus exporter | `Check values.yaml file` |
| `metrics.readinessProbe` | Readiness probe configuration for PostgreSQL Prometheus exporter | `Check values.yaml file` |
| `metrics.annotations` | Annotations for PostgreSQL Prometheus exporter service | `{prometheus.io/scrape: "true", prometheus.io/port: "9187"}` |
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` |
| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` |
| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{prometheus: "kube-prometheus"}` |
| `metrics.serviceMonitor.relabelings` | ServiceMonitor relabelings. Value is evaluated as a template | `[]` |
| `metrics.serviceMonitor.metricRelabelings` | ServiceMonitor metricRelabelings. Value is evaluated as a template | `[]` |
| **Init Container to adapt volume permissions** | | |
| `volumePermissionsImage.registry` | Registry for Bitnami Minideb | `docker.io` |
| `volumePermissionsImage.repository` | Repository for Bitnami Minideb | `bitnami/minideb` |
| `volumePermissionsImage.tag` | Tag for Bitnami Minideb | `latest` |
| `volumePermissionsImage.pullPolicy` | Bitnami Minideb exporter image pull policy | `Always` |
| `volumePermissionsImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `volumePermissions.enabled` | Enable init container to adapt volume permissions | `false` |
| `volumePermissions.securityContext.*` | Other container security context to be included as-is in the container spec | `{}` |
| `volumePermissions.securityContext.enabled` | Enable security context for Bitnami Minideb | `false` |
| `volumePermissions.securityContext.runAsUser` | User ID for the Bitnami Minideb container | `0` |
| **Persistence** | | |
| `persistence.enabled` | Enable data persistence | `true` |
| `persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `nil` |
| `persistence.storageClass` | Specify the `storageClass` used to provision the volume | `nil` |
| `persistence.mountPath` | Path to mount data volume at | `nil` |
| `persistence.accessMode` | Access mode of data volume | `ReadWriteOnce` |
| `persistence.size` | Size of data volume | `8Gi` |
| `persistence.annotations` | Persistent Volume Claim annotations | `{}` |
| **Expose** | | |
| `service.type` | Kubernetes service type (`ClusterIP`, `NodePort` or `LoadBalancer`) | `ClusterIP` |
| `service.port` | PostgreSQL port | `5432` |
| `service.nodePort` | Kubernetes service nodePort | `nil` |
| `service.annotations` | Annotations for PostgreSQL service | `{}` |
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
| `service.clusterIP` | Static clusterIP or None for headless services | `nil` |
| `networkPolicy.enabled` | Enable NetworkPolicy | `false` |
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
@@ -281,6 +304,22 @@ To horizontally scale this chart, you can use the `--replicaCount` flag to modif
To modify the PostgreSQL version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/postgresql-repmgr/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters.
### Use a volume for /dev/shm
When working with huge databeses, `/dev/shm` can run out of space. A way to fix this is to use the `postgresql.extraVolumes` and `postgresql.extraVolumeMounts` values. In the example below, we set an `emptyDir` volume with 512Mb:
```yaml
postgresql:
extraVolumes:
- name: dshm
emptyDir: {}
medium: Memory
sizeLimit: 512Mi
extraVolumeMounts:
- name: dshm
mountPath: /dev/shm
```
### Configure the way how to expose PostgreSQL
- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. Set `service.type=ClusterIP` to choose this service type.

View File

@@ -12,41 +12,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "postgresql-ha.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "postgresql-ha.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "postgresql-ha.labels" -}}
app.kubernetes.io/name: {{ template "postgresql-ha.name" . }}
helm.sh/chart: {{ template "postgresql-ha.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
*/}}
{{- define "postgresql-ha.matchLabels" -}}
app.kubernetes.io/name: {{ template "postgresql-ha.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "common.names.fullname" . -}}
{{- end -}}
{{/*
@@ -74,139 +40,35 @@ Fully qualified app name for LDAP
Return the proper PostgreSQL image name
*/}}
{{- define "postgresql-ha.postgresqlImage" -}}
{{- $registryName := .Values.postgresqlImage.registry -}}
{{- $repositoryName := .Values.postgresqlImage.repository -}}
{{- $tag := .Values.postgresqlImage.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.postgresqlImage "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper Pgpool image name
*/}}
{{- define "postgresql-ha.pgpoolImage" -}}
{{- $registryName := .Values.pgpoolImage.registry -}}
{{- $repositoryName := .Values.pgpoolImage.repository -}}
{{- $tag := .Values.pgpoolImage.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.pgpoolImage "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper PostgreSQL Prometheus exporter image name
*/}}
{{- define "postgresql-ha.volumePermissionsImage" -}}
{{- $registryName := .Values.volumePermissionsImage.registry -}}
{{- $repositoryName := .Values.volumePermissionsImage.repository -}}
{{- $tag := .Values.volumePermissionsImage.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissionsImage "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper PostgreSQL Prometheus exporter image name
*/}}
{{- define "postgresql-ha.metricsImage" -}}
{{- $registryName := .Values.metricsImage.registry -}}
{{- $repositoryName := .Values.metricsImage.repository -}}
{{- $tag := .Values.metricsImage.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.metricsImage "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "postgresql-ha.imagePullSecrets" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end -}}
{{- else if or .Values.postgresqlImage.pullSecrets .Values.pgpoolImage.pullSecrets .Values.volumePermissionsImage.pullSecrets .Values.metricsImage.pullSecrets }}
imagePullSecrets:
{{- range .Values.postgresqlImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- range .Values.pgpoolImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- range .Values.volumePermissionsImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- range .Values.metricsImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- end -}}
{{- else if or .Values.postgresqlImage.pullSecrets .Values.pgpoolImage.pullSecrets .Values.volumePermissionsImage.pullSecrets .Values.metricsImage.pullSecrets }}
imagePullSecrets:
{{- range .Values.postgresqlImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- range .Values.pgpoolImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- range .Values.volumePermissionsImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- range .Values.metricsImage.pullSecrets }}
- name: {{ . }}
{{- end -}}
{{- end -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.postgresqlImage .Values.pgpoolImage .Values.volumePermissionsImage .Values.metricsImage) "global" .Values.global) -}}
{{- end -}}
{{/*
@@ -570,7 +432,7 @@ Get the initialization scripts Secret name.
*/}}
{{- define "postgresql-ha.postgresqlInitdbScriptsSecret" -}}
{{- if .Values.postgresql.initdbScriptsSecret -}}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.initdbScriptsSecret "context" $) -}}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.initdbScriptsSecret "context" $) -}}
{{- end -}}
{{- end -}}
@@ -590,7 +452,7 @@ Get the pgpool initialization scripts Secret name.
*/}}
{{- define "postgresql-ha.pgpoolInitdbScriptsSecret" -}}
{{- if .Values.pgpool.initdbScriptsSecret -}}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.initdbScriptsSecret "context" $) -}}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.initdbScriptsSecret "context" $) -}}
{{- end -}}
{{- end -}}
@@ -654,51 +516,14 @@ Also, we can't use a single if because lazy evaluation is not an option
Return the proper Storage Class
*/}}
{{- define "postgresql-ha.storageClass" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
*/}}
{{- if .Values.global -}}
{{- if .Values.global.storageClass -}}
{{- if (eq "-" .Values.global.storageClass) -}}
{{- printf "storageClassName: \"\"" -}}
{{- else }}
{{- printf "storageClassName: %s" .Values.global.storageClass -}}
{{- end -}}
{{- else -}}
{{- if .Values.persistence.storageClass -}}
{{- if (eq "-" .Values.persistence.storageClass) -}}
{{- printf "storageClassName: \"\"" -}}
{{- else }}
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- if .Values.persistence.storageClass -}}
{{- if (eq "-" .Values.persistence.storageClass) -}}
{{- printf "storageClassName: \"\"" -}}
{{- else }}
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- include "common.storage.class" ( dict "persistence" .Values.persistence "global" .Values.global ) -}}
{{- end -}}
{{/* Check if there are rolling tags in the images */}}
{{- define "postgresql-ha.checkRollingTags" -}}
{{- if and (contains "bitnami/" .Values.postgresqlImage.repository) (not (.Values.postgresqlImage.tag | toString | regexFind "-r\\d+$|sha256:")) }}
WARNING: Rolling tag detected ({{ .Values.postgresqlImage.repository }}:{{ .Values.postgresqlImage.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
{{- end }}
{{- if and (contains "bitnami/" .Values.pgpoolImage.repository) (not (.Values.pgpoolImage.tag | toString | regexFind "-r\\d+$|sha256:")) }}
WARNING: Rolling tag detected ({{ .Values.pgpoolImage.repository }}:{{ .Values.pgpoolImage.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
{{- end }}
{{- if and (contains "bitnami/" .Values.metricsImage.repository) (not (.Values.metricsImage.tag | toString | regexFind "-r\\d+$|sha256:")) }}
WARNING: Rolling tag detected ({{ .Values.metricsImage.repository }}:{{ .Values.metricsImage.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
{{- end }}
{{- include "common.warnings.rollingTag" .Values.postgresqlImage -}}
{{- include "common.warnings.rollingTag" .Values.pgpoolImage -}}
{{- include "common.warnings.rollingTag" .Values.metricsImage -}}
{{- end -}}
{{/*
@@ -712,19 +537,6 @@ Return the appropriate apiVersion for networkPolicy
{{- end -}}
{{- end -}}
{{/*
Renders a value that contains template.
Usage:
{{ include "postgresql-ha.tplValue" (dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "postgresql-ha.tplValue" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
{{/*
Compile all warnings into a single message, and call fail.
*/}}

View File

@@ -0,0 +1,5 @@
{{- if .Values.extraDeploy }}
apiVersion: v1
kind: List
items: {{- include "common.tplvalues.render" (dict "value" .Values.extraDeploy "context" $) | nindent 2 }}
{{- end }}

View File

@@ -3,7 +3,13 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "postgresql-ha.ldap" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
bind-password: {{ (include "postgresql-ha.ldapPassword" .) | b64enc | quote }}

View File

@@ -3,10 +3,16 @@ kind: NetworkPolicy
apiVersion: {{ template "postgresql-ha.networkPolicy.apiVersion" . }}
metadata:
name: {{ include "postgresql-ha.fullname" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels: {{ include "postgresql-ha.matchLabels" . | nindent 6 }}
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: postgresql
ingress:
# Allow inbound connections
@@ -18,7 +24,7 @@ spec:
matchLabels:
{{ template "postgresql-ha.fullname" . }}-client: "true"
- podSelector:
matchLabels: {{- include "postgresql-ha.matchLabels" . | nindent 14 }}
matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }}
{{- end }}
# Allow prometheus scrapes
- ports:

View File

@@ -3,13 +3,19 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-configuration" (include "postgresql-ha.pgpool" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: pgpool
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- if (.Files.Glob "files/pgpool.conf") }}
{{- (.Files.Glob "files/pgpool.conf").AsConfig | nindent 2 }}
{{- else if .Values.pgpool.configuration }}
pgpool.conf: |
{{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.configuration "context" $) | nindent 4 }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.configuration "context" $) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-custom-users" (include "postgresql-ha.pgpool" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: pgpool
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
usernames: {{ .Values.pgpool.customUsers.usernames | b64enc | quote }}

View File

@@ -2,15 +2,21 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "postgresql-ha.pgpool" . }}
labels: {{ include "postgresql-ha.labels" . | nindent 4 }}
labels: {{ include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: pgpool
{{- if .Values.pgpool.labels }}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.labels "context" $) | nindent 4 }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.labels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.pgpool.replicaCount }}
selector:
matchLabels: {{ include "postgresql-ha.matchLabels" . | nindent 6 }}
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: pgpool
{{- if .Values.pgpool.updateStrategy }}
strategy: {{- toYaml .Values.pgpool.updateStrategy | nindent 4 }}
@@ -20,27 +26,27 @@ spec:
{{- end }}
template:
metadata:
labels: {{ include "postgresql-ha.labels" . | nindent 8 }}
labels: {{ include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: pgpool
{{- if .Values.pgpool.podLabels }}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.podLabels "context" $) | nindent 8 }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.pgpool.podAnnotations }}
annotations: {{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.podAnnotations "context" $) | nindent 8 }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "postgresql-ha.imagePullSecrets" . | nindent 6 }}
{{- if .Values.pgpool.affinity }}
affinity: {{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.affinity "context" $) | nindent 8 }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.affinity "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.pgpool.nodeSelector }}
nodeSelector: {{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.nodeSelector "context" $) | nindent 8 }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.pgpool.priorityClassName }}
priorityClassName: {{ .Values.pgpool.priorityClassName }}
{{- end }}
{{- if .Values.pgpool.tolerations }}
tolerations: {{- include "postgresql-ha.tplValue" (dict "value" .Values.pgpool.tolerations "context" $) | nindent 8 }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.pgpool.securityContext.enabled }}
securityContext: {{- omit .Values.pgpool.securityContext "enabled" | toYaml | nindent 8 }}
@@ -72,6 +78,9 @@ spec:
- name: pgpool-certificates
mountPath: /opt/bitnami/pgpool/certs
{{- end }}
{{- if .Values.pgpool.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.initContainers "context" $) | nindent 8 }}
{{- end }}
# Auxiliar vars to populate environment variables
{{- $postgresqlReplicaCount := int .Values.postgresql.replicaCount }}
{{- $postgresqlFullname := include "postgresql-ha.postgresql" . }}
@@ -85,6 +94,15 @@ spec:
{{- if .Values.pgpool.securityContext.enabled }}
securityContext: {{- omit .Values.pgpool.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.pgpool.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.pgpool.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.args "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.pgpool.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.pgpoolImage.debug | quote }}
@@ -197,6 +215,18 @@ spec:
value: {{ template "postgresql-ha.pgpool.tlsCACert" . }}
{{- end }}
{{- end }}
{{- if .Values.pgpool.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.pgpool.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.pgpool.extraEnvVarsCM }}
{{- end }}
{{- if .Values.pgpool.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.pgpool.extraEnvVarsSecret }}
{{- end }}
ports:
- name: postgresql
containerPort: 5432
@@ -211,6 +241,8 @@ spec:
timeoutSeconds: {{ .Values.pgpool.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.pgpool.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.pgpool.livenessProbe.failureThreshold }}
{{- else if .Values.pgpool.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if and .Values.pgpool.readinessProbe.enabled (not .Values.ldap.enabled) }}
readinessProbe:
@@ -224,6 +256,8 @@ spec:
timeoutSeconds: {{ .Values.pgpool.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.pgpool.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.pgpool.readinessProbe.failureThreshold }}
{{- else if .Values.pgpool.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.pgpool.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.pgpool.resources }}
resources: {{- toYaml .Values.pgpool.resources | nindent 12 }}
@@ -258,6 +292,12 @@ spec:
- name: pgpool-certificates
mountPath: /opt/bitnami/pgpool/certs
{{- end }}
{{- if .Values.pgpool.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.pgpool.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if or (.Files.Glob "files/pgpool.conf") .Values.pgpool.configuration .Values.pgpool.configurationCM }}
- name: pgpool-config
@@ -299,3 +339,6 @@ spec:
- name: pgpool-certificates
emptyDir: {}
{{- end }}
{{- if .Values.pgpool.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.pgpool.extraVolumes "context" $) | nindent 8 }}
{{- end }}

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-initdb-scripts" (include "postgresql-ha.pgpool" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: pgpool
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- with .Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh" }}
{{- .AsConfig | nindent 2 }}

View File

@@ -3,8 +3,14 @@ apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "postgresql-ha.pgpool" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: pgpool
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.pgpool.pdb.minAvailable }}
minAvailable: {{ .Values.pgpool.pdb.minAvailable }}
@@ -13,6 +19,6 @@ spec:
maxUnavailable: {{ .Values.pgpool.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels: {{- include "postgresql-ha.matchLabels" . | nindent 6 }}
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: pgpool
{{- end }}

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "postgresql-ha.pgpool" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: pgpool
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
admin-password: {{ (include "postgresql-ha.pgpoolAdminPassword" .) | b64enc | quote }}

View File

@@ -2,10 +2,16 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "postgresql-ha.pgpool" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.service.annotations }}
annotations: {{- include "postgresql-ha.tplValue" (dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
spec:
type: {{ .Values.service.type }}
{{- if and (not (empty .Values.service.loadBalancerIP)) (eq .Values.service.type "LoadBalancer") }}
@@ -27,5 +33,5 @@ spec:
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "postgresql-ha.matchLabels" . | nindent 4 }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: pgpool

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-configuration" (include "postgresql-ha.postgresql" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- if (.Files.Glob "files/repmgr.conf") }}
{{- (.Files.Glob "files/repmgr.conf").AsConfig | nindent 2 }}

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-extended-configuration" (include "postgresql-ha.postgresql" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- with .Files.Glob "files/conf.d/*.conf" }}
{{- .AsConfig | nindent 2 }}

View File

@@ -2,8 +2,14 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-hooks-scripts" (include "postgresql-ha.postgresql" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
pre-stop.sh: |-
#!/bin/bash

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-initdb-scripts" (include "postgresql-ha.postgresql" .) }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }}
binaryData:
{{- range $path, $bytes := . }}

View File

@@ -3,10 +3,17 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "postgresql-ha.postgresql" . }}-metrics
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.metrics.annotations }}
annotations: {{- include "postgresql-ha.tplValue" (dict "value" .Values.metrics.annotations "context" $) | nindent 4 }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
@@ -14,6 +21,6 @@ spec:
- name: metrics
port: 9187
targetPort: metrics
selector: {{- include "postgresql-ha.matchLabels" . | nindent 4 }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- end }}

View File

@@ -3,8 +3,14 @@ apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "postgresql-ha.postgresql" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.postgresql.pdb.minAvailable }}
minAvailable: {{ .Values.postgresql.pdb.minAvailable }}
@@ -13,6 +19,6 @@ spec:
maxUnavailable: {{ .Values.postgresql.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels: {{- include "postgresql-ha.matchLabels" . | nindent 6 }}
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: postgresql
{{- end }}

View File

@@ -3,8 +3,14 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "postgresql-ha.postgresql" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if and (include "postgresql-ha.postgresqlPostgresPassword" .) (not (eq (include "postgresql-ha.postgresqlUsername" .) "postgres")) }}

View File

@@ -2,7 +2,13 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "postgresql-ha.postgresql" . }}-headless
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
@@ -11,5 +17,5 @@ spec:
port: 5432
targetPort: postgresql
protocol: TCP
selector: {{- include "postgresql-ha.matchLabels" . | nindent 4 }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: postgresql

View File

@@ -2,8 +2,14 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "postgresql-ha.postgresql" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
ports:
@@ -11,5 +17,5 @@ spec:
port: 5432
targetPort: postgresql
protocol: TCP
selector: {{- include "postgresql-ha.matchLabels" . | nindent 4 }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: postgresql

View File

@@ -6,14 +6,20 @@ metadata:
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- end }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels: {{- include "postgresql-ha.matchLabels" . | nindent 6 }}
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: postgresql
endpoints:
- port: metrics
@@ -24,10 +30,10 @@ spec:
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabelings }}
relabelings: {{- include "postgresql-ha.tplValue" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "postgresql-ha.tplValue" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:

View File

@@ -2,11 +2,17 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "postgresql-ha.postgresql" . }}
labels: {{- include "postgresql-ha.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: postgresql
{{- if .Values.postgresql.labels }}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.labels "context" $) | nindent 4 }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.labels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
serviceName: {{ include "postgresql-ha.postgresql" . }}-headless
replicas: {{ .Values.postgresql.replicaCount }}
@@ -17,42 +23,41 @@ spec:
{{- end }}
podManagementPolicy: Parallel
selector:
matchLabels: {{- include "postgresql-ha.matchLabels" . | nindent 6 }}
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: postgresql
template:
metadata:
labels: {{- include "postgresql-ha.labels" . | nindent 8 }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: postgresql
{{- if .Values.postgresql.podLabels }}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.podLabels "context" $) | nindent 8 }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if or .Values.postgresql.podAnnotations (and .Values.metrics.enabled .Values.metrics.annotations) }}
annotations:
{{- if .Values.postgresql.podAnnotations }}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.podAnnotations "context" $) | nindent 8 }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- if and .Values.metrics.enabled .Values.metrics.annotations }}
{{- include "postgresql-ha.tplValue" (dict "value" .Values.metrics.annotations "context" $) | nindent 8 }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.annotations "context" $) | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- include "postgresql-ha.imagePullSecrets" . | indent 6 }}
{{- include "postgresql-ha.imagePullSecrets" . | nindent 6 }}
{{- if .Values.postgresql.affinity }}
affinity: {{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.affinity "context" $) | nindent 8 }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.affinity "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.postgresql.nodeSelector }}
nodeSelector: {{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.nodeSelector "context" $) | nindent 8 }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.postgresql.priorityClassName }}
priorityClassName: {{ .Values.postgresql.priorityClassName }}
{{- end }}
{{- if .Values.postgresql.tolerations }}
tolerations: {{- include "postgresql-ha.tplValue" (dict "value" .Values.postgresql.tolerations "context" $) | nindent 8 }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.postgresql.securityContext.enabled }}
securityContext: {{- omit .Values.postgresql.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if or .Values.postgresql.extraInitContainers (and .Values.volumePermissions.enabled .Values.persistence.enabled) }}
initContainers:
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: init-chmod-data
@@ -74,17 +79,26 @@ spec:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- end }}
{{- if .Values.postgresql.extraInitContainers }}
{{- include "common.tplvalues.render" ( dict "value" .Values.postgresql.extraInitContainers "context" $ ) | nindent 8 }}
{{- end }}
{{- if or .Values.postgresql.initContainers .Values.postgresql.extraInitContainers }}
{{- include "common.tplvalues.render" ( dict "value" (coalesce .Values.postgresql.initContainers .Values.postgresql.extraInitContainers) "context" $ ) | nindent 8 }}
{{- end }}
containers:
- name: postgresql
{{- if .Values.postgresql.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.lifecycleHooks "context" $) | nindent 12 }}
{{- else }}
lifecycle:
preStop:
exec:
command:
- /pre-stop.sh
{{- end }}
{{- if .Values.postgresql.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.postgresql.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.args "context" $) | nindent 12 }}
{{- end }}
image: {{ include "postgresql-ha.postgresqlImage" . }}
imagePullPolicy: {{ .Values.postgresqlImage.pullPolicy | quote }}
{{- if .Values.postgresql.containerSecurityContext.enabled }}
@@ -179,6 +193,18 @@ spec:
- name: POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS
value: {{ sub (int .Values.postgresql.replicaCount) 1 | quote }}
{{- end }}
{{- if .Values.postgresql.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.postgresql.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.postgresql.extraEnvVarsCM }}
{{- end }}
{{- if .Values.postgresql.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.postgresql.extraEnvVarsSecret }}
{{- end }}
ports:
- name: postgresql
containerPort: 5432
@@ -195,6 +221,8 @@ spec:
timeoutSeconds: {{ .Values.postgresql.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.postgresql.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.postgresql.livenessProbe.failureThreshold }}
{{- else if .Values.postgresql.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.postgresql.readinessProbe.enabled }}
readinessProbe:
@@ -208,6 +236,8 @@ spec:
timeoutSeconds: {{ .Values.postgresql.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.postgresql.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.postgresql.readinessProbe.failureThreshold }}
{{- else if .Values.postgresql.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.postgresql.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.postgresql.resources }}
resources: {{- toYaml .Values.postgresql.resources | nindent 12 }}
@@ -239,7 +269,7 @@ spec:
mountPath: /pre-stop.sh
subPath: pre-stop.sh
{{- if .Values.postgresql.extraVolumeMounts }}
{{- toYaml .Values.postgresql.extraVolumeMounts | nindent 12 }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
@@ -298,7 +328,13 @@ spec:
mountPath: /opt/bitnami/postgresql/secrets/
{{- end }}
{{- end }}
{{- if .Values.postgresql.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.postgresql.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.postgresql.extraVolumes "context" $) | nindent 8 }}
{{- end }}
- name: hooks-scripts
configMap:
name: {{ printf "%s-hooks-scripts" (include "postgresql-ha.postgresql" .) }}
@@ -328,24 +364,21 @@ spec:
configMap:
name: {{ template "postgresql-ha.postgresqlInitdbScriptsCM" . }}
{{- end }}
{{- if .Values.postgresql.extraVolumes }}
{{- toYaml .Values.postgresql.extraVolumes | nindent 8 }}
{{- end }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: data
persistentVolumeClaim:
{{- with .Values.persistence.existingClaim }}
{{- with .Values.persistence.existingClaim }}
claimName: {{ tpl . $ }}
{{- end }}
{{- else if not .Values.persistence.enabled }}
{{- end }}
{{- else if not .Values.persistence.enabled }}
- name: data
emptyDir: {}
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: data
{{- if .Values.persistence.annotations }}
annotations: {{- include "postgresql-ha.tplValue" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
{{- end }}
spec:
accessModes:
@@ -355,5 +388,5 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{ include "postgresql-ha.storageClass" . | indent 8 }}
{{- end }}
{{- include "postgresql-ha.storageClass" . | nindent 8 }}
{{- end }}

View File

@@ -118,6 +118,14 @@ metricsImage:
##
clusterDomain: cluster.local
## Common annotations to add to all resources (sub-charts are not considered). Evaluated as a template
##
commonAnnotations: {}
## Common labels to add to all resources (sub-charts are not considered). Evaluated as a template
##
commonLabels: {}
## PostgreSQL parameters
##
postgresql:
@@ -175,7 +183,58 @@ postgresql:
##
containerSecurityContext:
enabled: true
runAsUser: 1001
runAsUser:
1001
## Custom Liveness probe
##
customLivenessProbe: {}
## Custom Readiness probe
##
customReadinessProbe: {}
## Container command (using container default if not set)
##
command:
## Container args (using container default if ot set)
##
args:
## lifecycleHooks for the container to automate configuration before or after startup.
##
lifecycleHooks:
## An array to add extra env vars
## For example:
##
extraEnvVars: []
# - name: BEARER_AUTH
# value: true
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Extra init containers to add to the deployment
##
initContainers: []
## Extra sidecar containers to add to the deployment
##
sidecars: []
## PostgreSQL containers' resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
@@ -266,12 +325,6 @@ postgresql:
## command: ['do', 'something']
##
extraInitContainers: []
## Additional PostgreSQL Master Volume mounts
##
extraVolumeMounts: []
## Additional PostgreSQL Master Volumes
##
extraVolumes: []
## Repmgr configuration
## Specify content for repmgr.conf
@@ -444,6 +497,56 @@ pgpool:
create: false
minAvailable: 1
# maxUnavailable: 1
## Custom Liveness probe
##
customLivenessProbe: {}
## Custom Readiness probe
##
customReadinessProbe: {}
## Container command (using container default if not set)
##
command:
## Container args (using container default if ot set)
##
args:
## lifecycleHooks for the container to automate configuration before or after startup.
##
lifecycleHooks:
## An array to add extra env vars
## For example:
##
extraEnvVars: []
# - name: BEARER_AUTH
# value: true
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Extra init containers to add to the deployment
##
initContainers: []
## Extra sidecar containers to add to the deployment
##
sidecars: []
## strategy used to replace old Pods by new ones
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
@@ -723,3 +826,7 @@ networkPolicy:
## (with the correct destination port).
##
allowExternal: false
## Array with extra yaml to deploy with the chart. Evaluated as a template
##
extraDeploy: []

View File

@@ -118,6 +118,14 @@ metricsImage:
##
clusterDomain: cluster.local
## Common annotations to add to all resources (sub-charts are not considered). Evaluated as a template
##
commonAnnotations: {}
## Common labels to add to all resources (sub-charts are not considered). Evaluated as a template
##
commonLabels: {}
## PostgreSQL parameters
##
postgresql:
@@ -177,6 +185,57 @@ postgresql:
enabled: true
runAsUser: 1001
## Custom Liveness probe
##
customLivenessProbe: {}
## Custom Readiness probe
##
customReadinessProbe: {}
## Container command (using container default if not set)
##
command:
## Container args (using container default if ot set)
##
args:
## lifecycleHooks for the container to automate configuration before or after startup.
##
lifecycleHooks:
## An array to add extra env vars
## For example:
##
extraEnvVars: []
# - name: BEARER_AUTH
# value: true
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Extra init containers to add to the deployment
##
initContainers: []
## Extra sidecar containers to add to the deployment
##
sidecars: []
## PostgreSQL containers' resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
@@ -266,12 +325,6 @@ postgresql:
## command: ['do', 'something']
##
extraInitContainers: []
## Additional PostgreSQL Master Volume mounts
##
extraVolumeMounts: []
## Additional PostgreSQL Master Volumes
##
extraVolumes: []
## Repmgr configuration
## Specify content for repmgr.conf
@@ -280,7 +333,6 @@ postgresql:
## ref: https://github.com/bitnami/bitnami-docker-postgresql-repmgr#configuration-file
##
# repmgrConfiguration: |-
## PostgreSQL configuration
## Specify runtime configuration parameters as a dict, using camelCase, e.g.
## {"sharedBuffers": "500MB"}
@@ -288,7 +340,6 @@ postgresql:
## ref: https://github.com/bitnami/bitnami-docker-postgresql-repmgr#configuration-file
##
# configuration:
## PostgreSQL client authentication configuration
## Specify content for pg_hba.conf
## Default: do not create pg_hba.conf
@@ -299,24 +350,20 @@ postgresql:
# local all all trust
# host all all localhost trust
# host mydatabase mysuser 192.168.0.0/24 md5
## ConfigMap with PostgreSQL configuration
## NOTE: This will override repmgrConfiguration, configuration and pgHbaConfiguration
##
# configurationCM:
## PostgreSQL extended configuration
## As above, but _appended_ to the main configuration
## Alternatively, you can put your *.conf under the files/conf.d/ directory
## ref: https://github.com/bitnami/bitnami-docker-postgresql-repmgr#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
##
# extendedConf:
## ConfigMap with PostgreSQL extended configuration
## NOTE: This will override extendedConf
##
# extendedConfCM:
## initdb scripts
## Specify dictionary of scripts to be run at first boot
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
@@ -325,12 +372,10 @@ postgresql:
# my_init_script.sh: |
# #!/bin/sh
# echo "Do something."
## ConfigMap with scripts to be run at first boot
## NOTE: This will override initdbScripts
##
# initdbScriptsCM:
## Secret with scripts to be run at first boot
## Note: can be used with initdbScriptsCM or initdbScripts
##
@@ -339,7 +384,6 @@ postgresql:
## Pgpool parameters
##
pgpool:
## Additional users that will be performing connections to the database using
## pgpool. Use this property in order to create new user/password entries that
## will be appended to the "pgpool_passwd" file
@@ -369,6 +413,57 @@ pgpool:
##
podLabels: {}
## Custom Liveness probe
##
customLivenessProbe: {}
## Custom Readiness probe
##
customReadinessProbe: {}
## Container command (using container default if not set)
##
command:
## Container args (using container default if ot set)
##
args:
## lifecycleHooks for the container to automate configuration before or after startup.
##
lifecycleHooks:
## An array to add extra env vars
## For example:
##
extraEnvVars: []
# - name: BEARER_AUTH
# value: true
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Extra init containers to add to the deployment
##
initContainers: []
## Extra sidecar containers to add to the deployment
##
sidecars: []
## Number of replicas to deploy
##
replicaCount: 1
@@ -526,15 +621,15 @@ pgpool:
##
## Name of the Secret that contains the certificates
##
certificatesSecret: ''
certificatesSecret: ""
##
## Certificate filename
##
certFilename: ''
certFilename: ""
##
## Certificate Key filename
##
certKeyFilename: ''
certKeyFilename: ""
##
## CA Certificate filename
## If provided, PgPool will authenticate TLS/SSL clients by requesting them a certificate
@@ -734,3 +829,7 @@ networkPolicy:
## (with the correct destination port).
##
allowExternal: true
## Array with extra yaml to deploy with the chart. Evaluated as a template
##
extraDeploy: []