From ffc253ef7d2674540bd7dfe5ca138ab569ee04dc Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Mon, 30 Dec 2024 17:10:54 -0600 Subject: [PATCH] add description of values --- charts/postgres-cluster/Chart.yaml | 2 +- charts/postgres-cluster/README.md | 113 ++++++++++++---------------- charts/postgres-cluster/values.yaml | 105 ++++++++++++++------------ 3 files changed, 104 insertions(+), 116 deletions(-) diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index 86ff2b2..bfdf03c 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 4.0.1 +version: 4.0.2 description: Chart for cloudnative-pg cluster keywords: - database diff --git a/charts/postgres-cluster/README.md b/charts/postgres-cluster/README.md index d7c49c3..19a9988 100644 --- a/charts/postgres-cluster/README.md +++ b/charts/postgres-cluster/README.md @@ -1,6 +1,6 @@ # postgres-cluster -![Version: 4.0.1](https://img.shields.io/badge/Version-4.0.1-informational?style=flat-square) ![AppVersion: v1.25.0](https://img.shields.io/badge/AppVersion-v1.25.0-informational?style=flat-square) +![Version: 4.0.2](https://img.shields.io/badge/Version-4.0.2-informational?style=flat-square) ![AppVersion: v1.25.0](https://img.shields.io/badge/AppVersion-v1.25.0-informational?style=flat-square) Chart for cloudnative-pg cluster @@ -18,81 +18,64 @@ Chart for cloudnative-pg cluster | Key | Type | Default | Description | |-----|------|---------|-------------| -| backup.backupIndex | int | `1` | | -| backup.backupName | string | `""` | | -| backup.data.compression | string | `"snappy"` | | -| backup.data.encryption | string | `""` | | -| backup.data.jobs | int | `2` | | -| backup.destinationPath | string | `""` | | +| backup.backupIndex | int | `1` | Generate external cluster name, creates: postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backups.backupIndex }}" | +| backup.backupName | string | `""` | Name of the backup cluster in the object store, defaults to "cluster.name" | +| backup.data.compression | string | `"snappy"` | Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. | +| backup.data.encryption | string | `""` | Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. | +| backup.data.jobs | int | `2` | Number of data files to be archived or restored in parallel. | +| backup.destinationPath | string | `""` | S3 path starting with "s3://" | | backup.enabled | bool | `false` | | -| backup.endpointCA | string | `""` | | -| backup.endpointCredentials | string | `""` | | -| backup.endpointURL | string | `""` | | +| backup.endpointCA | string | `""` | Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt | +| backup.endpointCredentials | string | `""` | Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY | +| backup.endpointURL | string | `""` | S3 endpoint starting with "https://" | | backup.historyTags.backupRetentionPolicy | string | `""` | | -| backup.retentionPolicy | string | `"14d"` | | -| backup.schedule | string | `"0 0 0 * * *"` | | -| backup.tags.backupRetentionPolicy | string | `""` | | -| backup.wal.compression | string | `"snappy"` | | -| backup.wal.encryption | string | `""` | | -| backup.wal.maxParallel | int | `2` | | -| bootstrap.initdb | object | `{}` | | +| backup.retentionPolicy | string | `"14d"` | Retention policy for backups | +| backup.schedule | string | `"0 0 0 * * *"` | Scheduled backup in cron format | +| backup.tags | object | `{"backupRetentionPolicy":""}` | Tags to add to backups. Add in key value beneath the type. | +| backup.wal.compression | string | `"snappy"` | WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. | +| backup.wal.encryption | string | `""` | Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. | +| backup.wal.maxParallel | int | `2` | Number of WAL files to be archived or restored in parallel. | +| bootstrap | object | `{"initdb":{}}` | Bootstrap is the configuration of the bootstrap process when initdb is used. See: https://cloudnative-pg.io/documentation/current/bootstrap/ See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb | +| bootstrap.initdb | object | `{}` | Example values database: app owner: app secret: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch postInitApplicationSQL: - CREATE TABLE IF NOT EXISTS example; | | cluster.additionalLabels | object | `{}` | | -| cluster.affinity.enablePodAntiAffinity | bool | `true` | | -| cluster.affinity.topologyKey | string | `"kubernetes.io/hostname"` | | +| cluster.affinity | object | `{"enablePodAntiAffinity":true,"topologyKey":"kubernetes.io/hostname"}` | See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration | | cluster.annotations | object | `{}` | | -| cluster.enableSuperuserAccess | bool | `false` | | -| cluster.image.pullPolicy | string | `"IfNotPresent"` | | -| cluster.image.repository | string | `"ghcr.io/cloudnative-pg/postgresql"` | | -| cluster.image.tag | string | `"17.2-22"` | | +| cluster.enableSuperuserAccess | bool | `false` | Create secret containing credentials of superuser | +| cluster.image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/cloudnative-pg/postgresql","tag":"17.2-22"}` | Default image | | cluster.instances | int | `3` | | | cluster.logLevel | string | `"info"` | | -| cluster.monitoring.enabled | bool | `false` | | -| cluster.monitoring.podMonitor.enabled | bool | `true` | | -| cluster.monitoring.prometheusRule.enabled | bool | `false` | | -| cluster.monitoring.prometheusRule.excludeRules | list | `[]` | | +| cluster.monitoring | object | `{"enabled":false,"podMonitor":{"enabled":true},"prometheusRule":{"enabled":false,"excludeRules":[]}}` | Enable default monitoring and alert rules | | cluster.postgresGID | int | `26` | | -| cluster.postgresUID | int | `26` | | -| cluster.postgresql.parameters.hot_standby_feedback | string | `"on"` | | -| cluster.postgresql.parameters.max_slot_wal_keep_size | string | `"2000MB"` | | -| cluster.postgresql.parameters.shared_buffers | string | `"128MB"` | | -| cluster.postgresql.shared_preload_libraries | list | `[]` | | -| cluster.primaryUpdateMethod | string | `"switchover"` | | -| cluster.primaryUpdateStrategy | string | `"unsupervised"` | | +| cluster.postgresUID | int | `26` | The UID and GID of the postgres user inside the image | +| cluster.postgresql | object | `{"parameters":{"hot_standby_feedback":"on","max_slot_wal_keep_size":"2000MB","shared_buffers":"128MB"},"shared_preload_libraries":[]}` | Parameters to be set for the database itself See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PostgresConfiguration | +| cluster.primaryUpdateMethod | string | `"switchover"` | Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated. It can be switchover (default) or in-place (restart). | +| cluster.primaryUpdateStrategy | string | `"unsupervised"` | Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be automated (unsupervised - default) or manual (supervised) | | cluster.priorityClassName | string | `""` | | -| cluster.resources.limits.cpu | string | `"800m"` | | -| cluster.resources.limits.hugepages-2Mi | string | `"256Mi"` | | -| cluster.resources.limits.memory | string | `"1Gi"` | | -| cluster.resources.requests.cpu | string | `"10m"` | | -| cluster.resources.requests.memory | string | `"256Mi"` | | +| cluster.resources | object | `{"limits":{"cpu":"800m","hugepages-2Mi":"256Mi","memory":"1Gi"},"requests":{"cpu":"10m","memory":"256Mi"}}` | Default resources | | cluster.storage.size | string | `"10Gi"` | | | cluster.storage.storageClass | string | `""` | | -| cluster.walStorage.size | string | `"2Gi"` | | -| cluster.walStorage.storageClass | string | `""` | | -| mode | string | `"standalone"` | | +| cluster.walStorage | object | `{"size":"2Gi","storageClass":""}` | Default storage size | +| mode | string | `"standalone"` | Cluster mode of operation. Available modes: * `standalone` - Default mode. Creates new or updates an existing CNPG cluster. * `recovery` - Same as standalone but creates a cluster from a backup, object store or via pg_basebackup * `replica` - Create database as a replica from another CNPG cluster | | nameOverride | string | `""` | Override the name of the cluster | -| recovery.data.compression | string | `"snappy"` | | -| recovery.data.encryption | string | `""` | | -| recovery.data.jobs | int | `2` | | -| recovery.destinationPath | string | `""` | | -| recovery.endpointCA | string | `""` | | -| recovery.endpointCredentials | string | `""` | | -| recovery.endpointURL | string | `""` | | -| recovery.pitrTarget.time | string | `""` | | -| recovery.recoveryIndex | int | `1` | | -| recovery.recoveryInstanceName | string | `""` | | -| recovery.recoveryServerName | string | `""` | | -| recovery.wal.compression | string | `"snappy"` | | -| recovery.wal.encryption | string | `""` | | -| recovery.wal.maxParallel | int | `2` | | -| replica.externalCluster.connectionParameters.dbname | string | `"app"` | | -| replica.externalCluster.connectionParameters.host | string | `"postgresql"` | | -| replica.externalCluster.connectionParameters.user | string | `"app"` | | -| replica.externalCluster.password.key | string | `"password"` | | -| replica.externalCluster.password.name | string | `"postgresql"` | | -| replica.importDatabases[0] | string | `"app"` | | -| replica.importRoles | list | `[]` | | -| replica.importType | string | `"microservice"` | | -| replica.postImportApplicationSQL | list | `[]` | | +| recovery | object | `{"data":{"compression":"snappy","encryption":"","jobs":2},"destinationPath":"","endpointCA":"","endpointCredentials":"","endpointURL":"","pitrTarget":{"time":""},"recoveryIndex":1,"recoveryInstanceName":"","recoveryServerName":"","wal":{"compression":"snappy","encryption":"","maxParallel":2}}` | Recovery settings when booting cluster from external cluster | +| recovery.data.compression | string | `"snappy"` | Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. | +| recovery.data.encryption | string | `""` | Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. | +| recovery.data.jobs | int | `2` | Number of data files to be archived or restored in parallel. | +| recovery.endpointCA | string | `""` | Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt | +| recovery.endpointCredentials | string | `""` | Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY | +| recovery.endpointURL | string | `""` | S3 https endpoint and the s3:// path | +| recovery.pitrTarget | object | `{"time":""}` | Point in time recovery target in RFC3339 format | +| recovery.recoveryIndex | int | `1` | Generate external cluster name, uses: {{ .Release.Name }}postgresql--cluster-backup-index-{{ .Values.recovery.recoveryIndex }} | +| recovery.recoveryInstanceName | string | `""` | Name of the recovery cluster in the object store, defaults to ".Release.Name" | +| recovery.recoveryServerName | string | `""` | Name of the recovery cluster in the object store, defaults to "cluster.name" | +| recovery.wal.compression | string | `"snappy"` | WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. | +| recovery.wal.encryption | string | `""` | Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. | +| recovery.wal.maxParallel | int | `2` | Number of WAL files to be archived or restored in parallel. | +| replica.externalCluster | object | `{"connectionParameters":{"dbname":"app","host":"postgresql","user":"app"},"password":{"key":"password","name":"postgresql"}}` | External cluster connection, password specifies a secret name and the key containing the password value | +| replica.importDatabases | list | `["app"]` | If type microservice only one database is allowed, default is app as standard in cnpg clusters | +| replica.importRoles | list | `[]` | If type microservice no roles are imported and ignored | +| replica.importType | string | `"microservice"` | See [here](https://cloudnative-pg.io/documentation/current/database_import/) for different import types * `microservice` - Single database import as expected from cnpg clusters * `monolith` - Import multiple databases and roles | +| replica.postImportApplicationSQL | list | `[]` | If import type is monolith postImportApplicationSQL is not supported and ignored | | type | string | `"postgresql"` | Type of the CNPG database. Available types: * `postgresql` * `postgis` * `timescaledb` * `tensorchord` | ---------------------------------------------- diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index 84599ed..d4e47e2 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -1,7 +1,6 @@ # -- Override the name of the cluster nameOverride: "" -### # -- Type of the CNPG database. Available types: # * `postgresql` # * `postgis` @@ -9,8 +8,7 @@ nameOverride: "" # * `tensorchord` type: postgresql -### -# Cluster mode of operation. Available modes: +# -- Cluster mode of operation. Available modes: # * `standalone` - Default mode. Creates new or updates an existing CNPG cluster. # * `recovery` - Same as standalone but creates a cluster from a backup, object store or via pg_basebackup # * `replica` - Create database as a replica from another CNPG cluster @@ -19,17 +17,20 @@ mode: standalone cluster: instances: 3 + # -- Default image image: repository: ghcr.io/cloudnative-pg/postgresql tag: "17.2-22" pullPolicy: IfNotPresent - # The UID and GID of the postgres user inside the image + # -- The UID and GID of the postgres user inside the image postgresUID: 26 postgresGID: 26 + # -- Create secret containing credentials of superuser enableSuperuserAccess: false + # -- Default storage size walStorage: size: 2Gi storageClass: "" @@ -37,6 +38,7 @@ cluster: size: 10Gi storageClass: "" + # -- Default resources resources: requests: memory: 256Mi @@ -46,26 +48,26 @@ cluster: cpu: 800m hugepages-2Mi: 256Mi - # See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration + # -- See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration affinity: enablePodAntiAffinity: true topologyKey: kubernetes.io/hostname additionalLabels: {} annotations: {} - priorityClassName: "" - # Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been + # -- Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been # successfully updated. It can be switchover (default) or in-place (restart). primaryUpdateMethod: switchover - # Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been + # -- Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been # successfully updated: it can be automated (unsupervised - default) or manual (supervised) primaryUpdateStrategy: unsupervised logLevel: "info" + # -- Enable default monitoring and alert rules monitoring: enabled: false podMonitor: @@ -74,6 +76,7 @@ cluster: enabled: false excludeRules: [] + # -- Parameters to be set for the database itself # See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PostgresConfiguration postgresql: parameters: @@ -82,73 +85,76 @@ cluster: hot_standby_feedback: "on" shared_preload_libraries: [] +# -- Bootstrap is the configuration of the bootstrap process when initdb is used. +# See: https://cloudnative-pg.io/documentation/current/bootstrap/ +# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb bootstrap: - # BootstrapInitDB is the configuration of the bootstrap process when initdb is used. - # See: https://cloudnative-pg.io/documentation/current/bootstrap/ - # See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb + # -- Example values + # database: app + # owner: app + # secret: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch + # postInitApplicationSQL: + # - CREATE TABLE IF NOT EXISTS example; initdb: {} - # database: app - # owner: app - # secret: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch - # postInitApplicationSQL: - # - CREATE TABLE IF NOT EXISTS example; +# -- Recovery settings when booting cluster from external cluster recovery: - # Point in time recovery target in RFC3339 format + + # -- Point in time recovery target in RFC3339 format pitrTarget: time: "" - # S3 https endpoint and the s3:// path + # -- S3 https endpoint and the s3:// path endpointURL: "" destinationPath: "" - # Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt + # -- Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt endpointCA: "" - # Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY + # -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY endpointCredentials: "" - # Generate external cluster name, uses: {{ .Release.Name }}postgresql--cluster-backup-index-{{ .Values.recovery.recoveryIndex }} + # -- Generate external cluster name, uses: {{ .Release.Name }}postgresql--cluster-backup-index-{{ .Values.recovery.recoveryIndex }} recoveryIndex: 1 - # Name of the recovery cluster in the object store, defaults to "cluster.name" + # -- Name of the recovery cluster in the object store, defaults to "cluster.name" recoveryServerName: "" - # Name of the recovery cluster in the object store, defaults to ".Release.Name" + # -- Name of the recovery cluster in the object store, defaults to ".Release.Name" recoveryInstanceName: "" wal: - # WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. + # -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. compression: snappy - # Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. + # -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. encryption: "" - # Number of WAL files to be archived or restored in parallel. + # -- Number of WAL files to be archived or restored in parallel. maxParallel: 2 data: - # Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. + # -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. compression: snappy - # Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. + # -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. encryption: "" - # Number of data files to be archived or restored in parallel. + # -- Number of data files to be archived or restored in parallel. jobs: 2 replica: - # See https://cloudnative-pg.io/documentation/current/database_import/ + # -- See [here](https://cloudnative-pg.io/documentation/current/database_import/) for different import types # * `microservice` - Single database import as expected from cnpg clusters # * `monolith` - Import multiple databases and roles importType: microservice - # If type microservice only one database is allowed, default is app as standard in cnpg clusters + # -- If type microservice only one database is allowed, default is app as standard in cnpg clusters importDatabases: - app - # If type microservice no roles are imported and ignored + # -- If type microservice no roles are imported and ignored importRoles: [] - # If import type is monolith postImportApplicationSQL is not supported and ignored + # -- If import type is monolith postImportApplicationSQL is not supported and ignored postImportApplicationSQL: [] - # External cluster connection, password specifies a secret name and the key containing the password value + # -- External cluster connection, password specifies a secret name and the key containing the password value externalCluster: connectionParameters: host: postgresql @@ -161,48 +167,47 @@ replica: backup: enabled: false - # S3 endpoint starting with "https://" + # -- S3 endpoint starting with "https://" endpointURL: "" - # S3 path starting with "s3://" + # -- S3 path starting with "s3://" destinationPath: "" - # Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt + # -- Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt endpointCA: "" - # Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY + # -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY endpointCredentials: "" - # Generate external cluster name, creates: postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backups.backupIndex }}" + # -- Generate external cluster name, creates: postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backups.backupIndex }}" backupIndex: 1 - # Name of the backup cluster in the object store, defaults to "cluster.name" + # -- Name of the backup cluster in the object store, defaults to "cluster.name" backupName: "" - # Tags to add to backups. Add in key value beneath the type. + # -- Tags to add to backups. Add in key value beneath the type. tags: backupRetentionPolicy: "" historyTags: backupRetentionPolicy: "" - # Configuration for the WAL and data files. wal: - # WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. + # -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. compression: snappy - # Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. + # -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. encryption: "" - # Number of WAL files to be archived or restored in parallel. + # -- Number of WAL files to be archived or restored in parallel. maxParallel: 2 data: - # Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. + # -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. compression: snappy - # Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. + # -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. encryption: "" - # Number of data files to be archived or restored in parallel. + # -- Number of data files to be archived or restored in parallel. jobs: 2 - # Retention policy for backups + # -- Retention policy for backups retentionPolicy: "14d" - # Scheduled backup in cron format + # -- Scheduled backup in cron format schedule: "0 0 0 * * *"