mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
no watch endpointslice in userpace mode
This commit is contained in:
@@ -364,6 +364,12 @@ func newProxyServer(
|
||||
}
|
||||
}
|
||||
|
||||
useEndpointSlices := utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceProxying)
|
||||
if proxyMode == proxyModeUserspace {
|
||||
// userspace mode doesn't support endpointslice.
|
||||
useEndpointSlices = false
|
||||
}
|
||||
|
||||
return &ProxyServer{
|
||||
Client: client,
|
||||
EventClient: eventClient,
|
||||
@@ -384,7 +390,7 @@ func newProxyServer(
|
||||
OOMScoreAdj: config.OOMScoreAdj,
|
||||
ConfigSyncPeriod: config.ConfigSyncPeriod.Duration,
|
||||
HealthzServer: healthzServer,
|
||||
UseEndpointSlices: utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceProxying),
|
||||
UseEndpointSlices: useEndpointSlices,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@@ -160,7 +160,11 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
|
||||
return nil, fmt.Errorf("unable to create proxier: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
useEndpointSlices := utilfeature.DefaultFeatureGate.Enabled(features.WindowsEndpointSliceProxying)
|
||||
if proxyMode == proxyModeUserspace {
|
||||
// userspace mode doesn't support endpointslice.
|
||||
useEndpointSlices = false
|
||||
}
|
||||
return &ProxyServer{
|
||||
Client: client,
|
||||
EventClient: eventClient,
|
||||
@@ -175,7 +179,7 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
|
||||
OOMScoreAdj: config.OOMScoreAdj,
|
||||
ConfigSyncPeriod: config.ConfigSyncPeriod.Duration,
|
||||
HealthzServer: healthzServer,
|
||||
UseEndpointSlices: utilfeature.DefaultFeatureGate.Enabled(features.WindowsEndpointSliceProxying),
|
||||
UseEndpointSlices: useEndpointSlices,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user