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

go package for validate a values.yaml from a values.schema.json #13074

Open
HenryGuo1019 opened this issue May 29, 2024 · 1 comment
Open

go package for validate a values.yaml from a values.schema.json #13074

HenryGuo1019 opened this issue May 29, 2024 · 1 comment

Comments

@HenryGuo1019
Copy link

Hi, there is a demand in my scenes that need to validate a values.yaml content from a values.schema.json content . Is there any tools function can make it , thanks a lot!

@banjoh
Copy link
Contributor

banjoh commented May 29, 2024

Are you referring to validating a values.yaml file against values.schema.json file in code (using helm SDK) or using helm CLI?

If you have a values.schema.json file in your chart, validation takes place whenever you run install, upgrade, package and lint commands as documented https://helm.sh/docs/topics/charts/#schema-files

For the SDK, you could try using https://pkg.go.dev/helm.sh/helm/v3@v3.15.1/pkg/chartutil#ValidateAgainstSchema or https://pkg.go.dev/helm.sh/helm/v3@v3.15.1/pkg/chartutil#ValidateAgainstSingleSchema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants