You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
helm: inferred values types reject open maps, numeric quantities, subchart keys and commented keys #5086
Found with chant 0.124.95 while reading a clone of kubernetes/k8s.io at commit 2b3d9153 offline, for #5067.
Values types that the helm lexicon infers from a chart's values.yaml reject valid values files. Typechecking 34 values files against 13 pinned charts gave 28 errors, and 27 of them were artefacts of inference.
By cause:
Open maps typed as closed objects (4): nodeSelector.role three times, resources.limits. Maps such as nodeSelector, labels, annotations, resources.limits and resources.requests take any key.
Numbers against an inferred string (7): cpu: 1 where the chart default is "100m". Kubernetes quantities accept both.
Subchart keys (10): kube-state-metrics.metricLabelsAllowlist, grafana.persistence, grafana.service.type and others. The parent chart's values.yaml does not list them, and the subchart's does.
Keys that exist in the chart only as comments (5): oauth2-proxyconfig.existingSecret, mimir persistentVolume.storageClass.
Istio's istiod, whose whole values tree is nested under _internal_defaults_do_not_set, so global reads as unknown.
The one real error out of 28 was a key a chart version no longer reads, which is exactly what this check is for. At 1 in 28 it cannot be used on pull requests.
Wanted:
Well-known open maps and quantity fields are typed as such.
An empty object or {} default infers an open map.
Subchart values are merged in under the subchart's name or alias.
Commented-out keys in values.yaml are read as optional keys.
The _internal_defaults_do_not_set wrapper is unwrapped for Istio charts, or there is a general way to name a values root.
Where a chart ships values.schema.json, that still wins.
Activity
fix(helm): values-check takes TypeScript through chant's re-export (#…
feat: estate-read batch 3, Terraform and k8s lint precision, Helm ren…