-
Notifications
You must be signed in to change notification settings - Fork 61
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
docs: add jsonschema for values.yaml #458
base: develop
Are you sure you want to change the base?
Conversation
39d7652
to
f7628e1
Compare
Codecov Report
@@ Coverage Diff @@
## develop #458 +/- ##
===========================================
- Coverage 94.40% 94.24% -0.16%
===========================================
Files 22 22
Lines 1125 1129 +4
===========================================
+ Hits 1062 1064 +2
- Misses 63 65 +2
Continue to review full report at Codecov.
|
0f44808
to
4fb231e
Compare
remaining nit: it's not really a docs change, so probably commit msg should be changed, otherwise lgtm |
@Starkteetje yeah, I was a bit torn in choosing the commit msg. Would you prefer |
b9dc10b
to
7edc099
Compare
3f4dbc7
to
220b645
Compare
Adding a jsonschema allows user to fail early as the user configuration in the is validated at installation time already. For that reason, there has been added additional validation that couldn't be performed using jsonschema in the helm helper file. Moreover, as we now have our dear conny in artifacthub we can enhance our artifacthub page by adding a jsonschema as artifacthub parses the file and shows its content in a nice format.
220b645
to
655706f
Compare
"if": { | ||
"properties": { | ||
"type": { | ||
"const": "cosign" |
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.
I have tried to violate any of the schema rules below and could not get an error for that via helm lint
. Is that expected or something off?
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.
there was sth off - thanks!! It should work now (excited for the integration tests 👯 😁)
helm/values.schema.json
Outdated
"imagePullPolicy", | ||
"resources", | ||
"nodeSelector", | ||
"tolerations", | ||
"affinity", | ||
"securityContext", | ||
"podSecurityPolicy", | ||
"envs" |
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.
are those actually required? bc I believe at least some of them can be dropped and will have some type of defaults, isn't it?
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.
but I am not sure which policy was decided upon
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.
no, you're right - these are not actually required, but we don't set any kind of default (but k8s does) and we once talked about it and decided to require these values for that reason, but rethinking it, I changed my mind and we should not require them if leaving them out does not yield a non-functional installation, what do you think?
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.
I removed the non-required values here and made the defaults explicit where I found defaults - if you don't like it I can change it back :)
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.
I do have a few comments. Most notably, none of the things I do to violate the validator schemas seems to fail
helm/values.schema.json
Outdated
"imagePullPolicy", | ||
"resources", | ||
"nodeSelector", | ||
"tolerations", | ||
"affinity", | ||
"securityContext", | ||
"podSecurityPolicy", | ||
"envs" |
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.
but I am not sure which policy was decided upon
Co-authored-by: Christoph Hamsen <[email protected]>
Co-authored-by: Christoph Hamsen <[email protected]>
…onnaisseur into docs/add-jsonschema
Adding a jsonschema allows user to fail early as the user configuration in the is validated at installation time already. For that reason, there has been added additional validation that couldn't be performed using jsonschema in the helm helper file. Moreover, as we now have our dear conny in artifacthub we can enhance our artifacthub page by adding a jsonschema as artifacthub parses the file and shows its content in a nice format.
Fixes #
Description
Checklist
develop
values.yaml
andChart.yaml
(if necessary)