mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
Merge pull request #48284 from nicksardo/ingress-ignore-delete-err
Automatic merge from submit-queue (batch tested with PRs 47850, 47835, 46197, 47250, 48284) Do not fail on error when deleting ingress Fixes #48239 If the api server or master is unavailable, the test should manually teardown load balancer resources. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
dc2b4e790d
@ -882,9 +882,12 @@ func (j *IngressTestJig) GetRootCA(secretName string) (rootCA []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeleteIngress deletes the ingress resource
|
||||
func (j *IngressTestJig) DeleteIngress() {
|
||||
ExpectNoError(j.Client.Extensions().Ingresses(j.Ingress.Namespace).Delete(j.Ingress.Name, nil))
|
||||
// TryDeleteIngress attempts to delete the ingress resource and logs errors if they occur.
|
||||
func (j *IngressTestJig) TryDeleteIngress() {
|
||||
err := j.Client.Extensions().Ingresses(j.Ingress.Namespace).Delete(j.Ingress.Name, nil)
|
||||
if err != nil {
|
||||
Logf("Error while deleting the ingress %v/%v: %v", j.Ingress.Namespace, j.Ingress.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
// WaitForIngress waits till the ingress acquires an IP, then waits for its
|
||||
|
@ -89,7 +89,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() {
|
||||
return
|
||||
}
|
||||
By("Deleting ingress")
|
||||
jig.DeleteIngress()
|
||||
jig.TryDeleteIngress()
|
||||
|
||||
By("Cleaning up cloud resources")
|
||||
framework.CleanupGCEIngressController(gceController)
|
||||
@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() {
|
||||
return
|
||||
}
|
||||
By("Deleting ingress")
|
||||
jig.DeleteIngress()
|
||||
jig.TryDeleteIngress()
|
||||
})
|
||||
|
||||
It("should conform to Ingress spec", func() {
|
||||
|
@ -101,7 +101,7 @@ func (t *IngressUpgradeTest) Teardown(f *framework.Framework) {
|
||||
}
|
||||
if t.jig.Ingress != nil {
|
||||
By("Deleting ingress")
|
||||
t.jig.DeleteIngress()
|
||||
t.jig.TryDeleteIngress()
|
||||
} else {
|
||||
By("No ingress created, no cleanup necessary")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user