-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: values.schema.json to support air-gapped environments #141
Conversation
Can we merge this? |
@vinzscam @sabre1041 can I get a review here please? |
Nice workaround 😄 Other downsides I see of using this approach are:
|
@vinzscam sure thing. will review today |
@vinzscam Understand the concern related to size of the schema. an alternative approach is to source references from a relative files to reduce the overall size of the primary schema file |
Oh, I think it does work recursively. I've used a similar approach in our RH derived chart and it resolves this chart's schema refs as well..
Oh, 1MB? Where do you see that, @vinzscam ? The resulting (dereferenced)
Good point. While I don't find it very likely - especially in the case of kubernetes schema references. It can be true for the In our derived chart we use similar solution which locks subchart's remote references to the exact version found in https://github.com/janus-idp/helm-backstage/blob/main/.pre-commit/jsonschema-dereference.py Would that be a better solution @vinzscam? 🙂 |
I see, nice! I was just worried whether there might be some corner cases which aren't covered by the script, which might add more work on our side. But the same approach is already battle tested in your subchart I'm fine with that.
Curious to hear your thoughts 😄 |
Could we merge this as-is, and open a followup issue for future enhancements? Or are we waiting to enhance this before merging it? |
@vinzscam I would rather avoid publishing a special air-gapped version of the chart. 🙂 Relaxing the schema is a step backward in my eyes, a complete schema is a better guide to the user than a flexible one which "works" but can lead to improper configurations. Do you think I should change anything in this PR? Do you think this implementation should cause any trouble to the chart users? |
yeah good point
nope, let's 🚀 |
6b9f905
to
6219fa9
Compare
Signed-off-by: Tomas Coufal <tcoufal@redhat.com>
I've added I would prefer to leave the generated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description of the change
Air-gapped environments should be supported. The only blocker we had here were remote references in
values.schema.json
. While these remote references reduce maintenance and repetition on our side, it requires helm to query for those references when processing values file.Therefore to keep the benefits of remote references and allow consumers to install in air-gapped environment, I've added a small pre-commit script allowing us to treat the
values.schema.json
with remote references as a kind of template. I've moved our currentvalues.schema.json
tovalues.schema.tmpl.json
. This template is dereferenced via pre-commit and the resulting schema with expanded references is stored asvalues.schema.json
. This schema is then understood by Helm and can be used in air-gapped environments.Existing or Associated Issue(s)
Resolves #127
Additional Information
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.