-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add JSON schemas for values.yaml #95
Conversation
Is there any way to avoid drift? Some CI? |
@cthtrifork what drift? |
When we make changes to the helm chart - how do we ensure the schema is up-to-date |
I would guess that the |
It does indeed lint the chart and fail the CI upon any discrepancies, e.g. https://github.com/trifork/cheetah-charts/actions/runs/5962171340/job/16172838585. |
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 think that we need some more required
values depending on **.enabled
and **.create
.
If they are true
several keys under that object should probably also be required.
For example, if ingress.enabled=true
, we should make ingress.tls
, ingress.hosts
, and ingress.paths
required
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
I have added the changes. Can you double-check if the |
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
Co-authored-by: Anders Bennedsgaard <[email protected]>
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 think this is as ready as we can make it.
As the charts isn't very DRY with this (lot of duplication between values.yaml
and this values.schema.json
such as the description), we might want to create a task on how to reduce this duplication.
We could keep the values.yaml
very minimal by only including defaults for the required fields, remove the description from the schema such that we only have it in values.yaml
, move defaults to the schema and remove the values.yaml
entirely, or something else entirely. 🤔
For now, let's merge it in and start testing the new feature 👍
Add JSON schema for opensearch Continuation of #95 Implementing https://jira.trifork.com/browse/KAMDP-341
Add JSON schema for flink-job Continuation of #95 Implementing https://jira.trifork.com/browse/KAMDP-341
For now, I've added only a JSON chart for the cheetah-application/values.yaml
The plan is to add JSON charts for the other values.yaml files as well
Implementing https://jira.trifork.com/browse/KAMDP-341
The current json schema fails only for 1 helm release - that of platypus hello world:
https://github.com/trifork/cheetah-example-platypus-team/blob/a68182349c985ccd44fb680bc7c6d15bd5d6ec8a/systems/hello/base/hello-world.yaml#L20C1-L20C1
The tag here is a number, when usually it's a string
Here is a script to verify the charts in k8 (it assumes there are <20 releases that use the cheetah-application chart):
Using this tool for automatic schema generation: https://jsonformatter.org/yaml-to-jsonschema