-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle unknowns in Helm Release #2822
Conversation
4bae2da
to
a02e35e
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2822 +/- ##
==========================================
+ Coverage 24.64% 25.48% +0.84%
==========================================
Files 48 48
Lines 9710 7526 -2184
==========================================
- Hits 2393 1918 -475
+ Misses 7160 5450 -1710
- Partials 157 158 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small comments. This looks great, overall!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@pulumi/kubernetes](https://pulumi.com) ([source](https://togithub.com/pulumi/pulumi-kubernetes)) | dependencies | minor | [`4.7.1` -> `4.8.0`](https://renovatebot.com/diffs/npm/@pulumi%2fkubernetes/4.7.1/4.8.0) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>pulumi/pulumi-kubernetes (@​pulumi/kubernetes)</summary> ### [`v4.8.0`](https://togithub.com/pulumi/pulumi-kubernetes/blob/HEAD/CHANGELOG.md#480-February-22-2024) [Compare Source](https://togithub.com/pulumi/pulumi-kubernetes/compare/v4.7.1...v4.8.0) - Fix DiffConfig issue when when provider's kubeconfig is set to file path ([pulumi/pulumi-kubernetes#2771) - Fix for replacement having incorrect status messages ([pulumi/pulumi-kubernetes#2810) - Use output properties for await logic ([pulumi/pulumi-kubernetes#2790) - Support for metadata.generateName (CSA) ([pulumi/pulumi-kubernetes#2808) - Fix unmarshalling of Helm values yaml file ([pulumi/pulumi-kubernetes#2815) - Handle unknowns in Helm Release resource ([pulumi/pulumi-kubernetes#2822) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
Proposed changes
This PR improves support for preview mode in the Helm Release, specifically the handling of unknown inputs.
The specific improvements are:
Release
struct for further processing, render the unknown values asnull
. Previously,decodeRelease
would panic.Release
back to a property map, recover the unknownness of the properties.Check
, perform the roundtrip of inputs-to-Release-to-outputs in all cases. This has the effect of stabilizing the checked inputs.Diff
, detect the edge case of a property becoming a computed value.status
andresourceNames
.Some focus areas for testing:
description
.values
property.name
(i.e. the release name), which should cause replacement.Note: the handling of unknowns works best with
allowNullValues: true
.Related issues (optional)
Closes #2660
Closes #2679
Demos
Based on the following program:
With
metrics.yml
:Unknown Properties
In this case, the description (which was marked as a secret) is changing to an unknown value.
p up --replace 'urn:pulumi:dev2::issue-2660::random:index/randomString:RandomString::desc' --diff
Before:
After:
Unknown Values
p up --replace 'urn:pulumi:dev2::issue-2660::random:index/randomInteger:RandomInteger::replicas' --diff
Before:
After:
Unknown Release Name
In this case, we expect replacement because the release name is changing.
p up --replace 'urn:pulumi:dev2::issue-2660::random:index/randomString:RandomString::name' --diff
Before:
After: