mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #103071 from aojea/esipp_nodepor
wait for endpoints to be available
This commit is contained in:
commit
c48adbb3e8
@ -304,6 +304,10 @@ func (j *TestJig) ListNodesWithEndpoint() ([]v1.Node, error) {
|
||||
// GetEndpointNodeNames returns a string set of node names on which the
|
||||
// endpoints of the given Service are running.
|
||||
func (j *TestJig) GetEndpointNodeNames() (sets.String, error) {
|
||||
err := j.waitForAvailableEndpoint(ServiceEndpointsTimeout)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
endpoints, err := j.Client.CoreV1().Endpoints(j.Namespace).Get(context.TODO(), j.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get endpoints for service %s/%s failed (%s)", j.Namespace, j.Name, err)
|
||||
|
Loading…
Reference in New Issue
Block a user