diff --git a/hips/hip-9999.md b/hips/hip-9999.md new file mode 100644 index 00000000..a32783ac --- /dev/null +++ b/hips/hip-9999.md @@ -0,0 +1,64 @@ +--- +hip: 9999 +title: "Default to strict `Chart.yaml` loading" +authors: [ "George Jenkins " ] +created: "2024-11-18" +type: "feature" +status: "draft" +--- + +## Abstract + +Helm should default to using strict-mode yaml loading for loading charts ie. `yaml.UnmarshalStrict(..)` rather than `yaml.Unmarshal(..)`. + + +## Motivation + +Currently Helm loads chart's Chart.yaml in "non-strict" yaml loading mode. +The main consequence of this behavior is that Helm ignores unknown and duplicate fields in `Chart.yaml`. +Either unknown to the present version of Helm, or simply typos. +In that the behavior the user expects from Helm as described by unknown fields is effectively ignored. +Presenting a confusing experience to the user. + + +## Rationale + +Also see: [HIP-9999][hip-9999] ("Forward compatibility: `Chart.yaml` `minimumHelmVersion`"), for a complementary HIP that allows further tightening of Helm's forward compatibility behavior. + + +## Specification + +Helm will default to using strict-mode yaml loading for loading charts ie. ie. `yaml.UnmarshalStrict(..)` rather than `yaml.Unmarshal(..)`. + +The CLI/SDK will contain an option to allow non-strict loading. +This is to allow users to continue to utilize charts that are malformed. + + +## Backwards compatibility + +Helm 4 allows breaking behavioral changes. +However it is a core premise that Helm 4 will remain compatibility with existing chart. +Moving to strict mode for loading yaml will prevent charts from being loaded that contain unknown/invalid fields. +Requiring a command line flag / SDK option allows fallback compatibility if required. + +## Security implications + +N/A + + +## How to teach this + +Update `Chart.yaml` docs + + +## Reference implementation + +See PR links in [References] + + +## References + +- \[chart/loader\] use strict yaml unmarshaling for chart files +- fix(pkg/lint): unmarshals Chart.yaml strictly + +[hip-9999]: ./hip-9999.md \ No newline at end of file