Remove EndpointSliceNodeName feature gate logic

- feature gate has graduated to GA and will always be enabled, so no
 longer need to check if enabled
This commit is contained in:
Swetha Repakula
2021-03-04 09:57:15 -08:00
parent 60a714058b
commit 6f5329d4c0
5 changed files with 11 additions and 41 deletions

View File

@@ -23,13 +23,11 @@ import (
"strings"
"sync"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
discovery "k8s.io/api/discovery/v1beta1"
"k8s.io/apimachinery/pkg/types"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/tools/record"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/features"
utilproxy "k8s.io/kubernetes/pkg/proxy/util"
utilnet "k8s.io/utils/net"
)
@@ -136,9 +134,7 @@ func newEndpointSliceInfo(endpointSlice *discovery.EndpointSlice, remove bool) *
Terminating: endpoint.Conditions.Terminating != nil && *endpoint.Conditions.Terminating,
}
if utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceNodeName) {
epInfo.NodeName = endpoint.NodeName
}
epInfo.NodeName = endpoint.NodeName
esInfo.Endpoints = append(esInfo.Endpoints, epInfo)
}