Skip to content

Commit a3a2f00

Browse files
committed
Update OLM bundle generation logic for postgres major upgrade
This updates the OLM bundle generation logic to allow for the inclusion of the 'postgres-operator-upgrade' controller, the 'crunchy-upgrade' image and related PGUpgrade CRD and functionality. Related examples and documentation have been updated and all current images are included as required. Issue: [sc-17486]
1 parent d514dd9 commit a3a2f00

File tree

9 files changed

+32
-4
lines changed

9 files changed

+32
-4
lines changed

config/default/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace: postgres-operator
22

33
commonLabels:
4+
# Note: this label differs from the label set in postgres-operator-examples
45
postgres-operator.crunchydata.com/control-plane: postgres-operator
56

67
bases:

config/singlenamespace/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ patches:
1414
images:
1515
- name: postgres-operator
1616
newName: registry.developers.crunchydata.com/crunchydata/postgres-operator
17-
newTag: ubi8-5.3.0-0
17+
newTag: ubi8-5.4.0-0

installers/olm/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.SUFFIXES:
33

44
CONTAINER ?= docker
5-
PGO_VERSION ?= 5.2.0
6-
REPLACES_VERSION ?= 5.1.3
5+
PGO_VERSION ?= 5.4.0
6+
REPLACES_VERSION ?= 5.3.0
77

88
OS_KERNEL ?= $(shell bash -c 'echo $${1,,}' - `uname -s`)
99
OS_MACHINE ?= $(shell bash -c 'echo $${1/x86_/amd}' - `uname -m`)
@@ -45,7 +45,7 @@ bundles/marketplace:
4545
.PHONY: clean
4646
clean: clean-deprecated
4747
clean: ## Remove generated files and downloaded tools
48-
rm -rf ./bundles ./projects ./tools
48+
rm -rf ./bundles ./projects ./tools ./config/marketplace
4949

5050
.PHONY: clean-deprecated
5151
clean-deprecated:

installers/olm/bundle.relatedImages.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
image: registry.connect.redhat.com/crunchydata/crunchy-pgbouncer@sha256:<update_pgbouncer_SHA_value>
88
- name: PGEXPORTER
99
image: registry.connect.redhat.com/crunchydata/crunchy-postgres-exporter@sha256:<update_exporter_SHA_value>
10+
- name: PGUPGRADE
11+
image: registry.connect.redhat.com/crunchydata/crunchy-upgrade@sha256:<update_upgrade_SHA_value>
1012
- name: POSTGRES_13
1113
image: registry.connect.redhat.com/crunchydata/crunchy-postgres@sha256:<update_postgres13_SHA_value>
1214
- name: POSTGRES_14

installers/olm/config/examples/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ kind: Kustomization
1515

1616
resources:
1717
- postgrescluster.example.yaml
18+
- pgupgrade.example.yaml
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: postgres-operator.crunchydata.com/v1beta1
2+
kind: PGUpgrade
3+
metadata:
4+
name: example-upgrade
5+
spec:
6+
postgresClusterName: example
7+
fromPostgresVersion: 13
8+
toPostgresVersion: 14

installers/olm/config/examples/postgrescluster.example.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ spec:
1111
resources:
1212
requests:
1313
storage: 1Gi
14+
backups:
15+
pgbackrest:
16+
repos:
17+
- name: repo1
18+
volume:
19+
volumeClaimSpec:
20+
accessModes: ["ReadWriteOnce"]
21+
resources:
22+
requests:
23+
storage: 1Gi

installers/olm/config/redhat/related-images.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ spec:
1818
- { name: RELATED_IMAGE_PGBACKREST, value: 'registry.connect.redhat.com/crunchydata/crunchy-pgbackrest@sha256:<update_pgbackrest_SHA_value>' }
1919
- { name: RELATED_IMAGE_PGBOUNCER, value: 'registry.connect.redhat.com/crunchydata/crunchy-pgbouncer@sha256:<update_pgbouncer_SHA_value>' }
2020
- { name: RELATED_IMAGE_PGEXPORTER, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-exporter@sha256:<update_exporter_SHA_value>' }
21+
- { name: RELATED_IMAGE_PGUPGRADE, value: 'registry.connect.redhat.com/crunchydata/crunchy-upgrade@sha256:<update_upgrade_SHA_value>' }
2122

2223
- { name: RELATED_IMAGE_POSTGRES_13, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres@sha256:<update_postgres13_SHA_value>' }
2324
- { name: RELATED_IMAGE_POSTGRES_14, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres@sha256:<update_postgres14_SHA_value>' }
25+
- { name: RELATED_IMAGE_POSTGRES_15, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres@sha256:<update_postgres15_SHA_value>' }
2426

2527
- { name: RELATED_IMAGE_POSTGRES_13_GIS_3.0, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-gis@sha256:<update_postgres13gis30_SHA_value>' }
2628
- { name: RELATED_IMAGE_POSTGRES_13_GIS_3.1, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-gis@sha256:<update_postgres13gis31_SHA_value>' }
2729
- { name: RELATED_IMAGE_POSTGRES_14_GIS_3.1, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-gis@sha256:<update_postgres14gis31_SHA_value>' }
2830
- { name: RELATED_IMAGE_POSTGRES_14_GIS_3.2, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-gis@sha256:<update_postgres14gis32_SHA_value>' }
31+
- { name: RELATED_IMAGE_POSTGRES_14_GIS_3.3, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-gis@sha256:<update_postgres14gis33_SHA_value>' }
32+
- { name: RELATED_IMAGE_POSTGRES_15_GIS_3.3, value: 'registry.connect.redhat.com/crunchydata/crunchy-postgres-gis@sha256:<update_postgres15gis33_SHA_value>' }

installers/olm/description.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Kubernetes, providing a seamless cloud native Postgres solution to keep your dat
3131
- **Connection Pooling**: Advanced [connection pooling][pool] support using [pgBouncer][].
3232
- **Affinity and Tolerations**: Have your PostgreSQL clusters deployed to [Kubernetes Nodes][k8s-nodes] of your preference.
3333
Set your [pod anti-affinity][k8s-anti-affinity], node affinity, Pod tolerations and more rules to customize your deployment topology!
34+
- **PostgreSQL Major Version Upgrades**: Perform a [PostgreSQL major version upgrade][major-version-upgrade] declaratively.
3435
- **Full Customizability**: Crunchy PostgreSQL for Kubernetes makes it easy to get your own PostgreSQL-as-a-Service up and running
3536
and fully customize your deployments, including:
3637
- Choose the resources for your Postgres cluster: [container resources and storage size][resize-cluster]. [Resize at any time][resize-cluster] with minimal disruption.
@@ -44,6 +45,7 @@ and much more!
4445
[customize-cluster]: https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/customize-cluster/
4546
[disaster-recovery]: https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/disaster-recovery/
4647
[high-availability]: https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/high-availability/
48+
[major-version-upgrade]: https://access.crunchydata.com/documentation/postgres-operator/v5/guides/major-postgres-version-upgrade/
4749
[monitoring]: https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/monitoring/
4850
[pool]: https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/connection-pooling/
4951
[provisioning]: https://access.crunchydata.com/documentation/postgres-operator/v5/tutorial/create-cluster/

0 commit comments

Comments
 (0)