Skip to content

initial opencost Helm values schema#313

Draft
HMetcalfeW wants to merge 9 commits into
opencost:mainfrom
HMetcalfeW:helm-schema
Draft

initial opencost Helm values schema#313
HMetcalfeW wants to merge 9 commits into
opencost:mainfrom
HMetcalfeW:helm-schema

Conversation

@HMetcalfeW

Copy link
Copy Markdown
Contributor

Interested in the team's feedback on adding a schema to our Helm Chart. The initial generation was relatively straightforward, but as our chart evolves, this file will require ongoing maintenance. If we think this is too much maintenance, then I'm happy to table it, but believe it can pay long-term dividends. This first iteration is lax because it lacks required fields.

The practice is fairly common in the Bitnami Charts community. There's a great blog post on the motivations behind creating a Values schema and the various checks it allows.

Requirement checks. Example: An API_KEY environment variable is set
Type validation. Example: The image tag is a string such as "1.5" and not the number 1.5
Range validation. Example: The value for a CPU utilization percentage key is between 1 and 100
Constraint Validation. Example: The pullPolicy is IfNotPresent, Always, or Never; A URL has the format http(s)://:
Since schema checks are run on all Helm commands (template, lint, upgrade, install), this helps prevent customer values from drifting too far between versions and clearly defines what values are/are not allowed.

Example Helm output using a number for clusterId
helm lint .

[ERROR] templates/: values don't meet the specifications of the schema(s) in the following chart(s):
opencost:
- at '/nameOverride': got number, want string

https://helm.sh/docs/helm/helm_lint/

Signed-off-by: HMetcalfeW <106991365+HMetcalfeW@users.noreply.github.com>
@ameijer

ameijer commented Nov 13, 2025

Copy link
Copy Markdown
Member

we like this - can we break up into schema refs to make this more readable?

@ameijer

ameijer commented Nov 13, 2025

Copy link
Copy Markdown
Member

might want to enable strict schema, ensure we validate in CI with CI vals

ameijer and others added 5 commits November 13, 2025 16:57
Signed-off-by: HMetcalfeW <106991365+HMetcalfeW@users.noreply.github.com>
Signed-off-by: HMetcalfeW <106991365+HMetcalfeW@users.noreply.github.com>
Signed-off-by: HMetcalfeW <106991365+HMetcalfeW@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. Please remove the stale label or comment or this pull request will be closed in 90 days.

@github-actions github-actions Bot added the Stale label Apr 29, 2026
@thomasvn thomasvn removed the Stale label May 14, 2026
Merging main introduced a top-level extraObjects list and changed opencost.ui.route.tls to an object. Update values.schema.json so helm lint passes.
ct lint requires a version bump when chart files change (values.schema.json and CI values were added on this branch).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants