From f4f956c96deb7601a850456e5810479f611f8918 Mon Sep 17 00:00:00 2001 From: Moiz Nalwalla Date: Tue, 9 Aug 2022 14:15:28 +0530 Subject: [PATCH 1/6] Fixing issue. --- .../55/06_building_toolkit.properties_file.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx b/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx index 8e440e0edad..d65c2dfb44d 100644 --- a/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx +++ b/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx @@ -229,7 +229,7 @@ The URL contains the following information: !!! Note - If datatype `tinyInt(1)` is used to store byte values other than 0 and 1 in the MySQL source database, make sure to append the optional parameter `?tinyInt1isBit=false` in the MySQL Connector/J JDBC Driver URL. - - Due to a bug in the MySQL Connector/J JDBC Driver 8.0.26, the migration of foreign key constraints fails in certain cases. EDB recommends that you don't use this driver for migrating data using Migration Toolkit. You can use MySQL Connector/J JDBC Driver 8.0.25 driver instead. + - Due to a bug in the MySQL Connector/J JDBC Driver 8.0.26, the migration of foreign key constraints fails in certain cases. EDB recommends that you don't use this driver for migrating data using Migration Toolkit. Instead, use the latest 8.0.30 version of the MySQL Connector/J JDBC Driver. For detailed information about this bug, see the [MySQL bug report](https://bugs.mysql.com/bug.php?id=95280). From 165c2c92ffb39def32b95bd85c52dd1d894c556f Mon Sep 17 00:00:00 2001 From: moiznalwalla <90263457+moiznalwalla@users.noreply.github.com> Date: Fri, 12 Aug 2022 18:00:32 +0530 Subject: [PATCH 2/6] Update product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx Co-authored-by: Dee Dee Rothery <83650384+drothery-edb@users.noreply.github.com> --- .../55/06_building_toolkit.properties_file.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx b/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx index d65c2dfb44d..49702763824 100644 --- a/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx +++ b/product_docs/docs/migration_toolkit/55/06_building_toolkit.properties_file.mdx @@ -229,7 +229,7 @@ The URL contains the following information: !!! Note - If datatype `tinyInt(1)` is used to store byte values other than 0 and 1 in the MySQL source database, make sure to append the optional parameter `?tinyInt1isBit=false` in the MySQL Connector/J JDBC Driver URL. - - Due to a bug in the MySQL Connector/J JDBC Driver 8.0.26, the migration of foreign key constraints fails in certain cases. EDB recommends that you don't use this driver for migrating data using Migration Toolkit. Instead, use the latest 8.0.30 version of the MySQL Connector/J JDBC Driver. + - Due to a bug in the MySQL Connector/J JDBC Driver 8.0.26, the migration of foreign key constraints fails in certain cases. EDB recommends that you don't use this driver for migrating data using Migration Toolkit. Instead, use MySQL Connector/J JDBC Driver 8.0.30 or later. For detailed information about this bug, see the [MySQL bug report](https://bugs.mysql.com/bug.php?id=95280). From 15a3299ddaa2ff1081a0e0a2221d3a82359de67b Mon Sep 17 00:00:00 2001 From: cnp-autobot Date: Fri, 12 Aug 2022 13:35:11 +0000 Subject: [PATCH 3/6] [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 1e21a79d1f54835c2cadf295381b026f8602ef17 Mon Sep 17 00:00:00 2001 From: drothery-edb Date: Sat, 13 Aug 2022 07:46:11 -0400 Subject: [PATCH 4/6] EDB PG for Kubernetes: v1.15.3 and v1.16.1 rel notes --- .../1/rel_notes/1_15_3_rel_notes.mdx | 22 +++++++ .../1/rel_notes/1_16_1_rel_notes.mdx | 58 +++++++++++++++++++ .../1/rel_notes/index.mdx | 12 ++-- 3 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_15_3_rel_notes.mdx create mode 100644 product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_16_1_rel_notes.mdx diff --git a/product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_15_3_rel_notes.mdx b/product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_15_3_rel_notes.mdx new file mode 100644 index 00000000000..af95aff6e62 --- /dev/null +++ b/product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_15_3_rel_notes.mdx @@ -0,0 +1,22 @@ +--- +title: "EDB Postgres for Kubernetes 1.15.3 release notes" +navTitle: "Version 1.15.3" +--- + +This release of EDB Postgres for Kubernetes includes the following: + +| Type | Description | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| Upstream merge | Merged with community CloudNativePG 1.15.3. See the community [Release Notes](https://cloudnative-pg.io/documentation/1.15/release_notes/v1.15/). | + + +## Important changes to our upgrade policy +We are adopting a new policy to support the last two minor versions of the product beginning with 1.16, in line with the CloudNativePG community. + +As a result, we are introducing the following head versions in the new OLM channels in OpenShift to manage the update streams for EDB Postgres for Kubernetes: + +* `fast`: the latest available patch release for the latest available minor release +* `stable-v1.16`: the latest available patch release of the 1.16 minor release +* `stable-v1.15`: the latest available patch release of the 1.15 minor release + +Prior to the release of 1.16, the only channel that we were supporting was the `stable` channel. This channel is now obsolete. However, for backward compatibility it is currently set as an alias of the `stable-v1.15` channel and it will be removed once version 1.15 goes End of Life. diff --git a/product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_16_1_rel_notes.mdx b/product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_16_1_rel_notes.mdx new file mode 100644 index 00000000000..a809b2f95f2 --- /dev/null +++ b/product_docs/docs/postgres_for_kubernetes/1/rel_notes/1_16_1_rel_notes.mdx @@ -0,0 +1,58 @@ +--- +title: "EDB Postgres for Kubernetes 1.16.1 release notes" +navTitle: "Version 1.16.1" +--- + +This release of EDB Postgres for Kubernetes includes the following: + +| Type | Description | +| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Upstream merge | Merged with community CloudNativePG 1.16. See the community [Release Notes](https://cloudnative-pg.io/documentation/1.16/release_notes/v1.16/). | + +## Important changes to our upgrade policy +We are adopting a new policy to support the last two minor versions of the product, in line with the CloudNativePG community. + +As a result, we are introducing the following head versions in the new OLM channels in OpenShift to manage the update streams for EDB Postgres for Kubernetes: + +* `fast`: the latest available patch release for the latest available minor release +* `stable-v1.16`: the latest available patch release of the 1.16 minor release +* `stable-v1.15`: the latest available patch release of the 1.15 minor release + +Prior to this release, the only channel that we were supporting was the `stable` channel. This channel is now obsolete. However, for backward compatibility it is currently set as an alias of the `stable-v1.15` channel. It will be removed once version 1.15 reaches End of Life. + +## Important information about upgrading to a 1.16.x operator version on Openshift + +We have made a change to the way conditions are represented in the status of +the operator in version 1.16.0 and onward. This change could cause an operator +upgrade to hang on Openshift if one of the old conditions are set during the +upgrade process because of the way the Operator Lifecycle Manager checks new +CRDs against existing CRs. + +Prior to installing 1.16.x on Openshift, if you are upgrading from a 1.15.x (or +earlier) version of the operator, we recommend uninstalling the existing +version of the operator, then deleting all of the old conditions out of the +statuses of all existing EDB Postgres for Kubernetes clusters. +This will have no effect on the operability of your existing EDB Postgres for +Kubernetes clusters. + +To remove the existing conditions run: + +```bash +while IFS=' ' read NS CLUSTER; do + kubectl -n ${NS} patch --type='json' ${CLUSTER} --subresource=status -p='[{"op": "remove", "path": "/status/conditions"}]'; +done < <(kubectl get cluster -A --no-headers=true -o jsonpath='{range .items[*]}{.metadata.namespace}{" cluster/"}{.metadata.name}{"\n"}{end}') +``` + +!!! Important + The kubectl command must be version 1.24 or higher. + If you get the output `The request is invalid` it means that the traget cluster + didn't have any condition on it. + +This command will remove all of the conditions from all of the EDB Postgres for +Kubernetes clusters in your Openshift cluster. +Once the command completes, you can safely install version 1.16.x. + +If you have already tried to upgrade to 1.16.x from 1.15.x (or earlier) and +the install of 1.16.x shows as "Pending" and the earlier version shows as +"Cannot update", uninstall both versions of the operator and +run the command that removes the statuses. diff --git a/product_docs/docs/postgres_for_kubernetes/1/rel_notes/index.mdx b/product_docs/docs/postgres_for_kubernetes/1/rel_notes/index.mdx index c8e53f3d2cd..da7d9da294a 100644 --- a/product_docs/docs/postgres_for_kubernetes/1/rel_notes/index.mdx +++ b/product_docs/docs/postgres_for_kubernetes/1/rel_notes/index.mdx @@ -2,7 +2,9 @@ title: EDB Postgres for Kubernetes Release notes navTitle: "Release notes" navigation: +- 1_16_1_rel_notes - 1_16_rel_notes +- 1_15_3_rel_notes - 1_15_2_rel_notes - 1_15_1_rel_notes - 1_15_rel_notes @@ -32,10 +34,12 @@ The EDB Postgres for Kubernetes documentation describes the major version of EDB | Version | Release date | Upstream merges | | -------------------------- | ------------ | ------------------------------------------------------------------------------------------- | -| [1.16.0](1_16_rel_notes) | 2022 Jul 07 | Upstream [1.16.0](https://cloudnative-pg.io/documentation/1.16/release_notes/#version-1160) | -| [1.15.2](1_15_2_rel_notes) | 2022 Jul 07 | Upstream [1.15.2](https://cloudnative-pg.io/documentation/1.15/release_notes/#version-1152) | -| [1.15.1](1_15_1_rel_notes) | 2022 May 27 | Upstream [1.15.1](https://cloudnative-pg.io/documentation/1.15/release_notes/#version-1151) | -| [1.15.0](1_15_rel_notes) | 2022 Apr 21 | Upstream [1.15.0](https://cloudnative-pg.io/documentation/1.15/release_notes/#version-1150) | +| [1.16.1](1_16_1_rel_notes) | 2022 Aug 12 | Upstream [1.16.1](https://cloudnative-pg.io/documentation/1.16/release_notes/v1.16/) | +| [1.16.0](1_16_rel_notes) | 2022 Jul 07 | Upstream [1.16.0](https://cloudnative-pg.io/documentation/1.16/release_notes/v1.16) | +| [1.15.3](1_15_3_rel_notes) | 2022 Aug 12 | Upstream [1.15.3](https://cloudnative-pg.io/documentation/1.15/release_notes/v1.15) | +| [1.15.2](1_15_2_rel_notes) | 2022 Jul 07 | Upstream [1.15.2](https://cloudnative-pg.io/documentation/1.15/release_notes/v1.15) | +| [1.15.1](1_15_1_rel_notes) | 2022 May 27 | Upstream [1.15.1](https://cloudnative-pg.io/documentation/1.15/release_notes/v1.15) | +| [1.15.0](1_15_rel_notes) | 2022 Apr 21 | Upstream [1.15.0](https://cloudnative-pg.io/documentation/1.15/release_notes/v1.15) | | [1.14.0](1_14_rel_notes) | 2022 Mar 25 | NA | | [1.13.0](1_13_rel_notes) | 2022 Feb 17 | NA | | [1.12.0](1_12_rel_notes) | 2022 Jan 11 | NA | From 05bebe856e16af09dd0a64fca3888aafd096a320 Mon Sep 17 00:00:00 2001 From: kunliuedb <95676424+kunliuedb@users.noreply.github.com> Date: Mon, 15 Aug 2022 16:23:09 +0800 Subject: [PATCH 5/6] Update index.mdx --- .../preparing_cloud_account/01_preparing_azure/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_docs/docs/biganimal/release/getting_started/preparing_cloud_account/01_preparing_azure/index.mdx b/product_docs/docs/biganimal/release/getting_started/preparing_cloud_account/01_preparing_azure/index.mdx index 6e6b39a9072..d2e7c13384a 100644 --- a/product_docs/docs/biganimal/release/getting_started/preparing_cloud_account/01_preparing_azure/index.mdx +++ b/product_docs/docs/biganimal/release/getting_started/preparing_cloud_account/01_preparing_azure/index.mdx @@ -175,7 +175,7 @@ To register resource providers using the Azure Portal: 4. Review the status of the required providers. To register a provider, select the provider and, on the top menu, select **Register**. To register resource providers using the Azure CLI, -use the [register command](https://docs.microsoft.com/en-us/cli/azure/provider?view=azure-cli-latest#az_provider_register). For example: +use the [register command](https://docs.microsoft.com/en-us/cli/azure/provider?view=azure-cli-latest#az-provider-register). For example: ```shell az provider register -n Microsoft.ContainerService From 5896aede554cb9ac48c40a3a466d6afb94cc924c Mon Sep 17 00:00:00 2001 From: Josh Heyer Date: Mon, 15 Aug 2022 15:24:34 +0000 Subject: [PATCH 6/6] 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