-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set Helm values to null in C# #3178
Comments
I think this is a duplicate of #2034 and/or #2997. The provider currently (unfortunately) ignores null values when handling inputs, which is significant for Helm values. If you're using v3 Release you can try setting allowNullValues. You might also try As a way of back porting #2997 into v4 we could look into opt-in configuration to change the provider's behavior to respect nulls, but this is not a small change. |
Thanks for the feedback. I tried allowNullValues but unfortunately it does not help in this case. It only has an effect on value lists but not on dictionary type values. Currently, I'm using Release v3 but I might give Chart v4 a try or manage this chart using the Helm CLI. |
@mkuennek give |
In v3, we could use null on values to remove default values. However, when migrating to v4, this no longer works, and null no longer has any effect. |
Unfortunately not. I tried a Otel-collector values file like this: mode: deployment
image:
repository: otel/opentelemetry-collector-contrib
config:
receivers:
jaeger: {}
prometheus: {}
zipkin: {}
service:
pipelines:
logs: {}
metrics: {}
traces:
receivers:
- otlp
exporters:
- debug
ports:
jaeger-compact:
enabled: false
jaeger-thrift:
enabled: false
jaeger-grpc:
enabled: false
zipkin:
enabled: false The logs and metrics pipelines were still being created. |
What happened?
I'm trying to install the OpenTelemetry collector using its Helm Chart. The chart's default values setup all three data processing pipelines(logs, traces and metrics). I only want to use traces. When installing this chart using the Helm CLI, I can achieve this by setting null values, e.g.
When using the same values file as a FileAsset, setting it using Release.ValueYamlFiles null values are ignored.
I tried to do the same without the yaml and only using C# without any success. How can I achieve this behaviour with Pulumi?
Example
For a reproduction, see https://github.com/mkuennek/PulumiHelm.
Output of
pulumi about
❯ pulumi about
running 'dotnet build -nologo .'
Determining projects to restore...
All projects are up-to-date for restore.
PulumiHelm -> /Users/mkuenneke/Sources/Github/PulumiHelm/bin/Debug/net8.0/PulumiHelm.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.59
'dotnet build -nologo .' completed successfully
Enter your passphrase to unlock config/secrets
(set PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE to remember):
Enter your passphrase to unlock config/secrets
CLI
Version 3.129.0
Go Version go1.22.6
Go Compiler gc
Plugins
KIND NAME VERSION
language dotnet unknown
resource kubernetes 4.17.1
Host
OS darwin
Version 14.6.1
Arch arm64
This project is written in dotnet: executable='/opt/homebrew/bin/dotnet' version='8.0.401'
Current Stack: organization/PulumiHelm/dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::PulumiHelm::pulumi:pulumi:Stack::PulumiHelm-dev
pulumi:providers:kubernetes urn:pulumi:dev::PulumiHelm::pulumi:providers:kubernetes::default_4_17_1
kubernetes:helm.sh/v3:Release urn:pulumi:dev::PulumiHelm::kubernetes:helm.sh/v3:Release::otel-collector
Found no pending operations associated with dev
Backend
Name Michaels-MBP-2.localdomain
URL file://~
User mkuenneke
Organizations
Token type personal
Dependencies:
NAME VERSION
Pulumi 3.66.1
Pulumi.Kubernetes 4.17.1
Pulumi locates its logs in /var/folders/v0/cm8hmktx2rvb639v96scp0lw0000gn/T/ by default
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: