Skip to content

Commit 7685cb1

Browse files
removed generator flag as it is deprecated in recent version of kubectl 1.21+ (#5295)
* removed generator flag as it is deprecated in recent version of kubectl Signed-off-by: laxmikantbpandhare <[email protected]> * modified ENVTEST_K8S_VERSION from Makefile Signed-off-by: laxmikantbpandhare <[email protected]> * modified ENVTEST_K8S_VERSIONto 1.22.1 from Makefile Signed-off-by: laxmikantbpandhare <[email protected]> * modifed version of ENVTEST_K8S_VERSION, the newer version 1.22 deprecated webhook and it was failing Signed-off-by: laxmikantbpandhare <[email protected]> * removed comments Signed-off-by: laxmikantbpandhare <[email protected]>
1 parent 088a74e commit 7685cb1

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export GIT_VERSION = $(shell git describe --dirty --tags --always)
1111
export GIT_COMMIT = $(shell git rev-parse HEAD)
1212
export K8S_VERSION = 1.21
1313
# TODO: bump this to 1.21, after kubectl `--generator` flag is removed from e2e tests.
14-
export ENVTEST_K8S_VERSION = 1.20.2
14+
export ENVTEST_K8S_VERSION = 1.21.1
1515

1616
# Build settings
1717
export TOOLS_DIR = tools/bin

test/e2e/ansible/cluster_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,8 @@ var _ = Describe("Running ansible projects", func() {
263263
Expect(len(token)).To(BeNumerically(">", 0))
264264

265265
By("creating a curl pod")
266-
// TODO: the flag --generator=run-pod/v1 is deprecated, however, shows that besides
267-
// it should not make any difference and work locally successfully when the flag is removed
268-
// the test will fail and the curl pod is not found when the flag is not used
269266
cmdOpts := []string{
270-
"run", "--generator=run-pod/v1", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure",
267+
"run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure",
271268
"--serviceaccount", tc.Kubectl.ServiceAccount, "--",
272269
"curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token),
273270
fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace),

test/e2e/go/cluster_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,8 @@ var _ = Describe("operator-sdk", func() {
136136
Expect(len(token)).To(BeNumerically(">", 0))
137137

138138
By("creating a curl pod")
139-
// TODO: the flag --generator=run-pod/v1 is deprecated, however, shows that besides
140-
// it should not make any difference and work locally successfully when the flag is removed
141-
// the test will fail and the curl pod is not found when the flag is not used
142139
cmdOpts := []string{
143-
"run", "--generator=run-pod/v1", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure",
140+
"run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure",
144141
"--serviceaccount", tc.Kubectl.ServiceAccount, "--",
145142
"curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token),
146143
fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace),

test/e2e/helm/cluster_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,8 @@ var _ = Describe("Running Helm projects", func() {
220220
Expect(len(token)).To(BeNumerically(">", 0))
221221

222222
By("creating a curl pod")
223-
// TODO: the flag --generator=run-pod/v1 is deprecated, however, shows that besides
224-
// it should not make any difference and work locally successfully when the flag is removed
225-
// the test will fail and the curl pod is not found when the flag is not used
226223
cmdOpts := []string{
227-
"run", "--generator=run-pod/v1", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure",
224+
"run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure",
228225
"--serviceaccount", tc.Kubectl.ServiceAccount, "--",
229226
"curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token),
230227
fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace),

0 commit comments

Comments
 (0)