Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ after-release-versions:
-e "s#^IMAGE_PGBOUNCER18=.*#IMAGE_PGBOUNCER18=$(IMAGE_TAG_BASE):main-pgbouncer18#" \
-e "s#^IMAGE_POSTGIS18=.*#IMAGE_POSTGIS18=$(IMAGE_TAG_BASE):main-ppg18-postgres-gis#" \
-e "s#^IMAGE_BACKREST18=.*#IMAGE_BACKREST18=$(IMAGE_TAG_BASE):main-pgbackrest18#" \
-e "s#^IMAGE_POSTGRESQL19=.*#IMAGE_POSTGRESQL19=$(IMAGE_TAG_BASE):main-ppg19-postgres#" \
-e "s#^IMAGE_PGBOUNCER19=.*#IMAGE_PGBOUNCER19=$(IMAGE_TAG_BASE):main-pgbouncer19#" \
-e "s#^IMAGE_BACKREST19=.*#IMAGE_BACKREST19=$(IMAGE_TAG_BASE):main-pgbackrest19#" \
-e "s#^IMAGE_UPGRADE=.*#IMAGE_UPGRADE=$(IMAGE_TAG_BASE):main-upgrade#" \
-e "s#^IMAGE_PMM_CLIENT=.*#IMAGE_PMM_CLIENT=perconalab/pmm-client:3-dev-latest#" \
-e "s#^IMAGE_PMM_SERVER=.*#IMAGE_PMM_SERVER=perconalab/pmm-server:3-dev-latest#" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13218,7 +13218,7 @@ spec:
minimum: 1024
type: integer
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ spec:
type: object
type: object
fromPostgresVersion:
maximum: 17
maximum: 18
minimum: 12
type: integer
image:
Expand Down Expand Up @@ -1264,7 +1264,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down
6 changes: 3 additions & 3 deletions config/crd/bases/pgv2.percona.com_perconapgclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13632,7 +13632,7 @@ spec:
minimum: 1024
type: integer
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down Expand Up @@ -17456,7 +17456,7 @@ spec:
type: object
type: object
fromPostgresVersion:
maximum: 17
maximum: 18
minimum: 12
type: integer
image:
Expand Down Expand Up @@ -18254,7 +18254,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11144,7 +11144,7 @@ spec:
postGISVersion:
type: string
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down
10 changes: 5 additions & 5 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13833,7 +13833,7 @@ spec:
minimum: 1024
type: integer
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down Expand Up @@ -17661,7 +17661,7 @@ spec:
type: object
type: object
fromPostgresVersion:
maximum: 17
maximum: 18
minimum: 12
type: integer
image:
Expand Down Expand Up @@ -18459,7 +18459,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down Expand Up @@ -20810,7 +20810,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down Expand Up @@ -32054,7 +32054,7 @@ spec:
postGISVersion:
type: string
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down
10 changes: 5 additions & 5 deletions deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13833,7 +13833,7 @@ spec:
minimum: 1024
type: integer
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down Expand Up @@ -17661,7 +17661,7 @@ spec:
type: object
type: object
fromPostgresVersion:
maximum: 17
maximum: 18
minimum: 12
type: integer
image:
Expand Down Expand Up @@ -18459,7 +18459,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down Expand Up @@ -20810,7 +20810,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down Expand Up @@ -32054,7 +32054,7 @@ spec:
postGISVersion:
type: string
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down
10 changes: 5 additions & 5 deletions deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13833,7 +13833,7 @@ spec:
minimum: 1024
type: integer
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down Expand Up @@ -17661,7 +17661,7 @@ spec:
type: object
type: object
fromPostgresVersion:
maximum: 17
maximum: 18
minimum: 12
type: integer
image:
Expand Down Expand Up @@ -18459,7 +18459,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down Expand Up @@ -20810,7 +20810,7 @@ spec:
toPostgresImage:
type: string
toPostgresVersion:
maximum: 18
maximum: 19
minimum: 13
type: integer
tolerations:
Expand Down Expand Up @@ -32054,7 +32054,7 @@ spec:
postGISVersion:
type: string
postgresVersion:
maximum: 18
maximum: 19
minimum: 12
type: integer
proxy:
Expand Down
28 changes: 28 additions & 0 deletions e2e-tests/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ function get_container_image() {
pgbouncer) key="IMAGE_PGBOUNCER${pgVersion}" ;;
pgbackrest) key="IMAGE_BACKREST${pgVersion}" ;;
postgis) key="IMAGE_POSTGIS${pgVersion}" ;;
upgrade) key="IMAGE_UPGRADE${pgVersion}" ;;
*) key="IMAGE_POSTGRESQL${pgVersion}" ;;
esac
get_release_image "$key"
Expand All @@ -1413,8 +1414,35 @@ function get_container_image() {
operatorVersion=main
fi

# Community images are built from upstream PGDG packages and published under
# their own tags. pgBouncer is version agnostic there, so a single image
# serves every PostgreSQL version. PostgreSQL 19 is the exception: it is in
# beta and its images carry the version in the tag, because they are built
# separately (PGDG testing packages, pgBackRest 2.59, PG 19 upgrade binaries).
if [[ ${PG_DISTRIBUTION} == "community" ]]; then
case $component in
pgbouncer)
echo "${IMAGE_BASE}:${operatorVersion}-pgbouncer-community"
;;
pgbackrest | upgrade)
if [[ ${pgVersion} -ge 19 ]]; then
echo "${IMAGE_BASE}:${operatorVersion}-${component}${pgVersion}"
else
echo "${IMAGE_BASE}:${operatorVersion}-${component}-community"
fi
;;
*)
echo "${IMAGE_BASE}:${operatorVersion}-postgres${pgVersion}-community"
;;
esac
return
fi

