pulumi-kubernetes
pulumi-kubernetes copied to clipboard
Helm chart in custom repo not found; provider dies (instead of re-downloading it)
Hello!
- Vote on this issue by adding a 👍 reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)
Issue details
When using a Helm chart and specifying an https URL for FetchOptions.Repo
, local cache removal causes errors. The issue also affects developers with an unpopulated local cache who'd like to continue working on our Pulumi config on an already-deployed stack.
- I'm using C# on windows
- Pulumi 3.27.0
- Pulumi.Kubernetes 3.17.0
Steps to reproduce
- Create a Chart object, e.g. with
new ChartArgs()
{
Chart = "haproxy-ingress",
Namespace = "haproxy",
FetchOptions = new ChartFetchArgs()
{
Repo = "https://haproxy-ingress.github.io/charts"
},
Version = "0.13.6"
}
- Run
pulumi up
. Successful. (chart gets downloaded without user intervention) - Delete
%LOCALAPPDATA%\Temp\helm\repository
. - Run
pulumi preview
(or up or refresh)
Expected: Last pulumi command succeeds as well.
Actual: The provider fails with: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to pull chart: no cached repo found. (try 'helm repo update')
Hello, thanks for detailing your issue! Just to clarify - does the suggestion in the error help at all (try 'helm repo update')?
I'm unaware of the caching semantics in this provider; @viveklak could you advise if clearing the cache this way is expected to work as described of if there's additional local resources which should be cleared along with this cache folder?
Yes, 'helm repo update' did help.
Great! Will close as the issue was resolved
Great! Will close as the issue was resolved
I would not consider this resolved. Shouldn't the provider, exactly knowing the required step, actually call it and work without manual intervention?
I would not consider this resolved
No problem, can re-open. Appoligies for mis-understanding the issue here.
So, to ensure I understand the issue correctly as I wasn't clear as to why you'd want to delete the cache folder...
- Deploy the project once
- Checkout the project on a clean machine (e.g. a CI server)
- Run
pulumi preview
- It fails because the helm chart has not been downloaded.
Does this summarise the issue?
Thank you.
Yes, this is one main use case. The other developer's machine might not even have the helm
cli installed on their system, requiring one more step from them.
Another case is e.g. if the Temp directory gets cleaned up as part of routine system maintenance.