Skip to content

Commit e340a07

Browse files
committed
update kube-proxy
1 parent ddfc4d3 commit e340a07

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cmd/kube-proxy/app/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ func (s *ProxyServer) Run(ctx context.Context) error {
573573
go endpointSliceConfig.Run(ctx.Done())
574574

575575
if utilfeature.DefaultFeatureGate.Enabled(features.MultiCIDRServiceAllocator) {
576-
serviceCIDRConfig := config.NewServiceCIDRConfig(ctx, informerFactory.Networking().V1beta1().ServiceCIDRs(), s.Config.ConfigSyncPeriod.Duration)
576+
serviceCIDRConfig := config.NewServiceCIDRConfig(ctx, informerFactory.Networking().V1().ServiceCIDRs(), s.Config.ConfigSyncPeriod.Duration)
577577
serviceCIDRConfig.RegisterEventHandler(s.Proxier)
578578
go serviceCIDRConfig.Run(wait.NeverStop)
579579
}

pkg/proxy/config/config.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424

2525
v1 "k8s.io/api/core/v1"
2626
discoveryv1 "k8s.io/api/discovery/v1"
27-
networkingv1beta1 "k8s.io/api/networking/v1beta1"
27+
networkingv1 "k8s.io/api/networking/v1"
2828
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
2929
"k8s.io/apimachinery/pkg/util/sets"
3030
v1informers "k8s.io/client-go/informers/core/v1"
3131
discoveryv1informers "k8s.io/client-go/informers/discovery/v1"
32-
networkingv1beta1informers "k8s.io/client-go/informers/networking/v1beta1"
32+
networkingv1informers "k8s.io/client-go/informers/networking/v1"
3333
"k8s.io/client-go/tools/cache"
3434
"k8s.io/klog/v2"
3535
)
@@ -404,7 +404,7 @@ type ServiceCIDRConfig struct {
404404
}
405405

406406
// NewServiceCIDRConfig creates a new ServiceCIDRConfig.
407-
func NewServiceCIDRConfig(ctx context.Context, serviceCIDRInformer networkingv1beta1informers.ServiceCIDRInformer, resyncPeriod time.Duration) *ServiceCIDRConfig {
407+
func NewServiceCIDRConfig(ctx context.Context, serviceCIDRInformer networkingv1informers.ServiceCIDRInformer, resyncPeriod time.Duration) *ServiceCIDRConfig {
408408
result := &ServiceCIDRConfig{
409409
cidrs: sets.New[string](),
410410
logger: klog.FromContext(ctx),
@@ -448,19 +448,19 @@ func (c *ServiceCIDRConfig) Run(stopCh <-chan struct{}) {
448448
// handleServiceCIDREvent is a helper function to handle Add, Update and Delete
449449
// events on ServiceCIDR objects and call downstream event handlers.
450450
func (c *ServiceCIDRConfig) handleServiceCIDREvent(oldObj, newObj interface{}) {
451-
var oldServiceCIDR, newServiceCIDR *networkingv1beta1.ServiceCIDR
451+
var oldServiceCIDR, newServiceCIDR *networkingv1.ServiceCIDR
452452
var ok bool
453453

454454
if oldObj != nil {
455-
oldServiceCIDR, ok = oldObj.(*networkingv1beta1.ServiceCIDR)
455+
oldServiceCIDR, ok = oldObj.(*networkingv1.ServiceCIDR)
456456
if !ok {
457457
utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", oldObj))
458458
return
459459
}
460460
}
461461

462462
if newObj != nil {
463-
newServiceCIDR, ok = newObj.(*networkingv1beta1.ServiceCIDR)
463+
newServiceCIDR, ok = newObj.(*networkingv1.ServiceCIDR)
464464
if !ok {
465465
utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", newObj))
466466
return

0 commit comments

Comments
 (0)