-
Notifications
You must be signed in to change notification settings - Fork 333
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
Policy merging discrepancy between Kubernetes and Universal with defaults #6070
Comments
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
Looking at the code we have a kuma/pkg/core/resources/manager/manager.go Lines 59 to 66 in f5f63bd
We should likely make it work in a similar way as If we are to do this and always rely on kubebuilder annotations for defaults we should remove this: kuma/pkg/plugins/runtime/k8s/webhooks/defaulter.go Lines 53 to 58 in e590c3d
Defaulter
The other alternative is to disallow the use of This also seems to be in the openAPI spec, can't we just use openAPI magic to have the defaults ensured? A bit like we do in:
|
yeah this was the original plan I had in mind at least |
What happened?
We use the
kubebuilder:default
annotation to generate an OpenAPI spec describing our resources. When we create our CRDs with these OpenAPI specs, Kubernetes then sets the value of omitted fields to the default. On Universal, we don't do the same, this part of the spec serves only as documentationThis means:
kubebuilder:default=30s
forinterval
:on Universal we get
{interval: 100s, timeout: 300s}
but on Kubernetes we get{interval: 30s, timeout: 300s}
because the API server setsinterval: 30s
on the second resource.The text was updated successfully, but these errors were encountered: