Skip to content

docs: warn that helm upgrade keeps pinned image tags - #497

Open
hossain-rayhan wants to merge 2 commits into
documentdb:mainfrom
hossain-rayhan:rayhan/docs-upgrade-reset-values
Open

hossain-rayhan wants to merge 2 commits into
documentdb:mainfrom
hossain-rayhan:rayhan/docs-upgrade-reset-values

Conversation

@hossain-rayhan

Copy link
Copy Markdown
Collaborator

Summary

While upgrading an Azure Local (AKS Arc) cluster to operator 1.1.0, helm upgrade documentdb-operator oci://ghcr.io/documentdb/documentdb-operator --version 1.1.0 reported documentdb-operator-1.1.0 … deployed, but the operator and sidecar kept running the previously pinned 0.2.0-test images. With no new values passed, Helm reuses the previous release's values, and the original install had set image.documentdbk8soperator.tag and image.sidecarinjector.tag. Re-running with --reset-values deployed the 1.1.0 images. Any user who pinned image tags at install time hits the same thing, and the upgrade guide's verification step didn't catch it.

Changes

  • docs/operator-public-documentation/preview/operations/upgrades.md:
    • Step 4: a warning explaining that pinned image values are kept, with a --reset-values example, a reminder to pass required settings again (for example image.registry), and helm get values to inspect current overrides.
    • Step 5: check that the operator and sidecar deployments actually run the new version's images.
  • CHANGELOG.md: the [1.1.0] date becomes the actual release date, 2026-11-04 (it said 2026-11-17).

Testing

  • mkdocs build: no warnings.
  • The verification commands are the ones used during the Azure Local upgrade; they showed operator:0.2.0-test before --reset-values and operator:1.1.0 / sidecar:1.1.0 after.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 20:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the Helm upgrade guidance and release-date correction.

No open issues 🎉

What changed in this PR

Clarifies Helm upgrade behavior so users can avoid retaining pinned operator and sidecar images when upgrading to a new chart version.

Changes:

  • Documents --reset-values, reapplying required settings, and inspecting existing overrides.
  • Adds commands to verify operator and sidecar deployment image versions.
  • Corrects the 1.1.0 release date to November 4, 2026.
File Description
docs/​operator-public-documentation/​preview/​operations/​upgrades.md Adds pinned-image warnings, reset guidance, and image verification commands.
CHANGELOG.md Corrects the 1.1.0 release date.

Review effort: Balanced

@documentdb-triage-tool documentdb-triage-tool Bot added the documentation Improvements or additions to documentation label Nov 5, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: documentation
Project fields suggested: Component docs · Priority P2 · Effort M · Status Needs Review
Confidence: 0.90 (mixed)

Reasoning

component from path globs (docs); effort from diff stats (20+1 LOC, 2 files); LLM: Adds a targeted warning and verification step to the upgrade guide to prevent silent image-tag pinning issues during helm upgrade, plus a minor CHANGELOG date fix.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

@xgerman xgerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Authoring suggestions for the upgrade guide (non-blocking; items below concern existing page content rather than changes introduced by this PR):

  1. Shell-safe placeholder (line 44): Replace TARGET_VERSION=<release-version> with TARGET_VERSION="<release-version>"; the current angle brackets are shell redirection syntax. Clarify whether the value is a Helm chart version or Git release tag, since the guide uses it for both.

  2. Qualify rollback guarantees (line 150): Replace the unconditional binary rollback statement with: ‘Yes, provided the target binary supports the current schema and meets the operator’s version constraints.’

  3. Identify partial manifests (line 186): Add: ‘Update these fields in your existing manifest. Keep all other required configuration unchanged.’ This avoids implying that the abbreviated YAML examples are complete cluster manifests.

  4. Qualify the rolling safety gap (line 253): Replace ‘permanent rollback window’ with: ‘This pattern preserves a rollback option to the previous binary only when that binary supports the resulting schema. Confirm compatibility in the release notes before each upgrade.’

  5. Show image override removal (line 330): The 1.0 upgrade instructions say to remove explicit image overrides, but the example patch does not remove them. Include a separate merge-patch example setting spec.image.documentDB and spec.image.gateway to null, for clusters that use those overrides.

