-
Notifications
You must be signed in to change notification settings - Fork 2
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
Config file validation #2798
Comments
From #3346: Helm supports an optional JSON schema for the values.yaml. We could write one, and then possibly also generate docs for the helm chart from the schema, with a tool like this. Our Helm Chart is quite large and complex, and documentation synced by hand. This could help us keep the docs in sync, and get a validation layer for the values.yaml. We could also use something like Pydantic to define the structure in Python code first, and then generate the schema file from that! Maybe easier than maintaining a JSON schema by hand. Edit: More options: generate it with cdk8s or use additional tooling to extract a schema from an exisiting values.yaml. I still prefer a more minimal approach without those things, but wanted to add them here as options. How to generate the Writing a JSON schema by hand is cumbersome, and so I think we should write it in a different way. I found out that zod schemas can be converted into json schemas (zod-to-json-schema). We already use zod in the frontend, so I think it'd be good to reuse this; I'd make a new small package though to generate this schema. and then we can use the native Helm support to validate with this schema. |
Slack thread discussing this: https://loculus.slack.com/archives/C05G172HL6L/p1737971382738259 |
@chaoran-chen @theosanderson @corneliusroemer What about validation that can't be expressed within the schema? A recent example would be #3534 (comment) But also for example the I believe this sort of validation cannot e done inside a JSON schema - Is this sort of validation just out of scope for now - and we revisit it in the future? |
Yes, I think that it is out of scope for the moment but it would be very valuable to create a ticket and collect possible but missing validation steps. |
After #2796, we should add validation of the configuration files that gives useful feedback to an admin setting up an instance.
The text was updated successfully, but these errors were encountered: