-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove cloud specific DNS check to make e2e Conformance eligible #80682
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,15 +49,27 @@ var _ = SIGDescribe("DNS", func() { | |
namesToResolve := []string{ | ||
fmt.Sprintf("kubernetes.default.svc.%s", framework.TestContext.ClusterDNSDomain), | ||
} | ||
// Added due to #8512. This is critical for GCE and GKE deployments. | ||
if framework.ProviderIs("gce", "gke") { | ||
namesToResolve = append(namesToResolve, "google.com") | ||
// Windows containers do not have a route to the GCE | ||
// metadata server by default. | ||
if !framework.NodeOSDistroIs("windows") { | ||
namesToResolve = append(namesToResolve, "metadata") | ||
} | ||
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) | ||
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) | ||
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n") | ||
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n") | ||
|
||
// Run a pod which probes DNS and exposes the results by HTTP. | ||
ginkgo.By("creating a pod to probe DNS") | ||
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName) | ||
validateDNSResults(f, pod, append(wheezyFileNames, jessieFileNames...)) | ||
}) | ||
|
||
// Added due to #8512. This is critical for GCE and GKE deployments. | ||
ginkgo.It("should provide DNS for the cluster [Provider:GCE]", func() { | ||
framework.SkipUnlessProviderIs("gce", "gke") | ||
|
||
namesToResolve := []string{"google.com"} | ||
// Windows containers do not have a route to the GCE metadata server by default. | ||
if !framework.NodeOSDistroIs("windows") { | ||
namesToResolve = append(namesToResolve, "metadata") | ||
} | ||
|
||
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) | ||
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) | ||
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n") | ||
|
@@ -77,15 +89,6 @@ var _ = SIGDescribe("DNS", func() { | |
"kubernetes.default", | ||
"kubernetes.default.svc", | ||
} | ||
// Added due to #8512. This is critical for GCE and GKE deployments. | ||
if framework.ProviderIs("gce", "gke") { | ||
namesToResolve = append(namesToResolve, "google.com") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rather see this block broken out into its own testcase, same for the conformance test above these names are important to verify, they're just not intended to be exercised as part of a conformance test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
// Windows containers do not have a route to the GCE | ||
// metadata server by default. | ||
if !framework.NodeOSDistroIs("windows") { | ||
namesToResolve = append(namesToResolve, "metadata") | ||
} | ||
} | ||
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain) | ||
hostEntries := []string{hostFQDN, dnsTestPodHostName} | ||
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spiffxp is
[Provider:GCE]
equivalent toframework.ProviderIs("gce", "gke")
in the e2e framework?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completely made the tag up out of whole cloth but I feel like we're going to want some way to signify that we want these provider-specific tests to run. I could do something like
[Feature:GCEProvider]
as well, but this would exclude it from all of the release-master-blocking tests, almost all of which run in GCE and need this tested anyway. Open to feedback on a more appropriate way to do things hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this can go up for approval right now, this new test will fail on other providers. I think we need to add a skip in the new test if it's not GCE or GKE. I don't know that we need to decide on a label for it right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test isn't intended to be a Conformance test though, the Conformance part of it will still pass just fine. This was in service of allowing other tests to be promoted to Conformance (see #74977)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why are we adding a failing e2e test (regardless of any conformance question)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we decide on the best way to do this, please update the documentation
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md#kinds-of-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#80682 (comment) Addressed.
https://github.com/kubernetes/kubernetes/blob/20010af0de0184410107fb4c7d2f0c4d74db5f15/test/e2e/network/dns.go#L65