One additional suggestion on the new verification commands is attached inline. These are documentation suggestions, not a runtime-validation verdict; no deployment tests were run.

kubectl get deployment documentdb-operator -n documentdb-operator \
-o jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'
kubectl get deployment sidecar-injector -n cnpg-system \
-o jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking — define verification success. These commands print the configured images, but do not establish that the rollout completed or the running cluster is healthy. Add the expected outcomes: operator and sidecar deployments are available, image tags match the intended release, cluster instances recover, and application read/write checks pass. Including kubectl rollout status for these deployments would make the deployment check actionable.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done in 2c1a99c. Step 5 now runs kubectl rollout status for the operator and sidecar-injector Deployments, checks their images, lists kubectl get documentdb -A, and states the success criteria: both rollouts report successfully rolled out, both images end in :${TARGET_VERSION} (with a pointer to the pinned-tags warning if not), every cluster reports Cluster in healthy state, no repeated operator errors, and an application read/write through the gateway works. I ran these commands on a kind cluster to confirm the output matches the wording.

hossain-rayhan and others added 2 commits November 16, 2026 10:19
`helm upgrade` without new values reuses the previous release's values, so
an install that pinned image.documentdbk8soperator.tag or
image.sidecarinjector.tag keeps running the old operator after upgrading the
chart. Found while upgrading an Azure Local cluster to 1.1.0. Document
--reset-values and `helm get values`, and verify the running operator and
sidecar images after the upgrade. Also correct the 1.1.0 CHANGELOG date to
the actual release date (2026-11-04).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6c85cd4b-f086-46f7-8823-7e63c33e4de7
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
- Step 5: wait with kubectl rollout status and list the success
  criteria (rollouts complete, images match TARGET_VERSION, clusters
  healthy, no repeated operator errors, application read/write works).
- Quote the TARGET_VERSION placeholder and explain that the chart
  version and release tag are the same value.
- Qualify binary rollback: only to a version >= status.schemaVersion.
- Say the walkthrough YAML shows only the fields to change.
- Replace "permanent rollback window" with a compatibility caveat.
- Show the merge patch that removes spec.image overrides when moving a
  0.x cluster to 1.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
@hossain-rayhan
hossain-rayhan force-pushed the rayhan/docs-upgrade-reset-values branch from 7e27619 to 2c1a99c Compare November 16, 2026 18:25
@hossain-rayhan

Copy link
Copy Markdown
Collaborator Author

Thanks @xgerman. I rebased on main (the page moved from preview/ to v1/ in #486, which caused the conflict) and addressed all of your suggestions in 2c1a99c:

  1. Placeholder: TARGET_VERSION="<release-version>" is now quoted, and the comment explains it's the chart version, which is also the release tag (no v prefix), so it selects the CRDs in Step 3 too.
  2. Binary rollback: the table now says "Yes, provided the target binary supports the current schema (it must be ≥ status.schemaVersion)", linking to Rollback and Recovery. I also qualified the "Why two fields?" note, which said the binary "can be swapped freely".
  3. Partial manifests: the walkthrough says the YAML shows only the fields to change and to keep all other configuration.
  4. Rolling safety gap: replaced "permanent rollback window" with your caveat and a pointer to confirm compatibility in the release notes.
  5. Image override removal: added a separate merge patch, {"spec":{"documentDBVersion":"1.0.0","image":{"documentDB":null,"gateway":null}}}.

Testing: mkdocs build --strict passes and every in-page anchor resolves. On kind (Kubernetes 1.35, chart 1.1.1), the item 5 patch on a cluster with explicit 0.117.0 image overrides removed them, rolled both images to 1.0.0, and the cluster stayed healthy. The Step 5 commands produced the output the success criteria describe.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants