https://pulumi.com logo
#general
Title
# general
c

cool-egg-852

10/17/2019, 7:46 PM
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

creamy-potato-29402

10/17/2019, 7:49 PM
changing the chart values could change which resources get created and which don’t
c

cool-egg-852

10/17/2019, 7:49 PM
Right. But shouldn’t pulumi run the template and see the result?
c

creamy-potato-29402

10/17/2019, 7:50 PM
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

cool-egg-852

10/17/2019, 7:51 PM
It really renders preview 100% useless for helm charts which is a big issue.
c

creamy-potato-29402

10/17/2019, 7:51 PM
I agree.
cc @gorgeous-egg-16927 @microscopic-florist-22719
c

cool-egg-852

10/17/2019, 7:52 PM
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

creamy-potato-29402

10/17/2019, 8:21 PM
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

cool-egg-852

10/17/2019, 8:23 PM
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

microscopic-florist-22719

10/17/2019, 8:50 PM
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

cool-egg-852

10/17/2019, 10:19 PM
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

worried-city-86458

10/19/2019, 12:41 AM
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

stocky-island-3676

11/08/2019, 3:32 PM
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
2 Views