Skip to content

Commit fa05503

Browse files
authored
Add support for running Kustomize on Linux ARM64 (#176)
Add support for kustomize to run on Linux ARM64
1 parent 93544cc commit fa05503

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

skylib/kustomize/kustomize.bzl

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ load("//skylib:stamp.bzl", "stamp")
1818
_binaries = {
1919
"darwin_amd64": ("https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.3/kustomize_v4.5.3_darwin_amd64.tar.gz", "b0a6b0568273d466abd7cd535c556e44aa9ff5f54c07e86ed9f3016b416de992"),
2020
"linux_amd64": ("https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.3/kustomize_v4.5.3_linux_amd64.tar.gz", "e4dc2f795235b03a2e6b12c3863c44abe81338c5c0054b29baf27dcc734ae693"),
21+
"linux_arm64": ("https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.3/kustomize_v4.5.3_linux_arm64.tar.gz", "97cf7d53214388b1ff2177a56404445f02d8afacb9421339c878c5ac2c8bc2c8"),
2122
}
2223

2324
def _download_binary_impl(ctx):
2425
if ctx.os.name == "linux":
25-
platform = "linux_amd64"
26+
current_architecture = ctx.execute(["uname", "-m"]).stdout.strip()
27+
if current_architecture == "aarch64":
28+
platform = "linux_arm64"
29+
else:
30+
platform = "linux_amd64"
2631
elif ctx.os.name == "mac os x":
2732
platform = "darwin_amd64"
2833
else:

0 commit comments

Comments
 (0)