mirror of https://github.com/k3s-io/k3s
Explicitly return nil for underlying cluster's service in Federated Service e2e cleanup function.
parent
918e99e298
commit
ade055f3b5
|
@ -300,6 +300,10 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv
|
|||
// Get failed with an error, try again.
|
||||
framework.Logf("Failed to find service %q in namespace %q, in cluster %q: %v. Trying again in %s", service.Name, namespace, name, err, framework.Poll)
|
||||
return false, nil
|
||||
} else if errors.IsNotFound(err) {
|
||||
cSvc = nil
|
||||
By(fmt.Sprintf("Service %q in namespace %q in cluster %q not found", service.Name, namespace, name))
|
||||
return true, nil
|
||||
}
|
||||
By(fmt.Sprintf("Service %q in namespace %q in cluster %q found", service.Name, namespace, name))
|
||||
return true, nil
|
||||
|
@ -307,7 +311,7 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv
|
|||
|
||||
if err != nil || cSvc == nil {
|
||||
By(fmt.Sprintf("Failed to find service %q in namespace %q, in cluster %q in %s", service.Name, namespace, name, FederatedServiceTimeout))
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
err = cleanupServiceShard(c.Clientset, name, namespace, cSvc, FederatedServiceTimeout)
|
||||
|
|
Loading…
Reference in New Issue