aws-eks: HelmChart values discards null values
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
Given a Helmchart config where values if configured like this:
```
opentelemetry_collector_helm_chart = eks.HelmChart(
scope,
'opentelemetryCollectorHelmChart',
cluster=cluster,
chart='opentelemetry-collector',
repository='https://open-telemetry.github.io/opentelemetry-helm-charts',
release='opentelemetry-collector',
namespace='telemetry',
values={
'thing': None,
'thing2': 'exists'
},
)
```
the generated cloudformation template seems to completely discard any elements with a `None`/null value. These are important as they allow disabling default-enabled items in some helm charts.
### Expected Behavior
All items including those with a null value should be carried over into the resulting helm chart values
Values json in cloudformation template should read:
```
Values: '{"thing": null, "thing2":"exists"}'
```
### Current Behavior
elements with null values are discarded, snippet from `cdk synth`, generated from example code:
```
Release: opentelemetry-collector
Chart: opentelemetry-collector
Values: '{"thing2":"exists"}'
```
### Reproduction Steps
See bug description
### Possible Solution
_No response_
### Additional Information/Context
Since HelmChart is a custom resource, it's not possible for users to use the normal "escape hatch" methods to get around the bug - those methods aren't available on the object it seems.
### CDK CLI Version
2.127.0
### Framework Version
2.139.0
### Node.js Version
v20.12.2
### OS
Ubuntu 23.1
### Language
Python
### Language Version
Python 3.11
### Other information
_No response_
Contributor guide
Research direction
Start at the aws-eks HelmChart entry point and inspect how its values become the synthesized CloudFormation template. Re-run the Python reproduction with cdk synth and confirm that null and non-null keys both appear in Values, including the expected JSON shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, helm, python, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100