Skip to content

Commit

Permalink
Merge pull request #3241 from EnterpriseDB/release/2022-10-7a
Browse files Browse the repository at this point in the history
Release: 2022-10-7a
  • Loading branch information
drothery-edb authored Oct 7, 2022
2 parents 49f41dc + 50711d6 commit 2f5b710
Show file tree
Hide file tree
Showing 10 changed files with 187 additions and 569 deletions.
4 changes: 2 additions & 2 deletions product_docs/docs/postgres_for_kubernetes/1/bootstrap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ spec:
size: 1Gi
```

EDB Postgres for Kubernetes supports another way to customize the behaviour of the
EDB Postgres for Kubernetes supports another way to customize the behavior of the
`initdb` invocation, using the `options` subsection. However, given that there
are options that can break the behaviour of the operator (such as `--auth` or
are options that can break the behavior of the operator (such as `--auth` or
`-d`), this technique is deprecated and will be removed from future versions of
the API.

Expand Down
23 changes: 21 additions & 2 deletions product_docs/docs/postgres_for_kubernetes/1/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,29 @@ Our advice is for everyone that wants to fully exploit Cloud Native
PostgreSQL to acquire the "Certified Kubernetes Administrator (CKA)"
status from the CNCF certification program.

<!--

## High availability

**What happens to the PostgreSQL clusters when the operator pod dies or it is
not available for a certain amount of time?**

The EDB Postgres for Kubernetes operator, among other things, is responsible for self-healing
capabilities. As such, they might not be available during an outage of the
operator.

However, assuming that the outage does not affect the nodes where PostgreSQL
clusters are running, the database will continue to serve normal operations,
through the relevant Kubernetes services. Moreover, the [instance manager](instance_manager.md),
which runs inside each PostgreSQL pod will still work, making sure that the
database server is up, including accessory services like logging, export of
metrics, continuous archiving of WAL files, etc.

To summarize:

an outage of the operator does not necessarily imply a PostgreSQL
database outage; it's like running a database without a DBA or system
administrator.

<!--
What are the reasons behind EDB Postgres for Kubernetes not relying on a failover
management tool like Patroni, repmgr, or Stolon?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ originalFilePath: 'src/installation_upgrade.md'
The operator can be installed like any other resource in Kubernetes,
through a YAML manifest applied via `kubectl`.

You can install the [latest operator manifest](https://get.enterprisedb.io/cnp/postgresql-operator-1.17.0.yaml)
You can install the [latest operator manifest](https://get.enterprisedb.io/cnp/postgresql-operator-1.17.1.yaml)
as follows:

```sh
kubectl apply -f \
https://get.enterprisedb.io/cnp/postgresql-operator-1.17.0.yaml
https://get.enterprisedb.io/cnp/postgresql-operator-1.17.1.yaml
```

Once you have run the `kubectl` command, EDB Postgres for Kubernetes will be installed in your Kubernetes cluster.
Expand Down Expand Up @@ -77,7 +77,7 @@ plane for self-managed Kubernetes installations).
## Upgrades

!!! Important
Please carefully read the [Release notes](rel_notes)
Please carefully read the [release notes](release_notes.md)
before performing an upgrade as some versions might require
extra steps.

Expand Down Expand Up @@ -164,7 +164,7 @@ come current periodically and not skipping versions.
In 2022, EDB plans an LTS release for EDB Postgres for Kubernetes in
environments where frequent online updates are not possible.

The [Release notes](rel_notes) page contains a detailed list of the
The [release notes](release_notes.md) page contains a detailed list of the
changes introduced in every released version of EDB Postgres for Kubernetes,
and it must be read before upgrading to a newer version of the software.

Expand Down
88 changes: 76 additions & 12 deletions product_docs/docs/postgres_for_kubernetes/1/monitoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ more `ConfigMap` or `Secret` resources (see the
[by default a set of predefined metrics](#default-set-of-metrics) in
a `ConfigMap` called `default-monitoring`.

Metrics can be accessed as follows:

```shell
curl http://<pod_ip>:9187/metrics
```
!!! Info
You can inspect the exported metrics by following the instructions in
the ["How to inspect the exported metrics"](#how-to-inspect-the-exported-metrics)
section below.

All monitoring queries that are performed on PostgreSQL are:

- transactionally atomic (one transaction per query)
- atomic (one transaction per query)
- executed with the `pg_monitor` role
- executed with `application_name` set to `cnp_metrics_exporter`
- executed as user `postgres`
Expand Down Expand Up @@ -364,7 +363,9 @@ data:
description: "Number of streaming replicas connected to the instance"
```

