This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
fix: dereference jsonschema from a template #66
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
Relocates
values.schema.json
tovalues.schema.tmpl.json
. This file can be templated by Jinja2 and can contain$ref
s. This file is later processed bypre-commit
: it renders the template and unpacks the references.Existing or Associated Issue(s)
Resolves: #64
Workaround for: https://issues.redhat.com/browse/ODC-7324 (won't be fixed in OCP)
Additional Information
I chose to write this small action in Python since it's native to pre-commit (therefore we're not introducing new stack, instead reusing what's available). It's easy to automate this through pre-commit to ensure our
values.schema.json
always matchesvalues.schema.tmpl.json
recipe. And also it also a very short script compared to golang or js. I know we're introducing a different templating language than used in Helm or helm-docs, it's unfortunate.You can verify this change by installing this chart from a custom repository:
Checklist
Chart.yaml
according to semver.values.yaml
and added to the README.md. The helm-docs utility can be used to generate the necessary content. Usehelm-docs --dry-run
to preview the content.ct lint
command.