From 1aa24b09512d7b96db145122febb23b712be8661 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Wed, 1 May 2024 16:44:36 +0200 Subject: [PATCH] Make linter happy Signed-off-by: Dr. Stefan Schimanski --- pkg/controlplane/apiserver/aggregator.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controlplane/apiserver/aggregator.go b/pkg/controlplane/apiserver/aggregator.go index 0c6cc8c89c6..2622d1db681 100644 --- a/pkg/controlplane/apiserver/aggregator.go +++ b/pkg/controlplane/apiserver/aggregator.go @@ -159,7 +159,7 @@ func CreateAggregatorServer(aggregatorConfig aggregatorapiserver.CompletedConfig err = aggregatorServer.GenericAPIServer.AddPostStartHook("kube-apiserver-autoregistration", func(context genericapiserver.PostStartHookContext) error { if crdAPIEnabled { - go crdRegistrationController.Run(5, context.StopCh) + go crdRegistrationController.Run(5, context.Done()) } go func() { // let the CRD controller process the initial set of CRDs before starting the autoregistration controller. @@ -172,7 +172,7 @@ func CreateAggregatorServer(aggregatorConfig aggregatorapiserver.CompletedConfig } else { klog.Infof("CRD API not enabled, starting APIService registration without waiting for initial CRD sync") } - autoRegistrationController.Run(5, context.StopCh) + autoRegistrationController.Run(5, context.Done()) }() return nil }) @@ -236,10 +236,10 @@ func makeAPIServiceAvailableHealthCheck(name string, apiServices []*v1.APIServic } // Watch add/update events for APIServices - apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ //nolint:errcheck // no way to return error AddFunc: func(obj interface{}) { handleAPIServiceChange(obj.(*v1.APIService)) }, UpdateFunc: func(old, new interface{}) { handleAPIServiceChange(new.(*v1.APIService)) }, - }) //nolint:errcheck // no way to return error + }) // Don't return healthy until the pending list is empty return healthz.NamedCheck(name, func(r *http.Request) error {