How can you pass overrides of the `values.yaml` in...
# general
n
How can you pass overrides of the
values.yaml
in a Helm chart release? It only seems to take
Dictionary<string, object>
.
c
there's examples here https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3/chart/#set-chart-values basically use the same structure the chart takes in its values.yaml
n
There it creates a new Dictionary inline. I have a yaml file with the overrides standing ready that I used to pass to the helm cli, that I want to use. I don't want to re-code every helm configuration I've ever written again.
b
you have the full capability of your programming language (I think you're using dotnet?) - so you can read the YAML file from the disk if needed and then encode it into a variable.
n
Reading the docs, I got dragged into
Func<ImmutableDictionary<string, object>
and transformation etc...is there no real helper class that can easily do that?
Yes, I'm using dotnet
b
I'm not the most familiar with dotnet I'm afraid, but we don't have a helper class available to do it. There may be third party libraries out there that do it, this looks reasonably promising: https://github.com/aaubry/YamlDotNet/issues/332
n
Tnx for the hint, but unfortunately there seems to be no easy way to convert it into the format that Pulumi expects it. The docs mention something about multiple files, but no example on how that should work unfortunately.
I found this, but not a satisfactory answer unfortunately: https://github.com/pulumi/pulumi-kubernetes/issues/659
I just took a look at the implementation of Helm charts and this is a real deal breaker for me. My use-case really depends on helm being installed as helm releases, not just the templated version of it. With the current implementation, pulumi is just not a viable option. I'll stick to terraform to deploy to our clusters. I was hoping it would just use the real helm cli underneath and I could code the execution of it.
👍 1
c
yup there is an open ticket to support helm releases https://github.com/pulumi/pulumi-kubernetes/issues/1092