Skip to content

Manual upgrade procedure for Postgres Operator on OKD: Is "Uninstall/Reinstall" safe for existing clusters? #4400

@k0muc

Description

@k0muc

Hi everyone,

I am planning to upgrade our Postgres Operator on an OKD cluster. Due to specific environment constraints, I am looking for the safest manual upgrade path.

Context & Constraints:

  • Platform: OKD (OpenShift)
  • Deployment: Manual manifest management but also with OLM
    We have multiple operators running in a single namespace. We want to avoid OLM’s behavior of bundling InstallPlan updates for all operators in the same namespace, which complicates our maintenance windows.

Proposed Strategy: I am considering an "Uninstall then Reinstall" approach for the Operator itself:

  • Delete the current Operator deployment (while keeping the Custom Resources and PVCs intact).

  • Apply the new version's manifests (CRDs and Operator Deployment).

  • Let the new Operator "adopt" the existing PostgreSQL clusters.

  • Upgrade CR with new image tag
    I have the following questions regarding this procedure:

  • Safety of Running Clusters: If I delete the Operator deployment, can I be 100% certain that it won't trigger a deletion or a restart of the existing PostgreSQL instances/StatefulSets? Are there any specific "finalizers" I should be aware of?

  • CRD Compatibility: When moving between versions, if there are changes to the CRD schema, will applying the new CRD over the old one cause issues for currently running resources before the new Operator takes control?

  • OKD Specifics: Are there any known issues with Security Context Constraints (SCCs) or permissions when performing a manual re-installation on OKD that could prevent the new Operator from managing old pods?

We want to ensure that the database remains online and stable throughout the Operator's downtime. Any advice would be greatly appreciated.

Thank you!

  • Platform: OKD
  • Platform Version: 4.19
  • PGO Image Tag: 5.8.3 - upgrade to newest
  • Postgres Version: 16
  • Storage: PVC

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