Skip to content

feat: add values schemas #1752

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

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Jorgagu
Copy link
Contributor

@Jorgagu Jorgagu commented May 6, 2025

This pull request introduces schema validation for values.yaml files in the Sentry Helm charts and includes minor formatting fixes in the documentation. The most important changes are the addition of JSON schema files for validation and updates to the README files to guide users on enabling this feature in supported editors.

Schema Validation for Helm Charts

  • Added a JSON schema file (charts/sentry-kubernetes/values.schema.json) to validate values.yaml files for the sentry-kubernetes chart.
  • Added a JSON schema file (charts/sentry/values.schema.json) to validate values.yaml files for the sentry chart.
  • Added schema validation instructions to charts/sentry/README.md for the main Sentry chart, including how to configure editor support.
  • Added schema validation instructions to charts/sentry-kubernetes/README.md for the Sentry Kubernetes chart, including how to configure editor support.

Documentation Formatting Fixes

  • Fixed table formatting in charts/sentry-kubernetes/README.md and charts/sentry/README.md for improved readability. [1] [2]

@Jorgagu Jorgagu changed the title Feat/add values schemas feat: add values schemas May 6, 2025
@Jorgagu
Copy link
Contributor Author

Jorgagu commented May 7, 2025

👋 @Mokto, could you please review this PR ? Thanks 😄

Copy link
Contributor

@Mokto Mokto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. How do we maintain this?

@Jorgagu
Copy link
Contributor Author

Jorgagu commented May 7, 2025

Thanks for the quick review! I initially generated the JSON Schema files using the unmaintained helm-schema-gen plugin, but I’ve now switched to the actively maintained helm-schema plugin.

Updated workflow:

  1. Install the plugin:

    helm plugin install https://github.com/dadav/helm-schema
  2. Generate the schema in the chart directory:

    cd charts/sentry
    helm schema

I’ll add these steps to the Schema Validation section of the README so contributors can regenerate the schema locally.

We could also automate this via a GitHub Action that runs helm schema with dry-run flag on each push and fails if values.yaml and values.schema.json get out of sync.

@Mokto
Copy link
Contributor

Mokto commented May 7, 2025

That's good enough for me for now ;)

But the CI is failing.

@Jorgagu Jorgagu force-pushed the feat/add-values-schemas branch from 5c149ab to 8a10398 Compare May 7, 2025 09:56
@Jorgagu
Copy link
Contributor Author

Jorgagu commented May 14, 2025

Hi @Mokto,

@TartanLeGrand and I noticed that many Bitnami charts either lack a values.schema.json entirely or include one that doesn’t accurately reflect their values.yaml.

I opened an issue to centralize discussion here: bitnami/readme-generator-for-helm#142

To move forward, we have two options:

  1. Migrate our tooling from dadav/helm-schema to readme-generator-for-helm] so that it generates values.schema.json strictly from our charts’ values.yaml—without pulling in schema from dependencies.
  2. Ask Bitnami to update every chart’s values.yaml and values.schema.json so they stay in sync.

Which approach do you prefer?

@Mokto
Copy link
Contributor

Mokto commented May 14, 2025

I would go for option 1 as option 2 might take ages.

@Jorgagu
Copy link
Contributor Author

Jorgagu commented May 14, 2025

Yes, I agree with you. I'll be working on this option by the end of the week.

@Jorgagu Jorgagu marked this pull request as draft May 14, 2025 15:04
@Jorgagu Jorgagu force-pushed the feat/add-values-schemas branch from a56c188 to d4a16a0 Compare June 13, 2025 10:01
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.

2 participants