Update endpointslices.go
This commit is contained in:
parent
3cde7770dd
commit
b9a55af28d
1 changed files with 2 additions and 0 deletions
|
@ -22,6 +22,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
"k8s.io/apimachinery/pkg/util/validation"
|
"k8s.io/apimachinery/pkg/util/validation"
|
||||||
|
@ -84,6 +85,7 @@ func getEndpointsFromSlices(s *corev1.Service, port *corev1.ServicePort, proto c
|
||||||
}
|
}
|
||||||
// loop over all endpointSlices generated for service
|
// loop over all endpointSlices generated for service
|
||||||
for _, eps := range epss {
|
for _, eps := range epss {
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
var ports []int32
|
var ports []int32
|
||||||
if len(eps.Ports) == 0 && port.TargetPort.Type == intstr.Int {
|
if len(eps.Ports) == 0 && port.TargetPort.Type == intstr.Int {
|
||||||
// When ports is empty, it indicates that there are no defined ports, using svc targePort if it's a number
|
// When ports is empty, it indicates that there are no defined ports, using svc targePort if it's a number
|
||||||
|
|
Loading…
Reference in a new issue