-
Notifications
You must be signed in to change notification settings - Fork 0
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
Disable '"additionalProperties": false' in values.yaml
schema for cluster apps.
#3187
Comments
values.yaml
schema for cluster apps.values.yaml
schema for cluster apps.
In Should we remove it completely from all levels? I am not fully sure. |
This means we do no more checking of fields and customers + our engineers can easily make typos and mistakes. The schema becomes partially useless. People don't normally look at warnings, and CIs don't look at warnings at all. We also shouldn't add new, special validations for this case because then we're not using standard Helm commands anymore which may hinder our migration to pure Helm in the future. Hence, here are some alternative suggestions:
|
When we set When we keep I believe the latter is worse than the former one. For example, when you need to add a new parameter to the configmap created by cluster-apps-operator, you don't want to have to upgrade all clusters in advance. That would slow us down a lot. |
TL;DR We should make a clear distinction between configuration of "regular" apps (that deploy controllers/operators) and cluster-<provider> (and default-apps-<provider>) apps. They are used for different things and "global" configs (changed "globally") have quite different impacts. Universal config for "regular" apps (that deploy controllers/operators) should IMO not be universal for and shared with cluster-<provider> (and default-apps-<provider>) apps as well.
When it comes to config being added to catalog config maps and to config repo, we should really make a clear distinction between "regular" apps (that deploy controllers/operators) and cluster-<provider> apps that contain CAPI+CAPx+HelmRelease+App resources (and default-apps-<provider> apps that go hand in hand with cluster-<provider> apps and will be soon merged into cluster-<provider> apps). "Regular" apps, those that deploy controllers/operators:
On the other hand, cluster- apps (default-apps-<provider> apps will get merged into cluster-):
Now when it comes to cluster-<provider> apps schema:
💯 what Andreas wrote. JSON schema is natively integrated into Helm and this is very helpful. It gives us a strong validation and it's our 1st line of defence from incorrectly configured workload clusters. With JSON schema we can write simple Helm templates, because we can rely on the JSON schema validation and assume that Helm values that we are using in the template is just correct. Templates become easier to understand and maintain that way. AFAIK cluster-<provider> apps (and default-apps-<provider>) get values injected from these places only:
So the only really useful/used config that gets injected into cluster-<provider> apps and default-apps-<provider> are base domain and management cluster name that get injected from cluster catalog config map, and both are immutable. So even this is more about defaulting some immutable value (for the sake of convenience I guess), and not about making something configurable.
@erkanerol In these cases, which IMO should be very rare, AFAIK in cluster-apps-operator you can always check for cluster-<provider> and default-apps-<provider> version, and set the required values based on those versions, which IMO we should be even doing now, so we don't mutate existing workload clusters config with an MC component change. This problem existing here is IMO an architecture smell. |
i am having hard to to conclude what shall we do here? |
When it comes to cluster-<provider> apps, IMO we should not do anything :) To quote my TL;DR from above:
|
@alex-dabija can we close this? it is for Turtles/Rocket/Phoenix - current state for us is that having strict validation and protecting against the app platform rolling everything is actually a good thing, also i don't think any team really touched this |
Yes, it's fine to close this issue. |
As we learned, some of our apps (so far we've found only some cluster apps) have in their
values.schema.json
file the property"additionalProperties": false,
(example.This means, that if at any time someone will add a new global value to one of our catalog config maps or to the
config
repo and this value will be pushed to such an app, it won't install, as helm's validation (which can't be disabled if the schema file is present) will fail.It seems that currently the recommended way is to allow
additionalProperties
and validate (and show a warning) before passing the config tohelm
.CC @marians
The text was updated successfully, but these errors were encountered: