Change:
needs to be resolved before a number of e2e tests can be completed. 23 Oct 2021 [x] two weeks soak end date : 5 Nov 2021 [x] test promotion pr : kubernetes/kubernetes According to this APIsnoop query, there are still some remaining PodProxyOptions endpoints which are untested. As the these endpoints are redirected to their related endpoints. Create pod and confirm that the pod is running so that the tested endpoints can be found. Create a http.Client that checks for a redirect so that status code can be checked Loop through all http verbs, testing that the pod proxy endpoint returns the required 301 status code. Discover useragents: List endpoints hit by the test: Display endpoint coverage change: If a test with these calls gets merged, test coverage will go up by 7 points This test is also created with the goal of conformance promotion. After the merger of the test was updated to cover both the Pod and Service Proxy endpoint. Therefore If a test with these calls gets merged, test coverage will go up by 12 points connectCoreV1DeleteNamespacedPodProxy connectCoreV1DeleteNamespacedServiceProxy connectCoreV1OptionsNamespacedPodProxy connectCoreV1OptionsNamespacedServiceProxy connectCoreV1PatchNamespacedPodProxy connectCoreV1PatchNamespacedServiceProxy connectCoreV1PostNamespacedPodProxy connectCoreV1PostNamespacedServiceProxy connectCoreV1PutNamespacedPodProxy connectCoreV1PutNamespacedServiceProxy connectCoreV1HeadNamespacedPodProxy onnectCoreV1HeadNamespacedServiceProxy /sig testing /sig architecture /area conformance
/assign
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/remove-lifecycle stale To be revisited in 1.21
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle stale
/remove-lifecycle stale Focus for 1.22
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle stale
/remove-lifecycle stale Focus for 1.23
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue or PR as fresh with Mark this issue or PR as rotten with Close this issue or PR with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle stale [1]:
/remove-lifecycle stale Focus for 1.23 Will move forward once merged
/open Waiting for 2 week flake free before promotion
/reopen
Reopened this issue. <detailsIn response to : /reopen Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/triage accepted

Discussion:
framework.ExpectNoError(err, "Service didn't start within time out period. %v", pollErr) } }) <ins> ginkgo.It("A set of valid responses are returned for both pod and service Proxy", func() { ns := f.Namespace.Name msg := "foo" testSvcName := "e2e-proxy-test-service" testSvcLabels := map[string]string{"e2e-test": "proxy-endpoints"} framework.Logf("Creating pod...") _, err := f.ClientSet.CoreV1().Pods(ns).Create(context.TODO(), &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "agnhost", Labels: map[string]string{ "e2e-test": "proxy-endpoints"}, }, Spec: v1.PodSpec{ Containers: []v1.Container{{ Image:   imageutils.GetE2EImage(imageutils.Agnhost), Name:    "agnhost", Command: []string{"/agnhost", "porter", "--json-response"}, Env: []v1.EnvVar{{ Name:  "SERVE_PORT_80", Value: msg, }}, }}, RestartPolicy: v1.RestartPolicyNever, }}, metav1.CreateOptions{}) framework.ExpectNoError(err, "failed to create pod") err = wait.PollImmediate(podRetryPeriod, podRetryTimeout, checkPodStatus(f, "e2e-test=proxy-endpoints")) framework.ExpectNoError(err, "Pod didn't start within time out period") framework.Logf("Creating service...") _, err = f.ClientSet.CoreV1().Services(ns).Create(context.TODO(), &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name:      testSvcName, Namespace: ns, Labels:    testSvcLabels, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{{ Port:       80, TargetPort: intstr.FromInt(80), Protocol:   v1.ProtocolTCP, }}, Selector: map[string]string{ "e2e-test": "proxy-endpoints", }, }}, metav1.CreateOptions{}) framework.ExpectNoError(err, "Failed to create the service") transportCfg, err := f.ClientConfig().TransportConfig() framework.ExpectNoError(err, "Error creating transportCfg") restTransport, err := transport.New(transportCfg) framework.ExpectNoError(err, "Error creating restTransport") client := &http.Client{ CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, Transport: restTransport, } // All methods for Pod Proxy return 200 // The response body returns 'foo' with the received http method httpVerbs := []string{"DELETE", "OPTIONS", "PATCH", "POST", "PUT"} for _, httpVerb := range httpVerbs { urlString := f.ClientConfig().Host + "/api/v1/namespaces/" + ns + "/pods/agnhost/proxy?method=" + httpVerb framework.Logf("Starting http.Client for %s", urlString) pollErr := wait.PollImmediate(requestRetryPeriod, requestRetryTimeout, validateProxyVerbRequest(client, urlString, httpVerb, msg)) framework.ExpectNoError(pollErr, "Pod didn't start within time out period. %v", pollErr) } // All methods for Service Proxy return 200 // The response body returns 'foo' with the received http method for _, httpVerb := range httpVerbs { urlString := f.ClientConfig().Host + "/api/v1/namespaces/" + ns + "/services/" + testSvcName + "/proxy?method=" + httpVerb framework.Logf("Starting http.Client for %s", urlString) pollErr := wait.PollImmediate(requestRetryPeriod, requestRetryTimeout, validateProxyVerbRequest(client, urlString, httpVerb, msg)) framework.ExpectNoError(pollErr, "Service didn't start within time out period. %v", pollErr) } // Test that each method returns 301 for both pod and service endpoints redirectVerbs := []string{"GET", "HEAD"} for _, redirectVerb := range redirectVerbs { urlString := f.ClientConfig().Host + "/api/v1/namespaces/" + ns + "/pods/agnhost/proxy?method=" + redirectVerb validateRedirectRequest(client, redirectVerb, urlString) urlString = f.ClientConfig().Host + "/api/v1/namespaces/" + ns + "/services/" + testSvcName + "/proxy?method=" + redirectVerb validateRedirectRequest(client, redirectVerb, urlString) } }) </ins> }) }) <ins> func validateRedirectRequest(client *http.Client, redirectVerb string, urlString string) { framework.Logf("Starting http.Client for %s", urlString) request, err := http.NewRequest(redirectVerb, urlString, nil) framework.ExpectNoError(err, "processing request") resp, err := client.Do(request) framework.ExpectNoError(err, "processing response") defer resp.Body.Close() framework.Logf("http.Client request:%s StatusCode:%d", redirectVerb, resp.StatusCode) framework.ExpectEqual(resp.StatusCode, 301, "The resp.StatusCode returned: %d", resp.StatusCode) } </ins> func checkPodStatus(f *framework.Framework, label string) func() (bool, error) { return func() (bool, error) { var err error