From 385253404391783cabd1b20706fc7d6d940b396a Mon Sep 17 00:00:00 2001 From: TJ Moore Date: Tue, 22 Oct 2024 13:34:42 -0400 Subject: [PATCH 1/2] Remove Postgres 10 from APIs and Tests Issue: PGO-614 --- ...es-operator.crunchydata.com_pgupgrades.yaml | 4 ++-- ...rator.crunchydata.com_postgresclusters.yaml | 2 +- internal/patroni/config_test.go | 18 ------------------ .../v1beta1/pgupgrade_types.go | 4 ++-- .../v1beta1/postgrescluster_types.go | 2 +- .../01--valid-upgrade.yaml | 2 +- .../10--cluster.yaml | 2 +- .../e2e/major-upgrade-missing-image/README.md | 2 +- 8 files changed, 9 insertions(+), 27 deletions(-) diff --git a/config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml b/config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml index 268fe04b34..3bb3e7bd21 100644 --- a/config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -966,7 +966,7 @@ spec: fromPostgresVersion: description: The major version of PostgreSQL before the upgrade. maximum: 17 - minimum: 10 + minimum: 11 type: integer image: description: The image name to use for major PostgreSQL upgrades. @@ -1083,7 +1083,7 @@ spec: toPostgresVersion: description: The major version of PostgreSQL to be upgraded to. maximum: 17 - minimum: 10 + minimum: 11 type: integer tolerations: description: |- diff --git a/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml b/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml index 4f79a80125..953ff3b7e5 100644 --- a/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -11581,7 +11581,7 @@ spec: description: The major version of PostgreSQL installed in the PostgreSQL image maximum: 17 - minimum: 10 + minimum: 11 type: integer proxy: description: The specification of a proxy that connects to PostgreSQL. diff --git a/internal/patroni/config_test.go b/internal/patroni/config_test.go index 1fa51a81ae..a45568df8b 100644 --- a/internal/patroni/config_test.go +++ b/internal/patroni/config_test.go @@ -704,24 +704,6 @@ func TestDynamicConfiguration(t *testing.T) { }, }, }, - { - name: "pg version 10", - cluster: &v1beta1.PostgresCluster{ - Spec: v1beta1.PostgresClusterSpec{ - PostgresVersion: 10, - }, - }, - expected: map[string]any{ - "loop_wait": int32(10), - "ttl": int32(30), - "postgresql": map[string]any{ - "parameters": map[string]any{}, - "pg_hba": []string{}, - "use_pg_rewind": false, - "use_slots": false, - }, - }, - }, { name: "tde enabled", cluster: &v1beta1.PostgresCluster{ diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgupgrade_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgupgrade_types.go index fd32862d2d..8e99f8239f 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgupgrade_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgupgrade_types.go @@ -48,7 +48,7 @@ type PGUpgradeSpec struct { // The major version of PostgreSQL before the upgrade. // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=10 + // +kubebuilder:validation:Minimum=11 // +kubebuilder:validation:Maximum=17 FromPostgresVersion int `json:"fromPostgresVersion"` @@ -59,7 +59,7 @@ type PGUpgradeSpec struct { // The major version of PostgreSQL to be upgraded to. // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=10 + // +kubebuilder:validation:Minimum=11 // +kubebuilder:validation:Maximum=17 ToPostgresVersion int `json:"toPostgresVersion"` diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go index d43197ce11..de31881882 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go @@ -111,7 +111,7 @@ type PostgresClusterSpec struct { // The major version of PostgreSQL installed in the PostgreSQL image // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=10 + // +kubebuilder:validation:Minimum=11 // +kubebuilder:validation:Maximum=17 // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1 PostgresVersion int `json:"postgresVersion"` diff --git a/testing/kuttl/e2e/major-upgrade-missing-image/01--valid-upgrade.yaml b/testing/kuttl/e2e/major-upgrade-missing-image/01--valid-upgrade.yaml index fa3985231d..741efead41 100644 --- a/testing/kuttl/e2e/major-upgrade-missing-image/01--valid-upgrade.yaml +++ b/testing/kuttl/e2e/major-upgrade-missing-image/01--valid-upgrade.yaml @@ -6,6 +6,6 @@ metadata: name: empty-image-upgrade spec: # postgres version that is no longer available - fromPostgresVersion: 10 + fromPostgresVersion: 11 toPostgresVersion: ${KUTTL_PG_UPGRADE_TO_VERSION} postgresClusterName: major-upgrade-empty-image diff --git a/testing/kuttl/e2e/major-upgrade-missing-image/10--cluster.yaml b/testing/kuttl/e2e/major-upgrade-missing-image/10--cluster.yaml index c85a9b8dae..f5ef8c029e 100644 --- a/testing/kuttl/e2e/major-upgrade-missing-image/10--cluster.yaml +++ b/testing/kuttl/e2e/major-upgrade-missing-image/10--cluster.yaml @@ -7,7 +7,7 @@ metadata: name: major-upgrade-empty-image spec: # postgres version that is no longer available - postgresVersion: 10 + postgresVersion: 11 patroni: dynamicConfiguration: postgresql: diff --git a/testing/kuttl/e2e/major-upgrade-missing-image/README.md b/testing/kuttl/e2e/major-upgrade-missing-image/README.md index 341cc854f7..1053da29ed 100644 --- a/testing/kuttl/e2e/major-upgrade-missing-image/README.md +++ b/testing/kuttl/e2e/major-upgrade-missing-image/README.md @@ -11,7 +11,7 @@ PostgresCluster spec or via the RELATED_IMAGES environment variables. ### Verify new statuses for missing required container images -* 10--cluster: create the cluster with an unavailable image (i.e. Postgres 10) +* 10--cluster: create the cluster with an unavailable image (i.e. Postgres 11) * 10-assert: check that the PGUpgrade instance has the expected reason: "PGClusterNotShutdown" * 11-shutdown-cluster: set the spec.shutdown value to 'true' as required for upgrade * 11-assert: check that the new reason is set, "PGClusterPrimaryNotIdentified" From 1d74943e5a59160e5f4813524a67a33bebfab7b3 Mon Sep 17 00:00:00 2001 From: TJ Moore Date: Tue, 22 Oct 2024 13:35:57 -0400 Subject: [PATCH 2/2] Remove major-upgrade-missing-image KUTTL test from e2e-other This test duplicates what's in the main e2e folder. --- .../01--valid-upgrade.yaml | 11 ------ .../01-assert.yaml | 10 ----- .../10--cluster.yaml | 23 ----------- .../10-assert.yaml | 12 ------ .../11--shutdown-cluster.yaml | 8 ---- .../11-assert.yaml | 11 ------ .../12--start-and-update-version.yaml | 17 -------- .../12-assert.yaml | 31 --------------- .../13--shutdown-cluster.yaml | 8 ---- .../13-assert.yaml | 11 ------ .../14--annotate-cluster.yaml | 8 ---- .../14-assert.yaml | 22 ----------- .../15--start-cluster.yaml | 10 ----- .../15-assert.yaml | 18 --------- .../16-check-pgbackrest.yaml | 6 --- .../17--check-version.yaml | 39 ------------------- .../17-assert.yaml | 7 ---- .../major-upgrade-missing-image/README.md | 36 ----------------- 18 files changed, 288 deletions(-) delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/01--valid-upgrade.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/01-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/10--cluster.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/10-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/11--shutdown-cluster.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/11-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/12--start-and-update-version.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/12-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/13--shutdown-cluster.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/13-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/14--annotate-cluster.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/14-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/15--start-cluster.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/15-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/16-check-pgbackrest.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/17--check-version.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/17-assert.yaml delete mode 100644 testing/kuttl/e2e-other/major-upgrade-missing-image/README.md diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/01--valid-upgrade.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/01--valid-upgrade.yaml deleted file mode 100644 index fa3985231d..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/01--valid-upgrade.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# This upgrade is valid, but has no pgcluster to work on and should get that condition -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -spec: - # postgres version that is no longer available - fromPostgresVersion: 10 - toPostgresVersion: ${KUTTL_PG_UPGRADE_TO_VERSION} - postgresClusterName: major-upgrade-empty-image diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/01-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/01-assert.yaml deleted file mode 100644 index b7d0f936fb..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/01-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -status: - conditions: - - type: "Progressing" - status: "False" - reason: "PGClusterNotFound" diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/10--cluster.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/10--cluster.yaml deleted file mode 100644 index c85a9b8dae..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/10--cluster.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Create the cluster we will do an actual upgrade on, but set the postgres version -# to '10' to force a missing image scenario -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -spec: - # postgres version that is no longer available - postgresVersion: 10 - patroni: - dynamicConfiguration: - postgresql: - parameters: - shared_preload_libraries: pgaudit, set_user, pg_stat_statements, pgnodemx, pg_cron - instances: - - dataVolumeClaimSpec: { accessModes: [ReadWriteOnce], resources: { requests: { storage: 1Gi } } } - backups: - pgbackrest: - repos: - - name: repo1 - volume: - volumeClaimSpec: { accessModes: [ReadWriteOnce], resources: { requests: { storage: 1Gi } } } diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/10-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/10-assert.yaml deleted file mode 100644 index 72e9ff6387..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/10-assert.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# The cluster is not running due to the missing image, not due to a proper -# shutdown status. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -status: - conditions: - - type: "Progressing" - status: "False" - reason: "PGClusterNotShutdown" diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/11--shutdown-cluster.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/11--shutdown-cluster.yaml deleted file mode 100644 index 316f3a5472..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/11--shutdown-cluster.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Shutdown the cluster -- but without the annotation. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -spec: - shutdown: true diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/11-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/11-assert.yaml deleted file mode 100644 index 5bd9d447cb..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/11-assert.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# Since the cluster is missing the annotation, we get this condition -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -status: - conditions: - - type: "Progressing" - status: "False" - reason: "PGClusterPrimaryNotIdentified" diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/12--start-and-update-version.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/12--start-and-update-version.yaml deleted file mode 100644 index fcdf4f62e3..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/12--start-and-update-version.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Update the postgres version and restart the cluster. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -spec: - shutdown: false - postgresVersion: ${KUTTL_PG_UPGRADE_FROM_VERSION} ---- -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -spec: - # update postgres version - fromPostgresVersion: ${KUTTL_PG_UPGRADE_FROM_VERSION} diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/12-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/12-assert.yaml deleted file mode 100644 index 14c33cccfe..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/12-assert.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# Wait for the instances to be ready and the replica backup to complete -# by waiting for the status to signal pods ready and pgbackrest stanza created -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -spec: - postgresVersion: ${KUTTL_PG_UPGRADE_FROM_VERSION} -status: - instances: - - name: '00' - replicas: 1 - readyReplicas: 1 - updatedReplicas: 1 - pgbackrest: - repos: - - name: repo1 - replicaCreateBackupComplete: true - stanzaCreated: true ---- -# Even when the cluster exists, the pgupgrade is not progressing because the cluster is not shutdown -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -status: - conditions: - - type: "Progressing" - status: "False" - reason: "PGClusterNotShutdown" diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/13--shutdown-cluster.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/13--shutdown-cluster.yaml deleted file mode 100644 index 316f3a5472..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/13--shutdown-cluster.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Shutdown the cluster -- but without the annotation. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -spec: - shutdown: true diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/13-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/13-assert.yaml deleted file mode 100644 index 78e51e566a..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/13-assert.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# Since the cluster is missing the annotation, we get this condition -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -status: - conditions: - - type: "Progressing" - status: "False" - reason: "PGClusterMissingRequiredAnnotation" diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/14--annotate-cluster.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/14--annotate-cluster.yaml deleted file mode 100644 index 2fa2c949a9..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/14--annotate-cluster.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Annotate the cluster for an upgrade. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image - annotations: - postgres-operator.crunchydata.com/allow-upgrade: empty-image-upgrade diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/14-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/14-assert.yaml deleted file mode 100644 index bd828180f4..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/14-assert.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Now that the postgres cluster is shut down and annotated, the pgupgrade -# can finish reconciling. We know the reconciliation is complete when -# the pgupgrade status is succeeded and the postgres cluster status -# has the updated version. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PGUpgrade -metadata: - name: empty-image-upgrade -status: - conditions: - - type: "Progressing" - status: "False" - - type: "Succeeded" - status: "True" ---- -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -status: - postgresVersion: ${KUTTL_PG_UPGRADE_TO_VERSION} diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/15--start-cluster.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/15--start-cluster.yaml deleted file mode 100644 index e5f270fb2f..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/15--start-cluster.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# Once the pgupgrade is finished, update the version and set shutdown to false -# in the postgres cluster -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -spec: - postgresVersion: ${KUTTL_PG_UPGRADE_TO_VERSION} - shutdown: false diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/15-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/15-assert.yaml deleted file mode 100644 index dfcbd4c819..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/15-assert.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Wait for the instances to be ready with the target Postgres version. -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: major-upgrade-empty-image -status: - postgresVersion: ${KUTTL_PG_UPGRADE_TO_VERSION} - instances: - - name: '00' - replicas: 1 - readyReplicas: 1 - updatedReplicas: 1 - pgbackrest: - repos: - - name: repo1 - replicaCreateBackupComplete: true - stanzaCreated: true diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/16-check-pgbackrest.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/16-check-pgbackrest.yaml deleted file mode 100644 index 969e7f0ac3..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/16-check-pgbackrest.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: -# Check that the pgbackrest setup has successfully completed -- script: | - kubectl -n "${NAMESPACE}" exec "statefulset.apps/major-upgrade-empty-image-repo-host" -c pgbackrest -- pgbackrest check --stanza=db diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/17--check-version.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/17--check-version.yaml deleted file mode 100644 index 5315c1d14f..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/17--check-version.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Check the version reported by PostgreSQL -apiVersion: batch/v1 -kind: Job -metadata: - name: major-upgrade-empty-image-after - labels: { postgres-operator-test: kuttl } -spec: - backoffLimit: 6 - template: - metadata: - labels: { postgres-operator-test: kuttl } - spec: - restartPolicy: Never - containers: - - name: psql - image: ${KUTTL_PSQL_IMAGE} - env: - - name: PGURI - valueFrom: { secretKeyRef: { name: major-upgrade-empty-image-pguser-major-upgrade-empty-image, key: uri } } - - # Do not wait indefinitely. - - { name: PGCONNECT_TIMEOUT, value: '5' } - - # Note: the `$$$$` is reduced to `$$` by Kubernetes. - # - https://kubernetes.io/docs/tasks/inject-data-application/ - command: - - psql - - $(PGURI) - - --quiet - - --echo-errors - - --set=ON_ERROR_STOP=1 - - --command - - | - DO $$$$ - BEGIN - ASSERT current_setting('server_version_num') LIKE '${KUTTL_PG_UPGRADE_TO_VERSION}%', - format('got %L', current_setting('server_version_num')); - END $$$$; diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/17-assert.yaml b/testing/kuttl/e2e-other/major-upgrade-missing-image/17-assert.yaml deleted file mode 100644 index 56289c35c1..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/17-assert.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: major-upgrade-empty-image-after -status: - succeeded: 1 diff --git a/testing/kuttl/e2e-other/major-upgrade-missing-image/README.md b/testing/kuttl/e2e-other/major-upgrade-missing-image/README.md deleted file mode 100644 index 341cc854f7..0000000000 --- a/testing/kuttl/e2e-other/major-upgrade-missing-image/README.md +++ /dev/null @@ -1,36 +0,0 @@ -## Major upgrade missing image tests - -This is a variation derived from our major upgrade KUTTL tests designed to -test scenarios where required container images are not defined in either the -PostgresCluster spec or via the RELATED_IMAGES environment variables. - -### Basic PGUpgrade controller and CRD instance validation - -* 01--valid-upgrade: create a valid PGUpgrade instance -* 01-assert: check that the PGUpgrade instance exists and has the expected status - -### Verify new statuses for missing required container images - -* 10--cluster: create the cluster with an unavailable image (i.e. Postgres 10) -* 10-assert: check that the PGUpgrade instance has the expected reason: "PGClusterNotShutdown" -* 11-shutdown-cluster: set the spec.shutdown value to 'true' as required for upgrade -* 11-assert: check that the new reason is set, "PGClusterPrimaryNotIdentified" - -### Update to an available Postgres version, start and upgrade PostgresCluster - -* 12--start-and-update-version: update the Postgres version on both CRD instances and set 'shutdown' to false -* 12-assert: verify that the cluster is running and the PGUpgrade instance now has the new status info with reason: "PGClusterNotShutdown" -* 13--shutdown-cluster: set spec.shutdown to 'true' -* 13-assert: check that the PGUpgrade instance has the expected reason: "PGClusterMissingRequiredAnnotation" -* 14--annotate-cluster: set the required annotation -* 14-assert: verify that the upgrade succeeded and the new Postgres version shows in the cluster's status -* 15--start-cluster: set the new Postgres version and spec.shutdown to 'false' - -### Verify upgraded PostgresCluster - -* 15-assert: verify that the cluster is running -* 16-check-pgbackrest: check that the pgbackrest setup has successfully completed -* 17--check-version: check the version reported by PostgreSQL -* 17-assert: assert the Job from the previous step succeeded - -