-
Notifications
You must be signed in to change notification settings - Fork 363
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
Update k8s libraries to v1.31.1 #6681
base: main
Are you sure you want to change the base?
Update k8s libraries to v1.31.1 #6681
Conversation
b0dfc1f
to
638eeaa
Compare
/test-multicluster-e2e |
@tnqn @luolanzone it's a big PR, but I have tried to keep things organized in different commits to facilitate the review |
/test-all |
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, thanks for the work. Glad to get rid of workqueue item type assertion.
@@ -561,7 +560,7 @@ func TestStaleControllerNoRaceWithResourceImportReconciler(t *testing.T) { | |||
|
|||
stopCh := make(chan struct{}) | |||
defer close(stopCh) | |||
q := workqueue.NewRateLimitingQueue(workqueue.DefaultItemBasedRateLimiter()) | |||
q := workqueue.NewTypedRateLimitingQueue(workqueue.DefaultTypedItemBasedRateLimiter[*mcv1alpha1.ResourceImport]()) |
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.
Not introduced to the PR, but using a pointer as the workqueue item is a bad usage as multiple events of a single resource could be handled concurrently, though this test creates a single event for each resource.
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.
There is at least one other place where a pointer is used (this time not in test code): https://github.com/antrea-io/antrea/blob/main/pkg/util/podstore/podstore.go
I can follow up on this after this PR. In practice, when the pointer is received from the informer through event handlers, does the pointer for a given resource change across updates?
Upgrade sigs.k8s.io/controller-runtime to v0.19.0 Remove GO111MODULE=on in Dockerfile Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Use GetClient() in clientset expansions Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
admission.Decoder is now an interface Missing method in Manager mock Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Ensure uniqueness of MC controller names Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Generate OpenAPI spec for k8s.io/apimachinery/pkg/version This is required because by setting EffectiveVersion (which is now necessary), we enable the /version route, so we need the OpenAPI spec for the response type (version.Info). All antrea-controller APIs require an OpenAPI spec. Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
638eeaa
to
ee9f2dc
Compare
/test-all |
/test-multicluster-e2e |
Some of the key changes that were caused by these updates:
k8s.io/client-go/util/workqueue
have been deprecated and were replaced with typed functions (using Go generics)Version
field no longer exists in the generic apiserver config. It has been replaced withEffectiveVersion
(this is because kube-apiserver now supports version emulation for more robust K8s version upgrades).EffectiveVersion
is not required (Version
used to be optional), and I am not sure whether that was an intentional change.EffectiveVersion
is used (instead ofVersion
) to configure the/version
route. At the moment we have no intention of supporting version emulation in the Antrea Controller, but we could in the future. As far as I can tell, other changes relating to version emulation support do not affect Antrea.client-gen
) is now more generic (it leverages Go generics), so as a result the generated code is less verbose.