if [[ $component == 'pgbouncer' || $component == 'pgbackrest' ]]; then
echo "${IMAGE_BASE}:${operatorVersion}-${component}${pgVersion}"
elif [[ $component == 'upgrade' ]]; then
# a single upgrade image carries every supported version
echo "${IMAGE_BASE}:${operatorVersion}-upgrade"
elif [[ $component == 'postgis' ]]; then
# the docker build job publishes postgis images as ...-ppg<V>-postgres-gis
echo "${IMAGE_BASE}:${operatorVersion}-ppg${pgVersion}-postgres-gis"
Expand Down
5 changes: 5 additions & 0 deletions e2e-tests/release_versions
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ IMAGE_PGBOUNCER18=perconalab/percona-postgresql-operator:main-pgbouncer18
IMAGE_POSTGIS18=perconalab/percona-postgresql-operator:main-ppg18-postgres-gis
IMAGE_BACKREST18=perconalab/percona-postgresql-operator:main-pgbackrest18

IMAGE_POSTGRESQL19=perconalab/percona-postgresql-operator:main-ppg19-postgres
IMAGE_PGBOUNCER19=perconalab/percona-postgresql-operator:main-pgbouncer19
IMAGE_BACKREST19=perconalab/percona-postgresql-operator:main-pgbackrest19
IMAGE_UPGRADE19=perconalab/percona-postgresql-operator:main-upgrade19

IMAGE_UPGRADE=perconalab/percona-postgresql-operator:main-upgrade
IMAGE_LOGCOLLECTOR=perconalab/fluentbit:main-logcollector

Expand Down
1 change: 1 addition & 0 deletions e2e-tests/run-pr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ major-upgrade-14-to-15
major-upgrade-15-to-16
major-upgrade-16-to-17
major-upgrade-17-to-18
major-upgrade-18-to-19
ldap
ldap-tls
logcollection
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/run-release.csv
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ major-upgrade-14-to-15
major-upgrade-15-to-16
major-upgrade-16-to-17
major-upgrade-17-to-18
major-upgrade-18-to-19

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we run this test also on every pr?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

major-upgrade-14-to-15-postgis
major-upgrade-15-to-16-postgis
major-upgrade-16-to-17-postgis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a postgis test as well? for all the other versions we have it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmarukovich @gkech we have PostGIS in the community image by default. Maybe we need to have a major-upgrade-18-to-19-postgis test only for now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap I agree! Let's have it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have postgis for community images.

Expand Down
24 changes: 24 additions & 0 deletions e2e-tests/tests/major-upgrade-18-to-19/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 120
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: perconapgclusters.pgv2.percona.com
spec:
group: pgv2.percona.com
names:
kind: PerconaPGCluster
listKind: PerconaPGClusterList
plural: perconapgclusters
singular: perconapgcluster
scope: Namespaced
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
metadata:
name: check-operator-deploy-status
timeout: 120
commands:
- script: kubectl assert exist-enhanced deployment percona-postgresql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1
13 changes: 13 additions & 0 deletions e2e-tests/tests/major-upgrade-18-to-19/00-deploy-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |-
set -o errexit
set -o xtrace

source ../../functions
init_temp_dir # do this only in the first TestStep

deploy_operator
deploy_client
deploy_s3_secrets
Loading
Loading