Merge pull request #36973 from kubernetes/revert-33850-add_e2e_test_for_kubectl_in_pod

Automatic merge from submit-queue

Revert "add e2e test for kubectl in a Pod"

Reverts kubernetes/kubernetes#33850

That PR introduced a test `Kubectl should be able to talk to api server kubectl running in a pod could talk to api server` that runs against GKE.

Ever since the PR merged the test has been failing against [kubernetes-e2e-gke](https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/logs/kubernetes-e2e-gke) though it was initially passing in [kubernetes-e2e-gci-gke](https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/logs/kubernetes-e2e-gci-gke). Presumably this was because the path to kubectl was different between GCI and container-vm (the two test suites).

PR https://github.com/kubernetes/kubernetes/pull/36864 attempted to fix this, but ended up breaking the test in both suites. That PR has been reverted (https://github.com/kubernetes/kubernetes/pull/36971).

Because the test introduced in kubernetes/kubernetes#33850 is still broken, it is being reverted (we should've reverted immediately after it merged instead of waiting this long).
This commit is contained in:
Kubernetes Submit Queue 2016-11-16 23:33:46 -08:00 committed by GitHub
commit 5f86fef169
3 changed files with 3 additions and 52 deletions

View File

@ -90,7 +90,6 @@ const (
kubeCtlManifestPath = "test/e2e/testing-manifests/kubectl"
redisControllerFilename = "redis-master-controller.json"
redisServiceFilename = "redis-master-service.json"
kubectlInPodFilename = "kubectl-in-pod.json"
)
var (
@ -538,6 +537,9 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
Expect(logOutput).ToNot(ContainSubstring("stdin closed"))
return strings.Contains(logOutput, "abcd1234"), nil
})
if err != nil {
os.Exit(1)
}
Expect(err).To(BeNil())
Expect(c.Batch().Jobs(ns).Delete("run-test-3", nil)).To(BeNil())
@ -561,30 +563,6 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
})
})
framework.KubeDescribe("Kubectl should be able to talk to api server", func() {
It("kubectl running in a pod could talk to api server [Conformance]", func() {
framework.SkipUnlessProviderIs("gke")
nsFlag := fmt.Sprintf("--namespace=%v", ns)
podJson := readTestFileOrDie(kubectlInPodFilename)
By("validating api verions")
framework.RunKubectlOrDieInput(string(podJson), "create", "-f", "-", nsFlag)
err := wait.PollImmediate(time.Second, time.Minute, func() (bool, error) {
output := framework.RunKubectlOrDie("get", "pods/kubectl-in-pod", nsFlag)
if strings.Contains(output, "Running") {
return true, nil
} else {
return false, nil
}
})
Expect(err).To(BeNil())
output := framework.RunKubectlOrDie("exec", "kubectl-in-pod", nsFlag, "--", "kubectl", "version")
if !strings.Contains(output, "Server Version") {
framework.Failf("kubectl in the pod fails to talk to api server")
}
framework.RunKubectlOrDie("delete", "pods", "kubectl-in-pod", nsFlag)
})
})
framework.KubeDescribe("Kubectl api-versions", func() {
It("should check if v1 is in available api versions [Conformance]", func() {
By("validating api verions")

View File

@ -1,26 +0,0 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": "kubectl-in-pod"
},
"spec": {
"containers": [
{
"name": "busybox",
"image": "busybox",
"stdin": true,
"stdinOnce": true,
"tty": true,
"volumeMounts": [{
"mountPath": "/usr/bin/kubectl",
"name": "kubectl"
}]
}
],
"volumes": [{
"name":"kubectl",
"hostPath":{"path": "/usr/bin/kubectl"}
}]
}
}

View File

@ -221,7 +221,6 @@ Kubectl client Kubectl run deployment should create a deployment from an image,j
Kubectl client Kubectl run job should create a job from an image when restart is OnFailure,soltysh,1
Kubectl client Kubectl run pod should create a pod from an image when restart is Never,janetkuo,0
Kubectl client Kubectl run rc should create an rc from an image,janetkuo,0
Kubectl client Kubectl should be able to talk to api server kubectl running in a pod could talk to api server,ymqytw,0
Kubectl client Kubectl taint should remove all the taints with the same key off a node,erictune,1
Kubectl client Kubectl taint should update the taint on a node,pwittrock,0
Kubectl client Kubectl version should check is all data is printed,janetkuo,0

1 name owner auto-assigned
221 Kubectl client Kubectl run job should create a job from an image when restart is OnFailure soltysh 1
222 Kubectl client Kubectl run pod should create a pod from an image when restart is Never janetkuo 0
223 Kubectl client Kubectl run rc should create an rc from an image janetkuo 0
Kubectl client Kubectl should be able to talk to api server kubectl running in a pod could talk to api server ymqytw 0
224 Kubectl client Kubectl taint should remove all the taints with the same key off a node erictune 1
225 Kubectl client Kubectl taint should update the taint on a node pwittrock 0
226 Kubectl client Kubectl version should check is all data is printed janetkuo 0