Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip schema-validation for values in HelmChartInflationGenerator #5813

Open
2 tasks done
Argelbargel opened this issue Nov 25, 2024 · 4 comments
Open
2 tasks done
Labels
area/helm kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@Argelbargel
Copy link

Eschewed features

  • This issue is not requesting templating, unstuctured edits, build-time side-effects from args or env vars, or any other eschewed feature.

What would you like to have added?

Add a field skipSchemaValidation to the HelmChartInflationGenerator and pass it as --skip-schema-validation to helm if it's value is true

Why is this needed?

helm enforces schema validation for the values passed to a chart if the chart defines a schema for the expected values. While this feature might be practical in some use-cases it is a problem when using a helm-chart as dependency when the passed values contain properties for other dependencies or the main chart.

Thus helm added the option --skip-schema-validation (helm/helm#11510). Unfortunatly there seems to be no way to pass this flag using the HelmChartInflationGenerator

Can you accomplish the motivating task without this feature, and if so, how?

As there seems to be no way to disable helm's schema-validation globally, i see no (good/easy) way to use such charts with the HelmChartInflationGenerator otherwise.

What other solutions have you considered?

n/a

Anything else we should know?

No response

Feature ownership

  • I am interested in contributing this feature myself! 🎉
@Argelbargel Argelbargel added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 25, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Nov 25, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 23, 2025
@isarns
Copy link
Contributor

isarns commented Mar 4, 2025

I opened a PR to resolve this #5869

@koba1t
Copy link
Member

koba1t commented Mar 10, 2025

Hi @Argelbargel

In kustomize, helm is used to generate static yaml manifests from the chart and is executed cleanly each time.
To my understanding, the feature request issue in the Helm repository involves the use of -skip-schema-validation when values.schema.json changes with an upgrade of the chart version. However, the helmCharts definition in Kustomize that the chart version is explicitly defined, and it should be possible to avoid inconsistencies during upgrades.
helm/helm#10398

helm enforces schema validation for the values passed to a chart if the chart defines a schema for the expected values. While this feature might be practical in some use-cases it is a problem when using a helm-chart as dependency when the passed values contain properties for other dependencies or the main chart.

I did not fully comprehend your use case, but we recommend defining a values.yaml for each helmCharts.

/triage needs-information

@k8s-ci-robot k8s-ci-robot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 10, 2025
@Argelbargel
Copy link
Author

Hi @koba1t ,

the problem is, that the schema provided by a chart might be to strict, e.g. it might restrict the key below global to exactly the keys used by that chart. When using this chart as a dependency in concert with other charts you simply cannot use that chart.

So the use case does not concern problems when upgrading a chart without updating the values but allowing the composition of charts with schemas that are to restrictive.

One could say that this is a problem which should be reported to the maintainers of the problematic chart (or helm should ignore/prevent the restriction of e.g. the global namespace) but it's simply easier to disable the schema validation. Especially as the schema does not really provide that much value in most cases - there are just a few charts (that i know or use) for which the schema provides an alternative to reading the docs/comments in the values.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

5 participants