Skip to content

Commit

Permalink
Verify that a UDN pod can reach the kapi service in the default network
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrtapz committed Oct 31, 2024
1 parent 1299398 commit a2c6fce
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/extended/networking/network_segmentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,22 @@ var _ = Describe("[sig-network][OCPFeatureGate:NetworkSegmentation][Feature:User
}, 4*time.Second).Should(BeFalse())
}

By("asserting UDN pod can reach the kapi service in the default network")
// Use the service name to get test the DNS access
Consistently(func() bool {
_, err := e2ekubectl.RunKubectl(
udnPodConfig.namespace,
"exec",
udnPodConfig.name,
"--",
"curl",
"--connect-timeout",
"2",
"--insecure",
"https://kubernetes.default/healthz")
return err == nil
}, 5*time.Second).Should(BeTrue())

By("asserting UDN pod can't reach default services via default network interface")
// route setup is already done, get kapi IPs
kapi, err := cs.CoreV1().Services("default").Get(context.Background(), "kubernetes", metav1.GetOptions{})
Expand Down

0 comments on commit a2c6fce

Please sign in to comment.