This change is about handling the interfaces to public functions for
different chart apiVersions. The internals are still focused on v2.
This enables v3 to be layered in layer.
Signed-off-by: Matt Farina <matt.farina@suse.com>
When --skip-schema-validation is enabled, the lint command will now skip
JSON schema validation for values.yaml files, allowing charts with schema
validation errors to pass linting when the flag is used.
This addresses the gap where --skip-schema-validation only applied to
templates but not to values files, providing complete schema validation
bypass when needed.
Fixes: #13413
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
Linting is specific to the chart versions. A v2 and v3 chart will
lint differently.
To accomplish this, packages like engine need to be able to handle
different chart versions. This was accomplished by some changes:
1. The introduction of a Charter interface for charts
2. The ChartAccessor which is able to accept a chart and then
provide access to its data via an interface. There is an
interface, factory, and implementation for each version of
chart.
3. Common packages were moved to a common and util packages.
Due to some package loops, there are 2 packages which may
get some consolidation in the future.
The new interfaces provide the foundation to move the actions
and cmd packages to be able to handle multiple apiVersions of
charts.
Signed-off-by: Matt Farina <matt.farina@suse.com>
Closes: https://github.com/helm/helm/pull/30907
To be able to upgrade to v6.0.2 for jsonschema lib we need to upgrade
this test.
I am wondering if it's related to this commit:
86cca28795
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
This reverts #13533
This change has caused issues with numerous charts around things
unrelated to toml. This is because of functions like typeIs/typeOf
being used and acted upon.
The change caused a significant regression.
Note: This kind of change can be put into v3 charts, that are in
active development, without causing a regression.
Closes#30880
Signed-off-by: Matt Farina <matt@mattfarina.com>
imported values are stored in dependency objects, which breaks if a chart dependency is shared among multiple aliases.
By copying the dependency objects in the metadata values can be imported correctly.
Supersedes #10174
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
Dependencies keep a reference on their parent chart, which breaks if a chart reference is shared among multiple aliases.
By copying the dependencies, parent information can be set correctly to render the templates as expected later on.
Note that this change will make ChartFullPath return a different path for sub-subcharts. It will contain the alias names instead of the path to the chart files which makes it consistent with paths to templates on the subchart level.
Closes#9150
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
When "helm lint" is run, it now errors on invalid chartfiles,
e.g. those with duplicate keys
Closes#12381
Signed-off-by: Edward Miller <edmiller287@gmail.com>
A new library was introduced that provides JSON Schema checking for
newer versions of the schema. In Helm v4, there is no need to have
two packages doing the JSON schema validation. The message output
can have breaking changes.
This change moves everything to the newer library. It also uses a
wrapper error to enable a clean Helm only interface for the
public Go API validation functions. This would enable the replacement
of the Schema validation library, if needed, without breaking the
Go API contract.
Signed-off-by: Matt Farina <matt.farina@suse.com>