Merge pull request #126294 from aojea/nosnat

e2e test for No SNAT
This commit is contained in:
Kubernetes Prow Robot 2024-07-23 20:12:33 -07:00 committed by GitHub
commit c75e30d049
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 7 deletions

View File

@ -251,10 +251,6 @@ var (
// TODO: document the feature (owning SIG, when to use this feature for a test)
NodeOutOfServiceVolumeDetach = framework.WithFeature(framework.ValidFeatures.Add("NodeOutOfServiceVolumeDetach"))
// Owner: sig-network
// Marks a single test that tests pod-to-pod connectivity between every pair of nodes.
NoSNAT = framework.WithFeature(framework.ValidFeatures.Add("NoSNAT"))
// Owner: sig-network
// Marks a single test that tests cluster DNS performance with many services.
PerformanceDNS = framework.WithFeature(framework.ValidFeatures.Add("PerformanceDNS"))

View File

@ -29,7 +29,6 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
admissionapi "k8s.io/pod-security-admission/api"
"k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@ -64,7 +63,7 @@ var (
// This test verifies that a Pod on each node in a cluster can talk to Pods on every other node without SNAT.
// We use the [Feature:NoSNAT] tag so that most jobs will skip this test by default.
var _ = common.SIGDescribe("NoSNAT", feature.NoSNAT, framework.WithSlow(), func() {
var _ = common.SIGDescribe("NoSNAT", func() {
f := framework.NewDefaultFramework("no-snat-test")
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
ginkgo.It("Should be able to send traffic between Pods without SNAT", func(ctx context.Context) {
@ -72,7 +71,7 @@ var _ = common.SIGDescribe("NoSNAT", feature.NoSNAT, framework.WithSlow(), func(
pc := cs.CoreV1().Pods(f.Namespace.Name)
ginkgo.By("creating a test pod on each Node")
nodes, err := e2enode.GetReadySchedulableNodes(ctx, cs)
nodes, err := e2enode.GetBoundedReadySchedulableNodes(ctx, cs, 3)
framework.ExpectNoError(err)
gomega.Expect(nodes.Items).ToNot(gomega.BeEmpty(), "no Nodes in the cluster")