-
Notifications
You must be signed in to change notification settings - Fork 96
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
Allows some more default values, based on an example values file #585
Conversation
Hi @solsson, I agree that schema should reflect only values that needs to be set. Can you sign CLA? Thanks |
statefulset: replicas: 3 additionalRedpandaCmdFlags: - --overprovisioned sideCars: configWatcher: enabled: false rbac: enabled: false listeners: kafka: port: 9092 external: default: advertisedPorts: - 31712 http: port: 8082 external: default: advertisedPorts: - 31713
012acba
to
2cd442a
Compare
Even though they have defaults, a helm user can remove them by setting the value to null. The restrictions are in place because the chart will fail to render if those values are removed. I would rather keep these restrictions in place unless there's a good reason to remove them. |
@joejulian The PR only removes the prop names from the The alternative for a user of the helm chart is to skip validation and thus get a degraded editing experience, or to copy paste defaults from the chart's values.yaml which is unwise because they might change as the chart evolves. |
Perhaps you're using values incorrectly. You're not supposed to replace the |
I restored my original title for the PR. I don't know how to describe intent better, but the purpose is only to allow a values file like the one in 2cd442a to be validated. It's not meant to change anything about how default values or the chart in general behaves. The change aligns with this opinion from above:
|
Using your branch, if
unfortunately, that does not work:
so the The schema validates the values after the 3-way merge so regardless of defaults, the keys the schema validates ensures that the fields that are required to render the template are included. If I run that same command on main:
|
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.
Blocking as this is currently implementing invalid assumptions and cannot be merged.
This seems to have been abandoned. Closing. |
When editing a values file in VSCode with yaml and
# yaml-language-server: $schema=https://github.com/redpanda-data/helm-charts/raw/redpanda-4.0.52/charts/redpanda/values.schema.json
quite a few values that do have defaults show up as required.Here I have only removed
required
entries for the example yaml given in the first commit comment, which as far as I can see produces a working cluster.Using defaults as much as possible is an important strategy for depending on helm charts. Validating values files using the schema helps a lot too.
Or is the schema meant for CI to validate the default values file? If so would it be possible to somehow maintain two variants of the schema?