mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 04:27:54 +00:00
Fix a set type
This commit is contained in:
parent
147114e648
commit
1c089afcf3
@ -29,9 +29,9 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/proxy/metrics"
|
"k8s.io/kubernetes/pkg/proxy/metrics"
|
||||||
)
|
)
|
||||||
|
|
||||||
var supportedEndpointSliceAddressTypes = sets.New[string](
|
var supportedEndpointSliceAddressTypes = sets.New[discovery.AddressType](
|
||||||
string(discovery.AddressTypeIPv4),
|
discovery.AddressTypeIPv4,
|
||||||
string(discovery.AddressTypeIPv6),
|
discovery.AddressTypeIPv6,
|
||||||
)
|
)
|
||||||
|
|
||||||
// EndpointsChangeTracker carries state about uncommitted changes to an arbitrary number of
|
// EndpointsChangeTracker carries state about uncommitted changes to an arbitrary number of
|
||||||
@ -76,7 +76,7 @@ func NewEndpointsChangeTracker(hostname string, makeEndpointInfo makeEndpointFun
|
|||||||
// change that needs to be synced; note that this is different from the return value of
|
// change that needs to be synced; note that this is different from the return value of
|
||||||
// ServiceChangeTracker.Update().
|
// ServiceChangeTracker.Update().
|
||||||
func (ect *EndpointsChangeTracker) EndpointSliceUpdate(endpointSlice *discovery.EndpointSlice, removeSlice bool) bool {
|
func (ect *EndpointsChangeTracker) EndpointSliceUpdate(endpointSlice *discovery.EndpointSlice, removeSlice bool) bool {
|
||||||
if !supportedEndpointSliceAddressTypes.Has(string(endpointSlice.AddressType)) {
|
if !supportedEndpointSliceAddressTypes.Has(endpointSlice.AddressType) {
|
||||||
klog.V(4).InfoS("EndpointSlice address type not supported by kube-proxy", "addressType", endpointSlice.AddressType)
|
klog.V(4).InfoS("EndpointSlice address type not supported by kube-proxy", "addressType", endpointSlice.AddressType)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user