Enable CNPG in-place updates and add operator upgrade test in CI workflow#272
Open
WentingWu666666 wants to merge 7 commits intodocumentdb:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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>
0d4e1d2 to
b27f5c8
Compare
- 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>
bdc7888 to
8d7715e
Compare
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>
f2974a4 to
79ea1bf
Compare
…Version validation Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
79ea1bf to
1c65ed9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.