A list of basic monitoring queries can be found in the [`cnp-basic-monitoring.yaml` file](../samples/cnp-basic-monitoring.yaml).
A list of basic monitoring queries can be found in the
[`default-monitoring.yaml` file](https://github.com/EnterpriseDB/cloud-native-postgres/blob/main/config/manager/default-monitoring.yaml)
that is already installed in your EDB Postgres for Kubernetes deployment (see ["Default set of metrics"](#default-set-of-metrics)).

#### Example of a user defined metric running on multiple databases

Expand Down Expand Up @@ -560,11 +561,10 @@ in EDB Postgres for Kubernetes' exporter.
The operator internally exposes [Prometheus](https://prometheus.io/) metrics
via HTTP on port 8080, named `metrics`.

Metrics can be accessed as follows:

```shell
curl http://<pod_ip>:8080/metrics
```
!!! Info
You can inspect the exported metrics by following the instructions in
the ["How to inspect the exported metrics"](#how-to-inspect-the-exported-metrics)
section below.

Currently, the operator exposes default `kubebuilder` metrics, see
[kubebuilder documentation](https://book.kubebuilder.io/reference/metrics.html) for more details.
Expand All @@ -589,6 +589,70 @@ spec:
- port: metrics
```

## How to inspect the exported metrics

In this section we provide some basic instructions on how to inspect
the metrics exported by a specific PostgreSQL instance manager (primary
or replica) or the operator, using a temporary pod running `curl` in
the same namespace.

!!! Note
In the example below we assume we are working in the default namespace,
alongside with the PostgreSQL cluster. Please feel free to adapt
this example to your use case, by applying basic Kubernetes knowledge.

Create the `curl.yaml` file with this content:

```yaml
apiVersion: v1
kind: Pod
metadata:
name: curl
spec:
containers:
- name: curl
image: curlimages/curl:7.84.0
command: ['sleep', '3600']
```

Then create the pod:

```shell
kubectl apply -f curl.yaml
```

In case you want to inspect the metrics exported by an instance, you need
to connect to port 9187 of the target pod. This is the generic command to be
run (make sure you use the correct IP for the pod):

```shell
kubectl exec -ti curl -- curl -s <pod_ip>:9187/metrics
```

For example, if your PostgreSQL cluster is called `cluster-example` and
you want to retrieve the exported metrics of the first pod in the cluster,
you can run the following command to programmatically get the IP of
that pod:

```shell
POD_IP=$(kubectl get pod cluster-example-1 --template '{{.status.podIP}}')
```

And then run:

```shell
kubectl exec -ti curl -- curl -s ${POD_IP}:9187/metrics
```

In case you want to access the metrics of the operator, you need to point
to the pod where the operator is running, and use TCP port 8080 as target.

At the end of the inspection, please make sure you delete the `curl` pod:

```shell
kubectl delete -f curl.yaml
```

## Monitoring on OpenShift

Starting on Openshift 4.6 there is a complete monitoring stack called
Expand Down
34 changes: 26 additions & 8 deletions product_docs/docs/postgres_for_kubernetes/1/openshift.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@ and ["Users and Permissions"](#users-and-permissions) below).
project. When bound to a user with a local binding, they have full control over
quota and every action on every resource in the project*".

## 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.

To avoid this issue, you need to upgrade to version 1.15.5 first, and then you
can safely go to 1.16.x or 1.17.x.
1.15.5 will automatically remove the offending conditions from all the cluster
CRs which will unblock Openshift from upgrading.

!!! Warning 1.15.x is now at End of Life

No future updates to this version are planned; please use 1.15.5 only temporarily, to
upgrade to 1.16.x or later, as described above.

## Important OpenShift concepts

To understand how the EDB Postgres for Kubernetes operator fits in an OpenShift environment,
Expand Down Expand Up @@ -135,14 +153,14 @@ principles, our recommendation is to use the `fast` channel.
### About the `stable` channel

The `stable` channel was previously used by EDB to distribute `cloud-native-postgresql`.
This channel is **obsolete**, and for back compatibility it is currently set as an alias of
the `stable-v1.15` channel. `stable` will be removed once version 1.15 goes *End of Life*.
This channel is **obsolete**, and for backwards compatibility it is currently set to
version 1.16.2. The `stable` channel will be removed entirely in the future.

If you were using `stable` before 1.16 was released, you have two options:
If you are currently using `stable`, you have two options for moving off of it:

- stick with `stable` and therefore remain in the 1.15 minor release, consuming
future patch releases
- move to `fast`, which is the equivalent of `stable` before we introduced support for
1. Move to a `stable-vX.Y` channel to remain in a minor release (e.g. `stable-v1.16` would
remain in the 1.16 minor release, consuming future patch releases).
2. Move to `fast`, which is the equivalent of `stable` before we introduced support for
multiple minor releases with the advent of 1.16

## Installation via web console
Expand Down Expand Up @@ -469,7 +487,7 @@ plane in managing PostgreSQL clusters.

### Cluster roles

The Operator Licecycle Manager (OLM) automatically creates a set of cluster
The Operator Lifecycle Manager (OLM) automatically creates a set of cluster
role objects to facilitate role binding definitions and granular implementation
of RBAC policies. Some cluster roles have rules that apply to Custom Resource
Definitions that are part of EDB Postgres for Kubernetes, while others that are
Expand Down Expand Up @@ -752,4 +770,4 @@ Then:
- set `pgbouncer` as the name of the container (required field in the pod template)
- set the *"Image"* field as desired (see the image below)

![Pooler image](./images/pgbouncer-pooler-image.png)
![Pooler image](./images/pgbouncer-pooler-image.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "EDB Postgres for Kubernetes 1.15.5 release notes"
navTitle: "Version 1.15.5"
---

!!!warning
Version 1.15 has reached End-of-Life (EOL). Version 1.15.5 is the last release for the 1.15 minor version.

This release of EDB Postgres for Kubernetes includes the following:

| Type | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Upstream merge | Merged with community CloudNativePG 1.15.5. See the community [Release Notes](https://cloudnative-pg.io/documentation/1.17/release_notes/v1.15/). |
| Enhancement | Introduces `leaseDuration` and `renewDeadline` parameters in the controller manager to enhance configuration of the leader election in operator deployments. |
| Enhancement | Improves the mechanism that checks that the backup object store is empty before archiving a WAL file for the first time. A new file called `.check-empty-wal-archive` is placed in the `PGDATA` immediately after the cluster is bootstrapped. It is removed after the first WAL file is successfully archived. |
| Security | Explicitly sets permissions of the instance manager binary that is copied in the `distroless/static:nonroot` container image, by using the `nonroot:nonroot` user. |
| Bug fix | Makes the cluster's conditions compatible with `metav1.Conditions` struct. |
| Bug fix | Drops any active connection on a standby after it is promoted to primary. |
| Bug fix | Honors `MAPPEDMETRIC` and `DURATION` metric types conversion in the native Prometheus exporter. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "EDB Postgres for Kubernetes 1.16.3 release notes"
navTitle: "Version 1.16.3"
---

This release of EDB Postgres for Kubernetes includes the following:

| Type | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Upstream merge | Merged with community CloudNativePG 1.16.3. See the community [Release Notes](https://cloudnative-pg.io/documentation/1.17/release_notes/v1.16/). |
| Enhancement | Introduces `leaseDuration` and `renewDeadline` parameters in the controller manager to enhance configuration of the leader election in operator deployments. |
| Enhancement | Improves the mechanism that checks that the backup object store is empty before archiving a WAL file for the first time. A new file called `.check-empty-wal-archive` is placed in the `PGDATA` immediately after the cluster is bootstrapped. It is removed after the first WAL file is successfully archived. |
| Security | Explicitly sets permissions of the instance manager binary that is copied in the `distroless/static:nonroot` container image, by using the `nonroot:nonroot` user. |
| Bug fix | Drops any active connection on a standby after it is promoted to primary. |
| Bug fix | Honors `MAPPEDMETRIC` and `DURATION` metric types conversion in the native Prometheus exporter. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "EDB Postgres for Kubernetes 1.17.1 release notes"
navTitle: "Version 1.17.1"
---

This release of EDB Postgres for Kubernetes includes the following:

| Type | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Upstream merge | Merged with community CloudNativePG 1.17.1. See the community [Release Notes](https://cloudnative-pg.io/documentation/1.17/release_notes/v1.17/). |
| Enhancement | Introduces `leaseDuration` and `renewDeadline` parameters in the controller manager to enhance configuration of the leader election in operator deployments. |
| Enhancement | Improves the mechanism that checks that the backup object store is empty before archiving a WAL file for the first time. A new file called `.check-empty-wal-archive` is placed in the `PGDATA` immediately after the cluster is bootstrapped. It is removed after the first WAL file is successfully archived. |
| Security | Explicitly sets permissions of the instance manager binary that is copied in the `distroless/static:nonroot` container image, by using the `nonroot:nonroot` user. |
| Bug fix | Drops any active connection on a standby after it is promoted to primary. |
| Bug fix | Honors `MAPPEDMETRIC` and `DURATION` metric types conversion in the native Prometheus exporter. |
| Bug fix | Ensures that timestamps that are specified with microsecond precision using the PostgreSQL format are correctly parsed. |
Loading

0 comments on commit 2f5b710

Please sign in to comment.