feat(charts): add hand-crafted values.schema.json to all three charts#1263
feat(charts): add hand-crafted values.schema.json to all three charts#1263ferponse wants to merge 4 commits into
Conversation
Auto-generated schemas were used as a base and then corrected manually:
- controller.kubeClient.qps: integer → number (Go flag is Float64)
- opensandbox.global: null → anyOf[object,null] (empty object, not null)
- opensandbox/values.yaml: global: → global: {} (explicit empty map)
Validated:
- helm lint passes for all three charts
- invalid values (replicaCount=abc) are rejected with a clear error
- qps=12.5 (float) is accepted with --set-json
Closes opensandbox-group#1262
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c91ce86fe
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Co-authored-by: Atenea Agent <svc_atenea_gitlab@ofidona.net>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7aab37b39d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "port": { | ||
| "type": "integer" |
There was a problem hiding this comment.
If a user sets controller.livenessProbe.httpGet.port: health, Helm now rejects the values even though this Deployment declares a health container port in templates/deployment.yaml and the template would render a valid named probe port. This Kubernetes probe field is an int-or-string value, so the schema should accept strings as well as integers; the readiness probe schema below has the same regression.
Useful? React with 👍 / 👎.
Summary
Adds
values.schema.jsontoopensandbox-controller,opensandbox-serverandopensandboxcharts, providing input validation athelm install/helm upgradetime.Closes #1262
Approach: hand-crafted (not auto-generated)
Auto-generators infer types from YAML values and produce incorrect results for edge cases. This PR uses an auto-generated base and manually corrects the known issues:
controller.kubeClient.qpsintegernumberFloat64— accepts12.5opensandbox.globalnullanyOf: [object, null]Why
globalneeded two fixesIn YAML, a key with only comments as children has a
nullvalue:This caused
helm lintto fail even against the chart's own default values because the schema expectedobjectbut gotnull.Two changes were needed:
opensandbox/values.yaml:global:→global: {}— makes the default an explicit empty object instead of null.anyOf: [object, null]— allows null for users who install without passing anyglobaloverride (Helm sends null when the key is not provided).Validated locally
Notes
values.yaml.initialDelaySeconds,periodSeconds, etc.) are correctly typed asinteger.global.additionalProperties: trueallows arbitrary sub-chart global overrides without validation errors.