https://pulumi.com logo
#kubernetes
Title
# kubernetes
c

cold-coat-35200

08/13/2021, 11:50 AM
hi, how can I unset a default object value in helm values? e.g. https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml#L189 metrics does not have an enable field, but has a default value for Prometheus, the chart handles the case when metrics are not defined, but I can't figure out how to unset in pulumi TS. Tried to set
metrics: {}
,
metrics: ''
,
metrics: null
in values, but none of them helps. Transformations did not help either, because it runs after template generation and I don't want to remove the unnecessary fields one by one.
g

gentle-diamond-70147

08/16/2021, 5:21 PM
I think a transformation is your answer here, but it means you might need to remove the fields one by one.
c

cold-coat-35200

08/16/2021, 6:09 PM
@gentle-diamond-70147 That would be a pain in the ass because used in multiple places. It would be nice to support this somehow from pulumi.
g

gentle-diamond-70147

08/16/2021, 6:38 PM
Not sure I follow in terms of "multiple places" - can you elaborate?
c

cold-coat-35200

08/16/2021, 6:52 PM
In the traefik helm chart the
.Values.metrics
condition used in multiple places, e.g.: deployment "ports" section, command-line arguments, etc. That's why I said it's hard to remove from everywhere with transformations, it's possible of course, but wouldn't be a maintainable code (e.g.: a next helm chart version adds more sections based on the same condition)
5 Views