Skip to content

Fix rad upgrade kubernetes to preserve existing Helm release values#6

Merged
nicolejms merged 18 commits intomainfrom
copilot/fix-issue-11218
Mar 3, 2026
Merged

Fix rad upgrade kubernetes to preserve existing Helm release values#6
nicolejms merged 18 commits intomainfrom
copilot/fix-issue-11218

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 11, 2026

Description

rad upgrade kubernetes was silently resetting non-default Helm values (e.g., global.azureWorkloadIdentity.enabled, database.enabled, custom registries) to chart defaults. Values set during install via --set were lost unless explicitly repeated on every upgrade.

Changes

Core fix (pkg/cli/helm/helmclient.go):

  • Set upgradeClient.ReuseValues = true in RunHelmUpgrade()
  • Values now merge: existing release values → chart defaults → CLI --set overrides

Test coverage (pkg/cli/helm/helmclient_test.go):

  • Integration test validates value preservation using Helm's in-memory storage
  • Tests specific scenario from issue: existing azureWorkloadIdentity.enabled=true preserved while applying new imageTag

Documentation (pkg/cli/cmd/upgrade/kubernetes/kubernetes.go):

  • Updated command help to clarify value preservation behavior

Example

Before:

rad install kubernetes --set global.azureWorkloadIdentity.enabled=true
rad upgrade kubernetes
# azureWorkloadIdentity silently disabled ❌

After:

rad install kubernetes --set global.azureWorkloadIdentity.enabled=true
rad upgrade kubernetes
# azureWorkloadIdentity preserved ✅

rad upgrade kubernetes --set global.imageTag=0.48
# azureWorkloadIdentity still enabled, imageTag updated ✅

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 13 commits December 12, 2025 21:44
- Changed pkg/cli/helm/cluster.go line 598 to use LastDeployed instead of FirstDeployed
- Updated Test_Helm_GetRadiusRevisions_Success to use different timestamps for different revisions
- Added comprehensive test Test_Helm_GetRadiusRevisions_MultipleUpgradesWithDifferentTimestamps
- All tests pass successfully

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
…utput

Fix revision timestamps in `rad rollback kubernetes --list-revisions` to show the list of all install times per version.
Copilot AI and others added 3 commits February 11, 2026 06:41
Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate and fix issue 11218 Fix rad upgrade kubernetes to preserve existing Helm release values Feb 11, 2026
Copilot AI requested a review from nicolejms February 11, 2026 06:47
…lues

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Copilot AI temporarily deployed to external-contributor-approval March 2, 2026 19:32 Inactive
@nicolejms nicolejms marked this pull request as ready for review March 2, 2026 19:32
Copilot AI deployed to publish-bicep March 2, 2026 19:32 Active
@nicolejms nicolejms deployed to external-contributor-approval March 3, 2026 18:42 — with GitHub Actions Active
@nicolejms nicolejms merged commit 2f4f956 into main Mar 3, 2026
29 of 40 checks passed
nicolejms pushed a commit that referenced this pull request Mar 25, 2026
* Initial plan

* Fix: Use LastDeployed instead of FirstDeployed for revision timestamps

- Changed pkg/cli/helm/cluster.go line 598 to use LastDeployed instead of FirstDeployed
- Updated Test_Helm_GetRadiusRevisions_Success to use different timestamps for different revisions
- Added comprehensive test Test_Helm_GetRadiusRevisions_MultipleUpgradesWithDifferentTimestamps
- All tests pass successfully

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>

* Merge pull request #2 from nicolejms/copilot/fix-revision-timestamp-output

Fix revision timestamps in `rad rollback kubernetes --list-revisions` to show the list of all install times per version.

* Merge branch 'main' into main

* Merge branch 'main' into main

* Merge branch 'radius-project:main' into main

* Merge branch 'radius-project:main' into main

* Merge branch 'radius-project:main' into main

* Merge branch 'radius-project:main' into main

* Merge branch 'radius-project:main' into main

* new agent to investigate issues

* Merge branch 'main' of https://github.com/nicolejms/radius

* Initial plan

* Add ReuseValues flag to Helm upgrade to preserve existing values

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>

* Add test and documentation for value preservation in upgrades

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>

* Address code review feedback with expanded test documentation

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>

* Add integration test to verify ReuseValues preserves existing Helm values

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>

* Merge remote-tracking branch 'origin/main' into copilot/fix-issue-11218
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