pulumi / pulumi-kubernetes

A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters
https://www.pulumi.com/docs/reference/clouds/kubernetes/
Apache License 2.0
406 stars 115 forks source link

Fix: Chart v4 fails on update #3046

Closed EronWright closed 3 months ago

EronWright commented 3 months ago

Proposed changes

This PR fixes a problem with how Chart v4 uses the Helm library. The design goal is to allow for connectivity during template rendering, to support the lookup function (see https://github.com/helm/helm/pull/9426) and to provide an accurate Capabilities object. Unfortunately we were slightly too aggressive and caused some of Helm's "non-template" code to execute.

This fix works by turning off the helm template --validation flag, so that the internal ClientOnly flag is true thus avoiding this block of code that causes the unexpected error. A side-effect of ClientOnly being true is that the capabilities aren't automatically set, and so we set them using the provider's kube client (akin to using --kube-version).

Detailed changes:

Related issues (optional)

Closes #3045

github-actions[bot] commented 3 months ago

Does the PR have any schema changes?

Looking good! No breaking changes found. No new resources/functions.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 68.18182% with 7 lines in your changes missing coverage. Please review.

Project coverage is 36.77%. Comparing base (4fddc20) to head (d96468b).

Files Patch % Lines
provider/pkg/provider/helm/v4/chart.go 68.18% 4 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3046 +/- ## ========================================== + Coverage 36.67% 36.77% +0.09% ========================================== Files 71 71 Lines 9249 9262 +13 ========================================== + Hits 3392 3406 +14 + Misses 5520 5518 -2 - Partials 337 338 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pulumi-bot commented 2 months ago

This PR has been shipped in release v4.13.1.