Skip to content

Commit f3c4028

Browse files
authored
RHOAIENG-16149: chore(Makefile) download arch-appropriate version of kubectl (#779)
1 parent c8e181a commit f3c4028

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ else
1616
WHERE_WHICH ?= which
1717
endif
1818

19+
# linux/amd64 or darwin/arm64
20+
OS_ARCH=$(shell go env GOOS)/$(shell go env GOARCH)
21+
1922
IMAGE_TAG ?= $(RELEASE)_$(DATE)
2023
KUBECTL_BIN ?= bin/kubectl
2124
KUBECTL_VERSION ?= v1.23.11
@@ -404,7 +407,7 @@ rocm-runtime-tensorflow-ubi9-python-3.11: rocm-ubi9-python-3.11
404407
bin/kubectl:
405408
ifeq (,$(wildcard $(KUBECTL_BIN)))
406409
@mkdir -p bin
407-
@curl -sSL https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/amd64/kubectl > \
410+
@curl -sSL https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OS_ARCH)/kubectl > \
408411
$(KUBECTL_BIN)
409412
@chmod +x $(KUBECTL_BIN)
410413
endif

0 commit comments

Comments
 (0)