Skip service external ips tests if admission controller to deny externalip services is enabled.

This commit is contained in:
Vinayak Goyal 2021-09-10 11:02:30 -07:00
parent d0f6983d6c
commit b3c23290b4

View File

@ -1214,6 +1214,9 @@ var _ = common.SIGDescribe("Services", func() {
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(9376)},
}
})
if err != nil && strings.Contains(err.Error(), "Use of external IPs is denied by admission control") {
e2eskipper.Skipf("Admission controller to deny services with external IPs is enabled - skip.")
}
framework.ExpectNoError(err)
err = jig.CreateServicePods(2)
framework.ExpectNoError(err)