docs: Add values.schema.json and NOTES.txt - #1013
Conversation
5a4d910 to
3e3d9e8
Compare
There was a problem hiding this comment.
LGTM, but one thing was caught when I had Claude review this:
Helm injects
globalinto every subchart's values before validating them against the subchart's schema. It does this unconditionally, even when the parent chart defines no globals at all, so wrapping this chart in any umbrella chart now fails.
global is blocked in our Chart because of additionalProperties: false at the root level.
Suggested fix:
"global": {
"title": "Global values",
"description": "Values shared with parent and sibling charts when this chart is used as a subchart. Not read by this chart.",
"type": "object"
}
This sounds like a valid concern to me and I was able to reproduce it. Maybe some customers would like to wrap our charts. Maybe this would affect some ArgoCD deployments as well ("app of apps").
See https://helm.sh/de/docs/chart_template_guide/subcharts_and_globals/
We'd have to fix this in all our values.schema.json, I saw that at least hive-operator has one.
3e3d9e8 to
6c27390
Compare
This is mostly copied over from hive-operator since the files are not templated. Having a schema makes Helm validate values on install, upgrade, lint and template AND shows as a nice reference on ArtifactHub. One thing to note is that we include the "global" block even if it's not used by us. This is due to https://helm.sh/de/docs/chart_template_guide/subcharts_and_globals/ In short: When used as a subchart Helm injects a "global" into every subchart. If we don't declare it validation will fail when used as a subchart. This also documents all used values in values.yaml itself and adds a NOTES.txt which is displayed automatically after an install.
6c27390 to
7bc7aba
Compare
|
Fixed by adding the |
Ports of
This will go into each repository. Not templated on purpose.