Skip to content

Commit 9da1b9a

Browse files
committed
K8SPG-882 Added a deprecation warning to setting Patroni version
1 parent 27eeb46 commit 9da1b9a

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
{
2+
"cSpell.words": [
3+
"crunchydata",
4+
"Patroni",
5+
"pgadmin",
6+
"pgbackrest",
7+
"pgbouncer",
8+
"pgwal",
9+
"subdoc"
10+
]
211
}

docs/annotations.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ Use **Annotations** when:
113113
| `pgv2.percona.com/monitor-user-secret-hash` | Custom Resource | Hash of the monitor user secret, used to detect changes and trigger updates. | `b6e1a2c3...` |
114114
| `pgv2.percona.com/backup-in-progress` | Custom Resource | Indicates a backup that is currently running for the cluster. | `true` |
115115
| `pgv2.percona.com/cluster-bootstrap-restore` | Custom Resource | Marks that the cluster was bootstrapped from a restore. | `2024-07-01T12:34:56Z` |
116-
| `pgv2.percona.com/patroni-version` | Pods, StatefulSets | The Patroni version running in the Pod or StatefulSet. | `3.3.0` |
117-
| `pgv2.percona.com/custom-patroni-version` | Pods, StatefulSets | Custom Patroni version specified by the user. | `3.3.0-percona` |
116+
| `pgv2.percona.com/patroni-version` | Pods, StatefulSets | The Patroni version running in the Pod or StatefulSet. | `{{patronirecommended}}` |
117+
| `pgv2.percona.com/custom-patroni-version` | Pods, StatefulSets | Custom Patroni version specified by the user. Deprecated and ignored starting with version 2.8.0 | `3.3.0-percona` |
118118
| `kubectl.kubernetes.io/default-container` | Pods | Defines a default container used when the `-c` flag is not passed when executing to a Pod.|
119119

120120
## Setting labels and annotations in the Custom Resource
@@ -252,6 +252,10 @@ Metadata can be used as an additional way to influence the Operator behavior by
252252

253253
### Customizing Patroni version
254254

255+
!!! note
256+
257+
This behavior is deprecated and the annotation is ignored starting with version 2.8.0.
258+
255259
Starting from the Operator 2.6.0, Percona distribution for PostgreSQL comes with Patroni 4.x, which introduces breaking changes compared to previously used 3.x versions. To maintain backward compatibility, the Operator needs to detect the Patroni version used in the image. For this, it runs a temporary Pod named `cluster_name-patroni-version-check` with the following default resources:
256260

257261
```yaml

docs/operator.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for PostgreSQL Cluster; it should include only [URL-compatible characters :octic
1818

1919
* <a name="finalizers-delete-backups"></a> `finalizers.percona.com/delete-backups` if present, activates the [Finalizer :octicons-link-external-16:](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#finalizers) which deletes all the [backups](backups.md) of the database cluster from all configured repos on cluster deletion event (off by default). **`delete-backups` finalizer is in tech preview state, and it is not yet recommended for production environments.**
2020

21-
## Toplevel `spec` elements
21+
## Top level `spec` elements
2222

2323
The spec part of the [deploy/cr.yaml :octicons-link-external-16:](https://github.com/percona/percona-postgresql-operator/blob/main/deploy/cr.yaml) file contains the following:
2424

@@ -80,7 +80,7 @@ Port number used by a standby copy to connect to the primary cluster.
8080

8181
### `openshift`
8282

83-
Set to `true` if the cluster is being deployed on OpenShift, set to `false` otherwise, or unset it for autodetection.
83+
Set to `true` if the cluster is being deployed on OpenShift, set to `false` otherwise, or unset it for auto-detection.
8484

8585
| Value type | Example |
8686
| ---------- | ------- |
@@ -854,7 +854,7 @@ The [Kubernetes Pod tolerations :octicons-link-external-16:](https://kubernetes.
854854

855855
### `instances.priorityClassName`
856856

857-
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for PostgreSQL instance Pods.
857+
The [Kubernetes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for PostgreSQL instance Pods.
858858

859859
| Value type | Example |
860860
| ---------- | ------- |
@@ -902,7 +902,7 @@ The [Kubernetes PersistentVolumeClaim :octicons-link-external-16:](https://kuber
902902

903903
### `instances.dataVolumeClaimSpec.storageClassName`
904904

905-
Set the [Kubernetes storage class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with PosgreSQL Cluster [PersistentVolumeClaim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) for the PostgreSQL storage.
905+
Set the [Kubernetes storage class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with PostgreSQL Cluster [PersistentVolumeClaim :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) for the PostgreSQL storage.
906906

907907
| Value type | Example |
908908
| ---------- | ------- |
@@ -1140,15 +1140,15 @@ The number of retries to make a backup with incremental pauses of 10 seconds, 20
11401140

11411141
### `backups.pgbackrest.jobs.restartPolicy`
11421142

1143-
The [Kuberentes Pod restart policy :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) for pgBackRest jobs.
1143+
The [Kubernetes Pod restart policy :octicons-link-external-16:](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) for pgBackRest jobs.
11441144

11451145
| Value type | Example |
11461146
| ---------- | ------- |
11471147
| :material-code-string: string | `OnFailure` |
11481148

11491149
### `backups.pgbackrest.jobs.priorityClassName`
11501150

1151-
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for pgBackRest jobs.
1151+
The [Kubernetes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for pgBackRest jobs.
11521152

11531153
| Value type | Example |
11541154
| ---------- | ------- |
@@ -1277,7 +1277,7 @@ The [Kubernetes memory limits :octicons-link-external-16:](https://kubernetes.io
12771277

12781278
### `backups.pgbackrest.repoHost.priorityClassName`
12791279

1280-
The [Kuberentes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for pgBackRest repo.
1280+
The [Kubernetes Pod priority class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass) for pgBackRest repo.
12811281

12821282
| Value type | Example |
12831283
| ---------- | ------- |
@@ -1423,7 +1423,7 @@ The [Kubernetes PersistentVolumeClaim :octicons-link-external-16:](https://kuber
14231423

14241424
### `backups.pgbackrest.repos.volume.volumeClaimSpec.storageClassName`
14251425

1426-
Set the [Kubernetes Storage Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with the Percona Operator for PosgreSQL backups stored on [Persistent Volume](backups-storage.md#__tabbed_1_4).
1426+
Set the [Kubernetes Storage Class :octicons-link-external-16:](https://kubernetes.io/docs/concepts/storage/storage-classes/) to use with the Percona Operator for PostgreSQL backups stored on [Persistent Volume](backups-storage.md#__tabbed_1_4).
14271427

14281428
| Value type | Example |
14291429
| ---------- | ------- |
@@ -1740,7 +1740,7 @@ The [Kubernetes annotations :octicons-link-external-16:](https://kubernetes.io/d
17401740

17411741
| Value type | Example |
17421742
| ---------- | ------- |
1743-
| :material-label-outline: label | `pg-cluster-annot: cluster1` |
1743+
| :material-label-outline: label | `my-annotation: value1` |
17441744

17451745
### `proxy.pgBouncer.expose.labels`
17461746

0 commit comments

Comments
 (0)