Skip to content

Upgrading postgrescluster apiVersion to v1 deletes postgresclusters (pgo 5 to 6) #4473

@artemis-mike

Description

@artemis-mike

Overview

I upgraded the pgo from helm chart 5.8.7 to 6.0.1 (with the operator image tag from ubi9-5.8.4-0 to ubi9-6.0.1-0).

After applying the CRDs, I also upgraded the apiVersion of my postgrescluster resources, as recommended in https://access.crunchydata.com/documentation/postgres-operator/latest/upgrade/postgrescluster-api and applied this via helm.

apiVersion: postgres-operator.crunchydata.com/v1beta1 ->
apiVersion: postgres-operator.crunchydata.com/v1

This results in

  • The postgrescluster resource is updated by helmfile
  • The pod starts up and gets healthy
  • The operator deletes the postgrescluster
`time="2026-04-27T16:14:37Z" level=debug msg=deleting PostgresCluster=<REDACTED>/postgres-<REDACTED> controller=postgrescluster controllerGroup=postgres-operator.crunchydata.com controllerKind=PostgresCluster name=postgres-<REDACTED> namespace=<REDACTED> reconcileID=2c8cc229-fffd-4b77-86ce-d058ee99a5a5 result="{Requeue:false RequeueAfter:0s Priority:<nil>}" version=6.0.1-0`

Environment

Please provide the following details:

  • Platform: Kubernetes
  • Platform Version: v1.34.6+rke2r3
  • PGO Image Tag: ubi9-6.0.1-0
  • Postgres Version: 15
  • Storage: irrelevant

Steps to Reproduce

REPRO

Provide steps to get to the error condition:

  1. upgrade pgo helm chart
  2. apply new CRDs
  3. change apiVersion from v1beta1 to v1 on postgrescluster resource
  4. pgo deletes postgrescluster
  5. sadness

EXPECTED

  1. no deleted postgrescluster

ACTUAL

  1. postgrescluster is gone

Logs

See above

Additional Information

Please provide any additional information that may be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions