diff --git a/Makefile b/Makefile index 3e8524b0471..159e41505ee 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ export GIT_VERSION = $(shell git describe --dirty --tags --always) export GIT_COMMIT = $(shell git rev-parse HEAD) export K8S_VERSION = 1.21 # TODO: bump this to 1.21, after kubectl `--generator` flag is removed from e2e tests. -export ENVTEST_K8S_VERSION = 1.20.2 +export ENVTEST_K8S_VERSION = 1.21.1 # Build settings export TOOLS_DIR = tools/bin diff --git a/test/e2e/ansible/cluster_test.go b/test/e2e/ansible/cluster_test.go index c7058bec24d..46e6e38b142 100644 --- a/test/e2e/ansible/cluster_test.go +++ b/test/e2e/ansible/cluster_test.go @@ -263,11 +263,8 @@ var _ = Describe("Running ansible projects", func() { Expect(len(token)).To(BeNumerically(">", 0)) By("creating a curl pod") - // TODO: the flag --generator=run-pod/v1 is deprecated, however, shows that besides - // it should not make any difference and work locally successfully when the flag is removed - // the test will fail and the curl pod is not found when the flag is not used cmdOpts := []string{ - "run", "--generator=run-pod/v1", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", + "run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--serviceaccount", tc.Kubectl.ServiceAccount, "--", "curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token), fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace), diff --git a/test/e2e/go/cluster_test.go b/test/e2e/go/cluster_test.go index 0dba7e7826f..b21307c22c9 100644 --- a/test/e2e/go/cluster_test.go +++ b/test/e2e/go/cluster_test.go @@ -136,11 +136,8 @@ var _ = Describe("operator-sdk", func() { Expect(len(token)).To(BeNumerically(">", 0)) By("creating a curl pod") - // TODO: the flag --generator=run-pod/v1 is deprecated, however, shows that besides - // it should not make any difference and work locally successfully when the flag is removed - // the test will fail and the curl pod is not found when the flag is not used cmdOpts := []string{ - "run", "--generator=run-pod/v1", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", + "run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--serviceaccount", tc.Kubectl.ServiceAccount, "--", "curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token), fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace), diff --git a/test/e2e/helm/cluster_test.go b/test/e2e/helm/cluster_test.go index f9bb2ab585f..5ae11ecbcc7 100644 --- a/test/e2e/helm/cluster_test.go +++ b/test/e2e/helm/cluster_test.go @@ -220,11 +220,8 @@ var _ = Describe("Running Helm projects", func() { Expect(len(token)).To(BeNumerically(">", 0)) By("creating a curl pod") - // TODO: the flag --generator=run-pod/v1 is deprecated, however, shows that besides - // it should not make any difference and work locally successfully when the flag is removed - // the test will fail and the curl pod is not found when the flag is not used cmdOpts := []string{ - "run", "--generator=run-pod/v1", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", + "run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--serviceaccount", tc.Kubectl.ServiceAccount, "--", "curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token), fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace),