Skip to content

Commit 47d8d67

Browse files
Add additional variable to print k8s version (#5154)
This commit adds an additional variable in Makefile to print K8s version in SDK binary. Signed-off-by: varshaprasad96 <[email protected]>
1 parent 7a43524 commit 47d8d67

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ export IMAGE_VERSION = v1.11.0
99
export SIMPLE_VERSION = $(shell (test "$(shell git describe)" = "$(shell git describe --abbrev=0)" && echo $(shell git describe)) || echo $(shell git describe --abbrev=0)+git)
1010
export GIT_VERSION = $(shell git describe --dirty --tags --always)
1111
export GIT_COMMIT = $(shell git rev-parse HEAD)
12+
export K8S_VERSION = 1.21
1213
# TODO: bump this to 1.21, after kubectl `--generator` flag is removed from e2e tests.
13-
export K8S_VERSION = 1.20.2
14+
export ENVTEST_K8S_VERSION = 1.20.2
1415

1516
# Build settings
1617
export TOOLS_DIR = tools/bin
@@ -146,11 +147,11 @@ e2e_targets := test-e2e $(e2e_tests)
146147
.PHONY: test-e2e-setup
147148
export KIND_CLUSTER := operator-sdk-e2e
148149

149-
export KUBEBUILDER_ASSETS = $(PWD)/$(shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest && $(shell go env GOPATH)/bin/setup-envtest use $(K8S_VERSION) --bin-dir tools/bin/ -p path)
150+
export KUBEBUILDER_ASSETS = $(PWD)/$(shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest && $(shell go env GOPATH)/bin/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir tools/bin/ -p path)
150151
test-e2e-setup: build
151152
$(SCRIPTS_DIR)/fetch kind 0.11.0
152-
$(SCRIPTS_DIR)/fetch kubectl $(K8S_VERSION) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
153-
[[ "`$(TOOLS_DIR)/kind get clusters`" =~ "$(KIND_CLUSTER)" ]] || $(TOOLS_DIR)/kind create cluster --image="kindest/node:v$(K8S_VERSION)" --name $(KIND_CLUSTER)
153+
$(SCRIPTS_DIR)/fetch kubectl $(ENVTEST_K8S_VERSION) # Install kubectl AFTER envtest because envtest includes its own kubectl binary
154+
[[ "`$(TOOLS_DIR)/kind get clusters`" =~ "$(KIND_CLUSTER)" ]] || $(TOOLS_DIR)/kind create cluster --image="kindest/node:v$(ENVTEST_K8S_VERSION)" --name $(KIND_CLUSTER)
154155

155156
.PHONY: test-e2e-teardown
156157
test-e2e-teardown:

0 commit comments

Comments
 (0)