Why is it that anytime I use a helm chart I get `[...
# general
c
Why is it that anytime I use a helm chart I get
[Can't preview] all chart values must be known ahead of time to generate an accurate preview.
during preview?
c
changing the chart values could change which resources get created and which don’t
c
Right. But shouldn’t pulumi run the template and see the result?
c
it can’t run it if you provide computed values
or really any references to any resources’s properties
you can’t know those before you run the actual update.
c
It really renders preview 100% useless for helm charts which is a big issue.
c
I agree.
cc @gorgeous-egg-16927 @microscopic-florist-22719
c
In this particular case, I really can’t trust the helm chart as it is, because I believe it’ll cause an issue due to istio. So without the preview, I have to kind of risk it and hope for the best.
c
a not-great solution is to render the charts ahead of time, or not use any references to the actual properties of other resources
c
I think that any of the values it would use wouldn’t have an impact on how the chart behaves. Unless you do something like
someResource.someValue == 'something' ? 'value' : 'value2'
, but I’m sure that’s more rare than this.
But this goes back to my original thought that preview should have the final values always.
up
should just execute on the values shown in preview.
Whereas they seem to be separate systems and redo a lot of the same calculations.
m
They are separate systems. A preview can’t always generate final values, as many values are not known until resource operations are actually performed. We are working at making previews as accurate as possible, and we also have some work in the pipeline that would allow the operations performed by an update to be constrained by those proposed by a preview.
c
I get what you are saying. Wasn’t thinking about some scenarios. In most of ours where we run into this issue, they are generally known I think, or easy to figure out.
Just seems like preview has become less and less useful to the point where it’s rarely useful these days.
w
I've seen this when I was doing something as simple as passing a namespace resource output into the helm chart namespace parameter. I ended up having to use a constant.
s
Just seems like preview has become less and less useful to the point where it’s rarely useful these days.
I can second this regarding Helm charts. Even if I’ve just stumbled upon the simple
helm.v2.Chart("a",{namespace: namespace.metadata.name})
issue (discussed 1 month ago (with simple workaround)): https://pulumi-community.slack.com/archives/C84L4E3N1/p1569390114279400