From 15a3299ddaa2ff1081a0e0a2221d3a82359de67b Mon Sep 17 00:00:00 2001 From: cnp-autobot Date: Fri, 12 Aug 2022 13:35:11 +0000 Subject: [PATCH 1/2] [create-pull-request] automated change --- .../1/api_reference.mdx | 52 ++++++++++++------- .../postgres_for_kubernetes/1/bootstrap.mdx | 33 ++++++++++++ .../docs/postgres_for_kubernetes/1/index.mdx | 50 +++++++++++++----- .../1/license_keys.mdx | 2 +- .../postgres_for_kubernetes/1/postgis.mdx | 2 +- .../1/postgresql_conf.mdx | 2 +- .../postgres_for_kubernetes/1/samples.mdx | 4 ++ .../1/samples/postgis-example.yaml | 2 +- .../1/ssl_connections.mdx | 2 +- 9 files changed, 112 insertions(+), 37 deletions(-) diff --git a/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx b/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx index c5772930db9..f8b709a594a 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx @@ -69,6 +69,7 @@ Below you will find a description of the defined resources: - [PoolerSecrets](#PoolerSecrets) - [PoolerSpec](#PoolerSpec) - [PoolerStatus](#PoolerStatus) +- [PostInitApplicationSQLRefs](#PostInitApplicationSQLRefs) - [PostgresConfiguration](#PostgresConfiguration) - [RecoveryTarget](#RecoveryTarget) - [ReplicaClusterConfiguration](#ReplicaClusterConfiguration) @@ -208,9 +209,9 @@ BarmanCredentials an object containing the potential credentials for each cloud | Name | Description | Type | | ------------------- | ------------------------------------------------------------- | ----------------------------------------- | -| `googleCredentials` | The credentials to use to upload data to S3 | [\*GoogleCredentials](#GoogleCredentials) | -| `s3Credentials ` | The credentials to use to upload data to Azure Blob Storage | [\*S3Credentials](#S3Credentials) | -| `azureCredentials ` | The credentials to use to upload data to Google Cloud Storage | [\*AzureCredentials](#AzureCredentials) | +| `googleCredentials` | The credentials to use to upload data to Google Cloud Storage | [\*GoogleCredentials](#GoogleCredentials) | +| `s3Credentials ` | The credentials to use to upload data to S3 | [\*S3Credentials](#S3Credentials) | +| `azureCredentials ` | The credentials to use to upload data to Azure Blob Storage | [\*AzureCredentials](#AzureCredentials) | @@ -247,22 +248,23 @@ BootstrapConfiguration contains information about how to create the PostgreSQL c BootstrapInitDB is the configuration of the bootstrap process when initdb is used Refer to the Bootstrap page of the documentation for more information. -| Name | Description | Type | -| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | -| `database ` | Name of the database used by the application. Default: `app`. - *mandatory* | string | -| `owner ` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. - *mandatory* | string | -| `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 | [\*LocalObjectReference](#LocalObjectReference) | -| `redwood ` | If we need to enable/disable Redwood compatibility. Requires EPAS and for EPAS defaults to true | \*bool | -| `options ` | The list of options that must be passed to initdb when creating the cluster. Deprecated: This could lead to inconsistent configurations, please use the explicit provided parameters instead. If defined, explicit values will be ignored. | \[]string | -| `dataChecksums ` | Whether the `-k` option should be passed to initdb, enabling checksums on data pages (default: `false`) | \*bool | -| `encoding ` | The value to be passed as option `--encoding` for initdb (default:`UTF8`) | string | -| `localeCollate ` | The value to be passed as option `--lc-collate` for initdb (default:`C`) | string | -| `localeCType ` | The value to be passed as option `--lc-ctype` for initdb (default:`C`) | string | -| `walSegmentSize ` | The value in megabytes (1 to 1024) to be passed to the `--wal-segsize` option for initdb (default: empty, resulting in PostgreSQL default: 16MB) | int | -| `postInitSQL ` | List of SQL queries to be executed as a superuser immediately after the cluster has been created - to be used with extreme care (by default empty) | \[]string | -| `postInitApplicationSQL` | List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty) | \[]string | -| `postInitTemplateSQL ` | List of SQL queries to be executed as a superuser in the `template1` after the cluster has been created - to be used with extreme care (by default empty) | \[]string | -| `import ` | Bootstraps the new cluster by importing data from an existing PostgreSQL instance using logical backup (`pg_dump` and `pg_restore`) | [\*Import](#Import) | +| Name | Description | Type | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | +| `database ` | Name of the database used by the application. Default: `app`. - *mandatory* | string | +| `owner ` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. - *mandatory* | string | +| `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 | [\*LocalObjectReference](#LocalObjectReference) | +| `redwood ` | If we need to enable/disable Redwood compatibility. Requires EPAS and for EPAS defaults to true | \*bool | +| `options ` | The list of options that must be passed to initdb when creating the cluster. Deprecated: This could lead to inconsistent configurations, please use the explicit provided parameters instead. If defined, explicit values will be ignored. | \[]string | +| `dataChecksums ` | Whether the `-k` option should be passed to initdb, enabling checksums on data pages (default: `false`) | \*bool | +| `encoding ` | The value to be passed as option `--encoding` for initdb (default:`UTF8`) | string | +| `localeCollate ` | The value to be passed as option `--lc-collate` for initdb (default:`C`) | string | +| `localeCType ` | The value to be passed as option `--lc-ctype` for initdb (default:`C`) | string | +| `walSegmentSize ` | The value in megabytes (1 to 1024) to be passed to the `--wal-segsize` option for initdb (default: empty, resulting in PostgreSQL default: 16MB) | int | +| `postInitSQL ` | List of SQL queries to be executed as a superuser immediately after the cluster has been created - to be used with extreme care (by default empty) | \[]string | +| `postInitApplicationSQL ` | List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty) | \[]string | +| `postInitTemplateSQL ` | List of SQL queries to be executed as a superuser in the `template1` after the cluster has been created - to be used with extreme care (by default empty) | \[]string | +| `import ` | Bootstraps the new cluster by importing data from an existing PostgreSQL instance using logical backup (`pg_dump` and `pg_restore`) | [\*Import](#Import) | +| `postInitApplicationSQLRefs` | PostInitApplicationSQLRefs points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array (by default empty) | [\*PostInitApplicationSQLRefs](#PostInitApplicationSQLRefs) | @@ -402,6 +404,7 @@ ClusterStatus defines the observed state of Cluster | `resizingPVC ` | List of all the PVCs that have ResizingPVC condition. | \[]string | | `initializingPVC ` | List of all the PVCs that are being initialized by this cluster | \[]string | | `healthyPVC ` | List of all the PVCs not dangling nor initializing | \[]string | +| `licenseStatus ` | Status of the license | licensekey.Status | | `writeService ` | Current write pod | string | | `readService ` | Current list of read pods | string | | `phase ` | Current phase of the cluster | string | @@ -753,6 +756,17 @@ PoolerStatus defines the observed state of Pooler | `secrets ` | The resource version of the config object | [\*PoolerSecrets](#PoolerSecrets) | | `instances` | The number of pods trying to be scheduled | int32 | + + +## PostInitApplicationSQLRefs + +PostInitApplicationSQLRefs points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array + +| Name | Description | Type | +| --------------- | ------------------------------------------------------ | ------------------------------------------------- | +| `secretRefs ` | SecretRefs holds a list of references to Secrets | [\[\]SecretKeySelector](#SecretKeySelector) | +| `configMapRefs` | ConfigMapRefs holds a list of references to ConfigMaps | [\[\]ConfigMapKeySelector](#ConfigMapKeySelector) | + ## PostgresConfiguration diff --git a/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx b/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx index b3579c6853e..7375b8b5315 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx @@ -283,6 +283,39 @@ spec: as queries are run as a superuser and can disrupt the entire cluster. An error in any of those queries interrupts the bootstrap phase, leaving the cluster incomplete. +Moreover, you can specify a list of Secrets and/or ConfigMaps which contains SQL script that will be executed after the database is created and configured. These SQL script will be executed using the **superuser** role (`postgres`), connected to the database specified in the `initdb` section: + +```yaml +apiVersion: postgresql.k8s.enterprisedb.io/v1 +kind: Cluster +metadata: + name: cluster-example-initdb +spec: + instances: 3 + + bootstrap: + initdb: + database: app + owner: app + postInitApplicationSQLRefs: + secretRefs: + - name: my-secret + key: secret.sql + configMapRefs: + - name: my-configmap + key: configmap.sql + storage: + size: 1Gi +``` + +!!! Note + The SQL scripts referenced in `secretRefs` will be executed before the ones referenced in `configMapRefs`. For both sections the SQL scripts will be executed respecting the order in the list. + Inside SQL scripts, each SQL statement is executed in a single exec on the server according to the [PostgreSQL semantics](https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-MULTI-STATEMENT), comments can be included, but internal command like `psql` cannot. + +!!! Warning + Please make sure the existence of the entries inside the ConfigMaps or Secrets specified in `postInitApplicationSQLRefs`, otherwise the bootstrap will fail. + Errors in any of those SQL files will prevent the bootstrap phase to complete successfully. + ### Compatibility Features EDB Postgres Advanced adds many compatibility features to the diff --git a/product_docs/docs/postgres_for_kubernetes/1/index.mdx b/product_docs/docs/postgres_for_kubernetes/1/index.mdx index b46acd476df..27ce147edf5 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/index.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/index.mdx @@ -59,15 +59,19 @@ navigation: --- -The EDB Postgres for Kubernetes operator is a fork based on [CloudNativePG](https://cloudnative-pg.io). It provides additional value such as compatibility with Oracle using EDB Postgres Advanced Server and additional supported platforms such as IBM Power and OpenShift. It is designed, developed, and supported by EDB and covers the full lifecycle of a highly available Postgres database clusters with a primary/standby architecture, using native streaming replication. +EDB Postgres for Kubernetes is an operator designed, developed, and supported +by EDB that covers the full lifecycle of a highly available Postgres database +clusters with a primary/standby architecture, using native streaming +replication. -!!! Note - The operator has been renamed from Cloud Native PostgreSQL. Existing users of Cloud Native PostgreSQL will not experience any change, as the underlying components and resources have not changed. +It is based on the [open source CloudNativePG operator](https://cloudnative-pg.io), +and provides additional value such as compatibility with Oracle using EDB +Postgres Advanced Server and additional supported platforms such as IBM Power +and OpenShift. + +Key features available include: -## Key features in common with CloudNativePG - Kubernetes API integration for high availability - - CloudNativePG uses the `postgresql.cnpg.io/v1` API version - - EDB Postgres for Kubernetes uses the `postgresql.k8s.enterprisedb.io/v1` API version - Self-healing through failover and automated recreation of replicas - Capacity management with scale up/down capabilities - Planned switchovers for scheduled maintenance @@ -77,20 +81,40 @@ The EDB Postgres for Kubernetes operator is a fork based on [CloudNativePG](http - Connection Pooling with PgBouncer - Integrated metrics exporter out of the box - PostgreSQL replication across multiple Kubernetes clusters +- Red Hat certified operator for OpenShift +The operator has been renamed from Cloud Native PostgreSQL. Existing users of Cloud Native PostgreSQL will not experience any change, as the underlying components and resources have not changed. -## Features unique to EDB Postgres of Kubernetes -- Red Hat certified operator for OpenShift -- Support on IBM Power -- EDB Postgres for Kubernetes Plugin -- Oracle compatibility through EDB Postgres Advanced Sever +You can [evaluate EDB Postgres for Kubernetes for free](evaluation.md). +You need a valid license key to use EDB Postgres for Kubernetes in production. !!! Note Based on the [Operator Capability Levels model](operator_capability_levels.md), users can expect a **"Level V - Auto Pilot"** set of capabilities from the EDB Postgres for Kubernetes Operator. -## Licensing +# Differences with CloudNativePG + +The EDB Postgres for Kubernetes operator is a fork based on CloudNativePG. + +Despite both defining a custom resource called `Cluster`, they have two +different API groups. As a result, they can co-exist in the same Kubernetes +cluster. Specifically: + +- CloudNativePG uses the `postgresql.cnpg.io/v1` API version +- EDB Postgres for Kubernetes uses the `postgresql.k8s.enterprisedb.io/v1` API + version + +!!!important + Existing EDB customers with deployments of Cloud Native PostgreSQL might + have noticed that the API group for version 1 has not changed with the + introduction of EDB Postgres for Kubernetes. + +As a general rule, all features available in the open source CloudNativePG are +also available in EDB Postgres for Kubernetes - provided the correct API +version is used. + +# Licensing EDB Postgres for Kubernetes works with both PostgreSQL and EDB Postgres Advanced server, and is available under the @@ -102,7 +126,7 @@ You need a valid license key to use EDB Postgres for Kubernetes in production. ## Supported releases and Kubernetes distributions For a list of the minor releases of EDB Postgres for Kubernetes that are -supported by EDB, please refer to the ["Platform Compatibility"](https://www.enterprisedb.com/resources/platform-compatibility#pgk8s) page. +supported by EDB, please refer to the ["Supported releases"](supported_releases.md) page. Here you can also find which Kubernetes distributions and versions are supported for each of them and the EOL dates. diff --git a/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx b/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx index 4d60ecc4ef2..318646db643 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx @@ -1,5 +1,5 @@ --- -title: 'License and license keys' +title: 'License and License Keys' originalFilePath: 'src/license_keys.md' --- diff --git a/product_docs/docs/postgres_for_kubernetes/1/postgis.mdx b/product_docs/docs/postgres_for_kubernetes/1/postgis.mdx index 419e33d049e..7e1617e3dac 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/postgis.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/postgis.mdx @@ -77,7 +77,7 @@ metadata: name: postgis-example spec: instances: 3 - imageName: quay.io/enterprisedb/postgis:14 + imageName: ghcr.io/cloudnative-pg/postgis:14 bootstrap: initdb: postInitTemplateSQL: diff --git a/product_docs/docs/postgres_for_kubernetes/1/postgresql_conf.mdx b/product_docs/docs/postgres_for_kubernetes/1/postgresql_conf.mdx index 084cac53f3a..aba303ebf6b 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/postgresql_conf.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/postgresql_conf.mdx @@ -111,7 +111,7 @@ ssl = 'on' ssl_ca_file = '/controller/certificates/client-ca.crt' ssl_cert_file = '/controller/certificates/server.crt' ssl_key_file = '/controller/certificates/server.key' -unix_socket_directories = '/var/run/postgresql' +unix_socket_directories = '/controller/run' wal_level = 'logical' wal_log_hints = 'on' ``` diff --git a/product_docs/docs/postgres_for_kubernetes/1/samples.mdx b/product_docs/docs/postgres_for_kubernetes/1/samples.mdx index 3892375c90e..a75273ab44f 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/samples.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/samples.mdx @@ -68,4 +68,8 @@ Replica cluster via backup : [`cluster-example-replica-from-backup-simple.yaml`](../samples/cluster-example-replica-from-backup-simple.yaml): a replica cluster following a cluster with backup configured. +Bootstrap cluster with SQL files +: [`cluster-example-initdb-sql-refs.yaml`](../samples/cluster-example-initdb-sql-refs.yaml): + a cluster example that will execute a set of queries defined in a Secret and a ConfigMap right after the database is created. + For a list of available options, please refer to the ["API Reference" page](api_reference.md). \ No newline at end of file diff --git a/product_docs/docs/postgres_for_kubernetes/1/samples/postgis-example.yaml b/product_docs/docs/postgres_for_kubernetes/1/samples/postgis-example.yaml index 907e4f6b378..2982710ae19 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/samples/postgis-example.yaml +++ b/product_docs/docs/postgres_for_kubernetes/1/samples/postgis-example.yaml @@ -4,7 +4,7 @@ metadata: name: postgis-example spec: instances: 3 - imageName: quay.io/enterprisedb/postgis:14 + imageName: ghcr.io/cloudnative-pg/postgis:14 bootstrap: initdb: postInitTemplateSQL: diff --git a/product_docs/docs/postgres_for_kubernetes/1/ssl_connections.mdx b/product_docs/docs/postgres_for_kubernetes/1/ssl_connections.mdx index 7bb51ff2019..fbf7c230cd0 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/ssl_connections.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/ssl_connections.mdx @@ -86,7 +86,7 @@ spec: app: webtest spec: containers: - - image: quay.io/enterprisedb/webtest:1.6.0 + - image: ghcr.io/cloudnative-pg/webtest:1.6.0 name: cert-test volumeMounts: - name: secret-volume-root-ca From 5896aede554cb9ac48c40a3a466d6afb94cc924c Mon Sep 17 00:00:00 2001 From: Josh Heyer Date: Mon, 15 Aug 2022 15:24:34 +0000 Subject: [PATCH 2/2] Revert changes that don't pertain to 1.16.1 --- .../1/api_reference.mdx | 52 +++++++------------ .../postgres_for_kubernetes/1/bootstrap.mdx | 33 ------------ .../docs/postgres_for_kubernetes/1/index.mdx | 50 +++++------------- .../1/license_keys.mdx | 2 +- .../postgres_for_kubernetes/1/samples.mdx | 4 -- 5 files changed, 33 insertions(+), 108 deletions(-) diff --git a/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx b/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx index f8b709a594a..c5772930db9 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/api_reference.mdx @@ -69,7 +69,6 @@ Below you will find a description of the defined resources: - [PoolerSecrets](#PoolerSecrets) - [PoolerSpec](#PoolerSpec) - [PoolerStatus](#PoolerStatus) -- [PostInitApplicationSQLRefs](#PostInitApplicationSQLRefs) - [PostgresConfiguration](#PostgresConfiguration) - [RecoveryTarget](#RecoveryTarget) - [ReplicaClusterConfiguration](#ReplicaClusterConfiguration) @@ -209,9 +208,9 @@ BarmanCredentials an object containing the potential credentials for each cloud | Name | Description | Type | | ------------------- | ------------------------------------------------------------- | ----------------------------------------- | -| `googleCredentials` | The credentials to use to upload data to Google Cloud Storage | [\*GoogleCredentials](#GoogleCredentials) | -| `s3Credentials ` | The credentials to use to upload data to S3 | [\*S3Credentials](#S3Credentials) | -| `azureCredentials ` | The credentials to use to upload data to Azure Blob Storage | [\*AzureCredentials](#AzureCredentials) | +| `googleCredentials` | The credentials to use to upload data to S3 | [\*GoogleCredentials](#GoogleCredentials) | +| `s3Credentials ` | The credentials to use to upload data to Azure Blob Storage | [\*S3Credentials](#S3Credentials) | +| `azureCredentials ` | The credentials to use to upload data to Google Cloud Storage | [\*AzureCredentials](#AzureCredentials) | @@ -248,23 +247,22 @@ BootstrapConfiguration contains information about how to create the PostgreSQL c BootstrapInitDB is the configuration of the bootstrap process when initdb is used Refer to the Bootstrap page of the documentation for more information. -| Name | Description | Type | -| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| `database ` | Name of the database used by the application. Default: `app`. - *mandatory* | string | -| `owner ` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. - *mandatory* | string | -| `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 | [\*LocalObjectReference](#LocalObjectReference) | -| `redwood ` | If we need to enable/disable Redwood compatibility. Requires EPAS and for EPAS defaults to true | \*bool | -| `options ` | The list of options that must be passed to initdb when creating the cluster. Deprecated: This could lead to inconsistent configurations, please use the explicit provided parameters instead. If defined, explicit values will be ignored. | \[]string | -| `dataChecksums ` | Whether the `-k` option should be passed to initdb, enabling checksums on data pages (default: `false`) | \*bool | -| `encoding ` | The value to be passed as option `--encoding` for initdb (default:`UTF8`) | string | -| `localeCollate ` | The value to be passed as option `--lc-collate` for initdb (default:`C`) | string | -| `localeCType ` | The value to be passed as option `--lc-ctype` for initdb (default:`C`) | string | -| `walSegmentSize ` | The value in megabytes (1 to 1024) to be passed to the `--wal-segsize` option for initdb (default: empty, resulting in PostgreSQL default: 16MB) | int | -| `postInitSQL ` | List of SQL queries to be executed as a superuser immediately after the cluster has been created - to be used with extreme care (by default empty) | \[]string | -| `postInitApplicationSQL ` | List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty) | \[]string | -| `postInitTemplateSQL ` | List of SQL queries to be executed as a superuser in the `template1` after the cluster has been created - to be used with extreme care (by default empty) | \[]string | -| `import ` | Bootstraps the new cluster by importing data from an existing PostgreSQL instance using logical backup (`pg_dump` and `pg_restore`) | [\*Import](#Import) | -| `postInitApplicationSQLRefs` | PostInitApplicationSQLRefs points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array (by default empty) | [\*PostInitApplicationSQLRefs](#PostInitApplicationSQLRefs) | +| Name | Description | Type | +| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | +| `database ` | Name of the database used by the application. Default: `app`. - *mandatory* | string | +| `owner ` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. - *mandatory* | string | +| `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 | [\*LocalObjectReference](#LocalObjectReference) | +| `redwood ` | If we need to enable/disable Redwood compatibility. Requires EPAS and for EPAS defaults to true | \*bool | +| `options ` | The list of options that must be passed to initdb when creating the cluster. Deprecated: This could lead to inconsistent configurations, please use the explicit provided parameters instead. If defined, explicit values will be ignored. | \[]string | +| `dataChecksums ` | Whether the `-k` option should be passed to initdb, enabling checksums on data pages (default: `false`) | \*bool | +| `encoding ` | The value to be passed as option `--encoding` for initdb (default:`UTF8`) | string | +| `localeCollate ` | The value to be passed as option `--lc-collate` for initdb (default:`C`) | string | +| `localeCType ` | The value to be passed as option `--lc-ctype` for initdb (default:`C`) | string | +| `walSegmentSize ` | The value in megabytes (1 to 1024) to be passed to the `--wal-segsize` option for initdb (default: empty, resulting in PostgreSQL default: 16MB) | int | +| `postInitSQL ` | List of SQL queries to be executed as a superuser immediately after the cluster has been created - to be used with extreme care (by default empty) | \[]string | +| `postInitApplicationSQL` | List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty) | \[]string | +| `postInitTemplateSQL ` | List of SQL queries to be executed as a superuser in the `template1` after the cluster has been created - to be used with extreme care (by default empty) | \[]string | +| `import ` | Bootstraps the new cluster by importing data from an existing PostgreSQL instance using logical backup (`pg_dump` and `pg_restore`) | [\*Import](#Import) | @@ -404,7 +402,6 @@ ClusterStatus defines the observed state of Cluster | `resizingPVC ` | List of all the PVCs that have ResizingPVC condition. | \[]string | | `initializingPVC ` | List of all the PVCs that are being initialized by this cluster | \[]string | | `healthyPVC ` | List of all the PVCs not dangling nor initializing | \[]string | -| `licenseStatus ` | Status of the license | licensekey.Status | | `writeService ` | Current write pod | string | | `readService ` | Current list of read pods | string | | `phase ` | Current phase of the cluster | string | @@ -756,17 +753,6 @@ PoolerStatus defines the observed state of Pooler | `secrets ` | The resource version of the config object | [\*PoolerSecrets](#PoolerSecrets) | | `instances` | The number of pods trying to be scheduled | int32 | - - -## PostInitApplicationSQLRefs - -PostInitApplicationSQLRefs points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array - -| Name | Description | Type | -| --------------- | ------------------------------------------------------ | ------------------------------------------------- | -| `secretRefs ` | SecretRefs holds a list of references to Secrets | [\[\]SecretKeySelector](#SecretKeySelector) | -| `configMapRefs` | ConfigMapRefs holds a list of references to ConfigMaps | [\[\]ConfigMapKeySelector](#ConfigMapKeySelector) | - ## PostgresConfiguration diff --git a/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx b/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx index 7375b8b5315..b3579c6853e 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx @@ -283,39 +283,6 @@ spec: as queries are run as a superuser and can disrupt the entire cluster. An error in any of those queries interrupts the bootstrap phase, leaving the cluster incomplete. -Moreover, you can specify a list of Secrets and/or ConfigMaps which contains SQL script that will be executed after the database is created and configured. These SQL script will be executed using the **superuser** role (`postgres`), connected to the database specified in the `initdb` section: - -```yaml -apiVersion: postgresql.k8s.enterprisedb.io/v1 -kind: Cluster -metadata: - name: cluster-example-initdb -spec: - instances: 3 - - bootstrap: - initdb: - database: app - owner: app - postInitApplicationSQLRefs: - secretRefs: - - name: my-secret - key: secret.sql - configMapRefs: - - name: my-configmap - key: configmap.sql - storage: - size: 1Gi -``` - -!!! Note - The SQL scripts referenced in `secretRefs` will be executed before the ones referenced in `configMapRefs`. For both sections the SQL scripts will be executed respecting the order in the list. - Inside SQL scripts, each SQL statement is executed in a single exec on the server according to the [PostgreSQL semantics](https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-MULTI-STATEMENT), comments can be included, but internal command like `psql` cannot. - -!!! Warning - Please make sure the existence of the entries inside the ConfigMaps or Secrets specified in `postInitApplicationSQLRefs`, otherwise the bootstrap will fail. - Errors in any of those SQL files will prevent the bootstrap phase to complete successfully. - ### Compatibility Features EDB Postgres Advanced adds many compatibility features to the diff --git a/product_docs/docs/postgres_for_kubernetes/1/index.mdx b/product_docs/docs/postgres_for_kubernetes/1/index.mdx index 27ce147edf5..b46acd476df 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/index.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/index.mdx @@ -59,19 +59,15 @@ navigation: --- -EDB Postgres for Kubernetes is an operator designed, developed, and supported -by EDB that covers the full lifecycle of a highly available Postgres database -clusters with a primary/standby architecture, using native streaming -replication. +The EDB Postgres for Kubernetes operator is a fork based on [CloudNativePG](https://cloudnative-pg.io). It provides additional value such as compatibility with Oracle using EDB Postgres Advanced Server and additional supported platforms such as IBM Power and OpenShift. It is designed, developed, and supported by EDB and covers the full lifecycle of a highly available Postgres database clusters with a primary/standby architecture, using native streaming replication. -It is based on the [open source CloudNativePG operator](https://cloudnative-pg.io), -and provides additional value such as compatibility with Oracle using EDB -Postgres Advanced Server and additional supported platforms such as IBM Power -and OpenShift. - -Key features available include: +!!! Note + The operator has been renamed from Cloud Native PostgreSQL. Existing users of Cloud Native PostgreSQL will not experience any change, as the underlying components and resources have not changed. +## Key features in common with CloudNativePG - Kubernetes API integration for high availability + - CloudNativePG uses the `postgresql.cnpg.io/v1` API version + - EDB Postgres for Kubernetes uses the `postgresql.k8s.enterprisedb.io/v1` API version - Self-healing through failover and automated recreation of replicas - Capacity management with scale up/down capabilities - Planned switchovers for scheduled maintenance @@ -81,40 +77,20 @@ Key features available include: - Connection Pooling with PgBouncer - Integrated metrics exporter out of the box - PostgreSQL replication across multiple Kubernetes clusters -- Red Hat certified operator for OpenShift -The operator has been renamed from Cloud Native PostgreSQL. Existing users of Cloud Native PostgreSQL will not experience any change, as the underlying components and resources have not changed. -You can [evaluate EDB Postgres for Kubernetes for free](evaluation.md). -You need a valid license key to use EDB Postgres for Kubernetes in production. +## Features unique to EDB Postgres of Kubernetes +- Red Hat certified operator for OpenShift +- Support on IBM Power +- EDB Postgres for Kubernetes Plugin +- Oracle compatibility through EDB Postgres Advanced Sever !!! Note Based on the [Operator Capability Levels model](operator_capability_levels.md), users can expect a **"Level V - Auto Pilot"** set of capabilities from the EDB Postgres for Kubernetes Operator. -# Differences with CloudNativePG - -The EDB Postgres for Kubernetes operator is a fork based on CloudNativePG. - -Despite both defining a custom resource called `Cluster`, they have two -different API groups. As a result, they can co-exist in the same Kubernetes -cluster. Specifically: - -- CloudNativePG uses the `postgresql.cnpg.io/v1` API version -- EDB Postgres for Kubernetes uses the `postgresql.k8s.enterprisedb.io/v1` API - version - -!!!important - Existing EDB customers with deployments of Cloud Native PostgreSQL might - have noticed that the API group for version 1 has not changed with the - introduction of EDB Postgres for Kubernetes. - -As a general rule, all features available in the open source CloudNativePG are -also available in EDB Postgres for Kubernetes - provided the correct API -version is used. - -# Licensing +## Licensing EDB Postgres for Kubernetes works with both PostgreSQL and EDB Postgres Advanced server, and is available under the @@ -126,7 +102,7 @@ You need a valid license key to use EDB Postgres for Kubernetes in production. ## Supported releases and Kubernetes distributions For a list of the minor releases of EDB Postgres for Kubernetes that are -supported by EDB, please refer to the ["Supported releases"](supported_releases.md) page. +supported by EDB, please refer to the ["Platform Compatibility"](https://www.enterprisedb.com/resources/platform-compatibility#pgk8s) page. Here you can also find which Kubernetes distributions and versions are supported for each of them and the EOL dates. diff --git a/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx b/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx index 318646db643..4d60ecc4ef2 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/license_keys.mdx @@ -1,5 +1,5 @@ --- -title: 'License and License Keys' +title: 'License and license keys' originalFilePath: 'src/license_keys.md' --- diff --git a/product_docs/docs/postgres_for_kubernetes/1/samples.mdx b/product_docs/docs/postgres_for_kubernetes/1/samples.mdx index a75273ab44f..3892375c90e 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/samples.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/samples.mdx @@ -68,8 +68,4 @@ Replica cluster via backup : [`cluster-example-replica-from-backup-simple.yaml`](../samples/cluster-example-replica-from-backup-simple.yaml): a replica cluster following a cluster with backup configured. -Bootstrap cluster with SQL files -: [`cluster-example-initdb-sql-refs.yaml`](../samples/cluster-example-initdb-sql-refs.yaml): - a cluster example that will execute a set of queries defined in a Secret and a ConfigMap right after the database is created. - For a list of available options, please refer to the ["API Reference" page](api_reference.md). \ No newline at end of file