Thanks <@UHTP242EB>, I am looking through that rep...
# kubernetes
q
Thanks @broad-dog-22463, I am looking through that repo. I'm trying to understand facets of deploying helm charts with Pulumi. I'd like to seperate the configuration of the helm chart from IE the provisioning program which seems to be a primary goal of most pulumi configuration. However due to differences in kubernetes yaml, I haven't yet found an ideal option. One thing I was considering was keeping the helm chart configurations in their natural form and trying to apply them with your api. However for some feature like
helm -f values.yaml name /path/to/chart
which is natural via helm, I cannot IE apply
ConfigFile
for the values argument of
LocalChartOpts
b
Maybe @gorgeous-egg-16927 will be able to give some guidance when he’s around
He’s one of our core Pulumi-Kubernetes team
q
If he could discuss maybe he can elucidate a pattern that would work well for what I'm trying to accomplish. Thanks
g
If I understand your question correctly, you can control configuration of Helm charts using the
values
field. https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3/chart/#set-chart-values You can control the values of that parameter via pulumi config settings or through logic in the program, so that should give you quite a bit of flexibility.
q
Hi @gorgeous-egg-16927, yes I can set values with the values field. However I'm wondering how I can provide the mappings easily from a source file? Can we just read a helm yaml file into a dictionary with yaml.load() , and pass this to values?
Furthermore is the behavior identical to the helm --values file.yaml /path/to/chart? IE merging with the charts built in yaml?
Otherwise I also tried loading a configuration from helm yaml into pulumi with Config.getObject, but it didn't seem to raise an exception.
g
Can we just read a helm yaml file into a dictionary with yaml.load() , and pass this to values?
Yes, I think that would work.
is the behavior identical to the helm --values file.yaml /path/to/chart? IE merging with the charts built in yaml?
Yes, those values are merged onto the default
values.yaml
file. There are a couple open issues related to helm values files: https://github.com/pulumi/pulumi-kubernetes/issues/659 https://github.com/pulumi/pulumi-kubernetes/issues/1251
q
Thanks @gorgeous-egg-16927 I'll try to see if I can make this work. Regarding some feedback, I think it might be valuable to pass through
ConfigFile
and also config loading for these helm configurations so they can be used along with other configurations.