Skip to content

Commit

Permalink
Merge pull request #29253 from kyrtapz/default_svc_access
Browse files Browse the repository at this point in the history
SDN-4930: Verify that a UDN pod can reach the kapi service in the default network
  • Loading branch information
openshift-merge-bot[bot] authored Jan 9, 2025
2 parents 727cacc + a2c6fce commit 9d28990
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 @@ -317,6 +317,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 9d28990

Please sign in to comment.