From 416198cd682b08f6e0ee84437da48efe97bb7369 Mon Sep 17 00:00:00 2001 From: laxmikantbpandhare Date: Thu, 7 Oct 2021 22:48:20 -0700 Subject: [PATCH 1/5] removed generator flag as it is deprecated in recent version of kubectl Signed-off-by: laxmikantbpandhare --- Makefile | 2 +- test/e2e/ansible/cluster_test.go | 3 +-- test/e2e/go/cluster_test.go | 3 +-- test/e2e/helm/cluster_test.go | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 3e8524b0471..007a9492002 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.22.2 # 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..17b081f808b 100644 --- a/test/e2e/ansible/cluster_test.go +++ b/test/e2e/ansible/cluster_test.go @@ -263,11 +263,10 @@ 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..b18690c7ffa 100644 --- a/test/e2e/go/cluster_test.go +++ b/test/e2e/go/cluster_test.go @@ -136,11 +136,10 @@ 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..e879b1d9c5a 100644 --- a/test/e2e/helm/cluster_test.go +++ b/test/e2e/helm/cluster_test.go @@ -220,11 +220,10 @@ 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), From 0062c0859849941777a306a2791abb6564b417a4 Mon Sep 17 00:00:00 2001 From: laxmikantbpandhare Date: Thu, 7 Oct 2021 22:57:37 -0700 Subject: [PATCH 2/5] modified ENVTEST_K8S_VERSION from Makefile Signed-off-by: laxmikantbpandhare --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 007a9492002..60744ee826f 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.22.2 +export ENVTEST_K8S_VERSION = 1.21.0 # Build settings export TOOLS_DIR = tools/bin From 0e0a3d90fac26f6974fd8bf88051aacdfa54e119 Mon Sep 17 00:00:00 2001 From: laxmikantbpandhare Date: Thu, 7 Oct 2021 23:31:00 -0700 Subject: [PATCH 3/5] modified ENVTEST_K8S_VERSIONto 1.22.1 from Makefile Signed-off-by: laxmikantbpandhare --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 60744ee826f..63a2735538d 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.21.0 +export ENVTEST_K8S_VERSION = 1.22.1 # Build settings export TOOLS_DIR = tools/bin From eb5ee4f29c11c547a7fe876b2449e620a74a78cd Mon Sep 17 00:00:00 2001 From: laxmikantbpandhare Date: Mon, 11 Oct 2021 15:02:08 -0700 Subject: [PATCH 4/5] modifed version of ENVTEST_K8S_VERSION, the newer version 1.22 deprecated webhook and it was failing Signed-off-by: laxmikantbpandhare --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 63a2735538d..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.22.1 +export ENVTEST_K8S_VERSION = 1.21.1 # Build settings export TOOLS_DIR = tools/bin From 45203357ec88a28e5e9aca6a6f46f2b4d33560cf Mon Sep 17 00:00:00 2001 From: laxmikantbpandhare Date: Mon, 11 Oct 2021 15:04:16 -0700 Subject: [PATCH 5/5] removed comments Signed-off-by: laxmikantbpandhare --- test/e2e/ansible/cluster_test.go | 2 -- test/e2e/go/cluster_test.go | 2 -- test/e2e/helm/cluster_test.go | 2 -- 3 files changed, 6 deletions(-) diff --git a/test/e2e/ansible/cluster_test.go b/test/e2e/ansible/cluster_test.go index 17b081f808b..46e6e38b142 100644 --- a/test/e2e/ansible/cluster_test.go +++ b/test/e2e/ansible/cluster_test.go @@ -263,8 +263,6 @@ var _ = Describe("Running ansible projects", func() { Expect(len(token)).To(BeNumerically(">", 0)) By("creating a curl pod") - // 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", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--serviceaccount", tc.Kubectl.ServiceAccount, "--", diff --git a/test/e2e/go/cluster_test.go b/test/e2e/go/cluster_test.go index b18690c7ffa..b21307c22c9 100644 --- a/test/e2e/go/cluster_test.go +++ b/test/e2e/go/cluster_test.go @@ -136,8 +136,6 @@ var _ = Describe("operator-sdk", func() { Expect(len(token)).To(BeNumerically(">", 0)) By("creating a curl pod") - // 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", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--serviceaccount", tc.Kubectl.ServiceAccount, "--", diff --git a/test/e2e/helm/cluster_test.go b/test/e2e/helm/cluster_test.go index e879b1d9c5a..5ae11ecbcc7 100644 --- a/test/e2e/helm/cluster_test.go +++ b/test/e2e/helm/cluster_test.go @@ -220,8 +220,6 @@ var _ = Describe("Running Helm projects", func() { Expect(len(token)).To(BeNumerically(">", 0)) By("creating a curl pod") - // 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", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--serviceaccount", tc.Kubectl.ServiceAccount, "--",