-
Notifications
You must be signed in to change notification settings - Fork 689
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
bump controller-runtime and k8s deps #6634
Conversation
3455210
to
668dbc2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6634 +/- ##
==========================================
- Coverage 81.76% 81.01% -0.76%
==========================================
Files 133 133
Lines 15944 19996 +4052
==========================================
+ Hits 13037 16200 +3163
- Misses 2614 3503 +889
Partials 293 293 |
I believe the RBAC rules were changed by |
There is still an additional hurdle with the version bump. Following change in controller-tools v0.16.0
This change appropriately triggers the generation of new "required" entries in CRDs when In our API, we have a contour/apis/projectcontour/v1/httpproxy.go Lines 238 to 240 in 20e57df
contour/apis/projectcontour/v1/httpproxy.go Lines 249 to 250 in 20e57df
Now consider how contour/test/e2e/httpproxy/global_external_auth_test.go Lines 234 to 238 in 20e57df
Even though the optional /~https://github.com/projectcontour/contour/actions/runs/10536218743/job/29196551673?pr=6634
|
There are several other types that also use I believe backwards compatible fix would be to remove the Another option would be to change Any thoughts? |
Looks like we missed out making the change to a pointer in #4994 Since it is a v1 type seems like we should go the conservative approach here and do the former |
668dbc2
to
de3bbd0
Compare
I agree. I've removed the |
f267098
to
5335527
Compare
5335527
to
d54c95a
Compare
3aba76d
to
477344b
Compare
477344b
to
3cb055b
Compare
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Starting with version v0.16.0 of controller-tool, the +required tag began being processed, leading to the inclusion of new "required" entries in CRDs. The ExtensionServiceReference is used in the AuthorizationServer as an optional field, but it is embedded as a struct rather than a pointer. This causes it to be included in requests even when not explicitly set. This resulted in the following error: HTTPProxy.projectcontour.io "external-auth" is invalid: [spec.virtualhost.authorization.extensionRef.name: Required value, <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation] Ideally, HTTPProxy.Spec.VirtualHost.Authorization.ExtensionServiceRef should have been a pointer to make it truly optional. However, changing it to a pointer now would break backward compatibility. An alternative solution is to make ExtensionServiceReference.Name optional, which should be acceptable since the +required tag was never enforced by the CRD in the first place. Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
3cb055b
to
2c1946c
Compare
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.
LGTM
This pull request contains following changes:
+required
fromExtensionServiceReference.Name
Background:
sigs.k8s.io/controller-runtime
v0.19.0 includes a breaking change that necessitates updating it alongsidek8s.io/*
v1.31.sigs.k8s.io/controller-tools
v0.16.x needs to be updated fork8s.io/*
v1.31 compatibility, which also prompted the re-generation of CRDs.sigs.k8s.io/controller-tools
v0.16.x started to processes+required
annotations which were not processed before. We have+required
fieldHTTPProxy.spec.virtualhost.authorization.extensionRef.name
within the+optional
embedded structHTTPProxy.spec.virtualhost.authorization.extensionRef
. Since the struct is embedded, it is always included, even if it hasn't been explicitly initialized. maintain backward compatibility, the+required
annotation was removed.