Skip to content

Commit

Permalink
Add support for running Kustomize on Linux ARM64 (#176)
Browse files Browse the repository at this point in the history
Add support for kustomize to run on Linux ARM64
  • Loading branch information
ysinjab authored Jun 4, 2024
1 parent 93544cc commit fa05503
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion skylib/kustomize/kustomize.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ load("//skylib:stamp.bzl", "stamp")
_binaries = {
"darwin_amd64": ("https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.3/kustomize_v4.5.3_darwin_amd64.tar.gz", "b0a6b0568273d466abd7cd535c556e44aa9ff5f54c07e86ed9f3016b416de992"),
"linux_amd64": ("https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.3/kustomize_v4.5.3_linux_amd64.tar.gz", "e4dc2f795235b03a2e6b12c3863c44abe81338c5c0054b29baf27dcc734ae693"),
"linux_arm64": ("https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.3/kustomize_v4.5.3_linux_arm64.tar.gz", "97cf7d53214388b1ff2177a56404445f02d8afacb9421339c878c5ac2c8bc2c8"),
}

def _download_binary_impl(ctx):
if ctx.os.name == "linux":
platform = "linux_amd64"
current_architecture = ctx.execute(["uname", "-m"]).stdout.strip()
if current_architecture == "aarch64":
platform = "linux_arm64"
else:
platform = "linux_amd64"
elif ctx.os.name == "mac os x":
platform = "darwin_amd64"
else:
Expand Down

0 comments on commit fa05503

Please sign in to comment.