Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: support tools target for arm64 #574

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/tools
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
golangci-lint v1.61.0
controller-gen v0.16.2
kustomize v4.5.2
oc v4.8.11
oc v4.16.10
operator-sdk v1.36.1
opm v1.47.0
promq v0.0.1
Expand All @@ -13,4 +13,4 @@ jsonnetfmt v0.20.0
jsonnet-lint v0.20.0
jb v0.5.1
gojsontoyaml v0.1.0
shellcheck 0.10.0
shellcheck v0.10.0
26 changes: 12 additions & 14 deletions Makefile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PROMQ_VERSION = v0.0.1

# NOTE: oc is NOT downloadable using the OC_VERSION in its URL, so this has to be manually updated
OC = $(TOOLS_DIR)/oc
OC_VERSION = v4.8.11
OC_VERSION = 4.16.10

CRDOC = $(TOOLS_DIR)/crdoc
CRDOC_VERSION = v0.5.2
Expand Down Expand Up @@ -125,12 +125,11 @@ $(OC) oc: $(TOOLS_DIR)
set -ex ;\
[[ -f $(OC) ]] && exit 0 ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
curl -sSLo $(OC) https://mirror.openshift.com/pub/openshift-v4/$${ARCH}/clients/oc/latest/$${OS}/oc.tar.gz ;\
tar -xf $(TOOLS_DIR)/oc -C $(TOOLS_DIR) ;\
rm -f $(TOOLS_DIR)/README.md ;\
$(OC) version ;\
version=$(OC_VERSION) ;\
$(OC) version | grep -q $${version##v} ;\
if [[ $${OS} == "darwin" ]]; then OS="mac"; fi ;\
curl -sSLo $(OC).tar.gz https://mirror.openshift.com/pub/openshift-v4/$${ARCH}/clients/ocp/stable-$$(echo $(OC_VERSION) | cut -d. -f1,2)/openshift-client-$${OS}.tar.gz ;\
tar -xf $(OC).tar.gz -C $(TOOLS_DIR) ;\
rm -f $(OC).tar.gz ;\
rm -f $(TOOLS_DIR)/-.md ;\
}

.PHONY: crdoc
Expand Down Expand Up @@ -189,11 +188,10 @@ $(SHELLCHECK) shellcheck: $(TOOLS_DIR)
[[ -f $(SHELLCHECK) ]] && exit 0 ;\
cd $$(mktemp -d) ;\
OS=$(shell go env GOOS) && ARCH=$(shell uname -m) && \
curl -sSLo shellcheck-stable.tar.xz https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.$${OS}.$${ARCH}.tar.xz ;\
tar -xJf shellcheck-stable.tar.xz ;\
cp shellcheck-stable/shellcheck $(SHELLCHECK) ;\
version=$(SHELLCHECK_VERSION) ;\
jan--f marked this conversation as resolved.
Show resolved Hide resolved
$(SHELLCHECK) -V | grep -q $${version##v} ;\
if [[ "$$OS" == "darwin" && "$$ARCH" == "arm64" ]]; then ARCH="aarch64"; fi ;\
curl -sSLo shellcheck.tar.xz https://github.com/koalaman/shellcheck/releases/download/v$(SHELLCHECK_VERSION)/shellcheck-v$(SHELLCHECK_VERSION).$${OS}.$${ARCH}.tar.xz ;\
tar -xJf shellcheck.tar.xz ;\
cp shellcheck-v$(SHELLCHECK_VERSION)/shellcheck $(SHELLCHECK) ;\
}

.PHONY: jsonnet-tools
Expand All @@ -219,7 +217,7 @@ tools: $(CONTROLLER_GEN) \
echo $$(basename $(GOLANGCI_LINT)) $(GOLANGCI_LINT_VERSION) >> $$tools_file ;\
echo $$(basename $(CONTROLLER_GEN)) $(CONTROLLER_GEN_VERSION) >> $$tools_file ;\
echo $$(basename $(KUSTOMIZE)) $(KUSTOMIZE_VERSION) >> $$tools_file ;\
echo $$(basename $(OC)) $(OC_VERSION) >> $$tools_file ;\
echo $$(basename $(OC)) v$(OC_VERSION) >> $$tools_file ;\
echo $$(basename $(OPERATOR_SDK)) $(OPERATOR_SDK_VERSION) >> $$tools_file ;\
echo $$(basename $(OPM)) $(OPM_VERSION) >> $$tools_file ;\
echo $$(basename $(PROMQ)) $(PROMQ_VERSION) >> $$tools_file ;\
Expand All @@ -229,7 +227,7 @@ tools: $(CONTROLLER_GEN) \
echo $$(basename $(JSONNET_LINT)) $(JSONNET_VERSION) >> $$tools_file ;\
echo $$(basename $(JB)) $(JB_VERSION) >> $$tools_file ;\
echo $$(basename $(GOJSONTOYAML)) $(GOJSONTOYAML_VERSION) >> $$tools_file ;\
echo $$(basename $(SHELLCHECK)) $(SHELLCHECK_VERSION) >> $$tools_file ;\
echo $$(basename $(SHELLCHECK)) v$(SHELLCHECK_VERSION) >> $$tools_file ;\
}

.PHONY: clean-tools
Expand Down
2 changes: 2 additions & 0 deletions hack/kind/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."local-registry:30000"]
endpoint = ["http://10.96.223.192:30000"]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
nodes:
- role: control-plane
image: kindest/node:v1.24.0
Expand Down
Loading