How to set null config values in helm charts via pulumi

Viewed 58

I'm trying to configure a helm chart via pulumi and golang. According to the helm chart documentation default components can be removed by setting the config to null. I managed to set the desired config values for the helm chart in my pulumi script, but it's not possible to set config values to null.

_, err := s.NewChartRelease(otelCollectorChart, namespace.Metadata.Elem().Name(), pulumi.Map{
        "fullnameOverride": pulumi.String("otel-collector"),
        "mode":             pulumi.String("deployment"),
        "config": pulumi.Map{
            "receivers": pulumi.Map{
                "prometheus": nil,
            }}})

In this scenario I want to set the prometheus config to null but when this chart is deployed the default values for prometheus are set. I have also tried "prometheus": pulumi.Any(nil), but this also does not change the config.

0 Answers
Related