Skip to content

Enable CNPG in-place updates and add operator upgrade test in CI workflow#272

Open
WentingWu666666 wants to merge 7 commits intodocumentdb:mainfrom
WentingWu666666:users/wentingwu/enable-instance-manager-inplace-updates
Open

Enable CNPG in-place updates and add operator upgrade test in CI workflow#272
WentingWu666666 wants to merge 7 commits intodocumentdb:mainfrom
WentingWu666666:users/wentingwu/enable-instance-manager-inplace-updates

Conversation

@WentingWu666666
Copy link
Collaborator

@WentingWu666666 WentingWu666666 commented Feb 26, 2026

  • Set ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES=true in cloudnative-pg Helm values to enable instance manager in-place updates
  • Add operator upgrade test in CI workflow

@WentingWu666666 WentingWu666666 marked this pull request as ready for review February 26, 2026 19:53
Copilot AI review requested due to automatic review settings February 26, 2026 19:53
@WentingWu666666 WentingWu666666 changed the title feat: enable CNPG in-place updates and add CI verification step Enable CNPG in-place updates and add CI verification step Feb 26, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables CNPG (CloudNative-PG) instance manager in-place updates by setting the ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES environment variable to true in the CNPG operator deployment. This is accomplished by adding the environment variable to the Helm chart values, and includes a CI verification step to ensure the configuration is correctly propagated.

Changes:

  • Configure CNPG operator to enable instance manager in-place updates via Helm values
  • Add CI verification step to validate the environment variable is correctly set in the deployed CNPG operator

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
operator/documentdb-helm-chart/values.yaml Adds additionalEnv configuration to pass ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES=true to the CNPG operator
.github/actions/setup-test-environment/action.yml Adds verification step to confirm the environment variable is correctly set in the CNPG deployment after operator installation

- Set ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES=true in cloudnative-pg
  Helm values to enable instance manager in-place updates
- Add CI step in setup-test-environment to verify the env var is
  correctly propagated to the CNPG operator deployment

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
@WentingWu666666 WentingWu666666 force-pushed the users/wentingwu/enable-instance-manager-inplace-updates branch from 0d4e1d2 to b27f5c8 Compare February 27, 2026 14:40
- Add DOCUMENTDB_COMBINED_IMAGE env var for released operator (no ImageVolume)
- Add 'Determine initial DocumentDB image' step that checks released chart CRD
  for postgresImage field to decide between combined vs extension image
- Update setup-test-environment to use dynamically resolved DOCUMENTDB_INITIAL_IMAGE
- Fix Step 2 baseline checks to use INITIAL_IMAGE and flexible schema version check
- Fix sidecar-injector verification to query cnpg-system namespace
- Fix CRD name from db.documentdb.io to dbs.documentdb.io
- Add design docs for dual-mode deployment, rollback support, and unified upgrade

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
@WentingWu666666 WentingWu666666 force-pushed the users/wentingwu/enable-instance-manager-inplace-updates branch from bdc7888 to 8d7715e Compare February 27, 2026 15:27
Replace CRD postgresImage field check with simple semver comparison.
Versions <= 0.1.3 use combined image, versions > 0.1.3 use extension image.

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
When using a combined image with older released operator versions,
status.schemaVersion may not be populated. Remove the hard failure
and just log the value.

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
…ed combined mode

When the released operator version <= 0.1.3 deploys in combined mode,
the cluster must be recreated under the upgraded operator to switch to
ImageVolume mode before testing extension/gateway upgrades.

- Persist USE_COMBINED to GITHUB_ENV for later step branching
- Add 4 conditional steps (gated by USE_COMBINED == true):
  1. Recreate cluster: delete combined-mode CR, create fresh with extension image
  2. Setup port forwarding for re-seeding
  3. Re-seed test data (2 documents)
  4. Cleanup port forwarding
- Update DOCUMENTDB_INITIAL_IMAGE after recreation so Step 2 baseline passes
- All new steps marked with TODO: Remove once released version > 0.1.3

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

@WentingWu666666 WentingWu666666 force-pushed the users/wentingwu/enable-instance-manager-inplace-updates branch 2 times, most recently from f2974a4 to 79ea1bf Compare February 27, 2026 20:16
@WentingWu666666 WentingWu666666 changed the title Enable CNPG in-place updates and add CI verification step Enable CNPG in-place updates and add operator upgrade CI test Feb 27, 2026
@WentingWu666666 WentingWu666666 changed the title Enable CNPG in-place updates and add operator upgrade CI test Enable CNPG in-place updates and add operator upgrade test in CI workflow Feb 27, 2026
…Version validation

Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
@WentingWu666666 WentingWu666666 force-pushed the users/wentingwu/enable-instance-manager-inplace-updates branch from 79ea1bf to 1c65ed9 Compare February 27, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants