Merge pull request #62137 from nikhiljindal/multiIngressTest
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Adding a kubemci e2e test to verify that single and multicluster ingresses can exist together Adding an e2e test to verify that single and multicluster ingresses can exist together. This is the first test that creates 2 ingresses, so there is some funkiness in having to update jig.Ingress and jig.Class since the jig assumes that there is only one ingress in each test. cc @nicksardo @G-Harmon @csbell ```release-note NONE ```
This commit is contained in:
commit
491000db6b
@ -647,6 +647,38 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
|
|||||||
}
|
}
|
||||||
verifyKubemciStatusHas(name, "is spread across 0 cluster")
|
verifyKubemciStatusHas(name, "is spread across 0 cluster")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
It("single and multi-cluster ingresses should be able to exist together", func() {
|
||||||
|
By("Creating a single cluster ingress first")
|
||||||
|
jig.Class = ""
|
||||||
|
singleIngFilePath := filepath.Join(framework.IngressManifestPath, "static-ip-2")
|
||||||
|
jig.CreateIngress(singleIngFilePath, ns, map[string]string{}, map[string]string{})
|
||||||
|
jig.WaitForIngress(false /*waitForNodePort*/)
|
||||||
|
// jig.Ingress will be overwritten when we create MCI, so keep a reference.
|
||||||
|
singleIng := jig.Ingress
|
||||||
|
|
||||||
|
// Create the multi-cluster ingress next.
|
||||||
|
By("Creating a multi-cluster ingress next")
|
||||||
|
jig.Class = framework.MulticlusterIngressClassValue
|
||||||
|
ingAnnotations := map[string]string{
|
||||||
|
framework.IngressStaticIPKey: ipName,
|
||||||
|
}
|
||||||
|
multiIngFilePath := filepath.Join(framework.IngressManifestPath, "http")
|
||||||
|
jig.CreateIngress(multiIngFilePath, ns, ingAnnotations, map[string]string{})
|
||||||
|
jig.WaitForIngress(false /*waitForNodePort*/)
|
||||||
|
mciIngress := jig.Ingress
|
||||||
|
|
||||||
|
By("Deleting the single cluster ingress and verifying that multi-cluster ingress continues to work")
|
||||||
|
jig.Ingress = singleIng
|
||||||
|
jig.Class = ""
|
||||||
|
jig.TryDeleteIngress()
|
||||||
|
jig.Ingress = mciIngress
|
||||||
|
jig.Class = framework.MulticlusterIngressClassValue
|
||||||
|
jig.WaitForIngress(false /*waitForNodePort*/)
|
||||||
|
|
||||||
|
By("Cleanup: Deleting the multi-cluster ingress")
|
||||||
|
jig.TryDeleteIngress()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// Time: borderline 5m, slow by design
|
// Time: borderline 5m, slow by design
|
||||||
|
Loading…
Reference in New Issue
Block a user