diff --git a/k8s/k8s.bzl b/k8s/k8s.bzl index b65cda00..2470bda1 100644 --- a/k8s/k8s.bzl +++ b/k8s/k8s.bzl @@ -57,7 +57,8 @@ py_library( native.register_toolchains( "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_linux_amd64_toolchain", "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_linux_s390x_toolchain", - "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_osx_toolchain", + "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_osx_amd64_toolchain", + "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_osx_arm64_toolchain", "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_windows_toolchain", ) if "io_bazel_rules_go" not in excludes: diff --git a/toolchains/kubectl/BUILD b/toolchains/kubectl/BUILD index 744849e2..b5295976 100644 --- a/toolchains/kubectl/BUILD +++ b/toolchains/kubectl/BUILD @@ -53,7 +53,7 @@ toolchain( ) toolchain( - name = "kubectl_osx_toolchain", + name = "kubectl_osx_amd64_toolchain", target_compatible_with = [ "@bazel_tools//platforms:osx", "@bazel_tools//platforms:x86_64", @@ -62,6 +62,16 @@ toolchain( toolchain_type = ":toolchain_type", ) +toolchain( + name = "kubectl_osx_arm64_toolchain", + target_compatible_with = [ + "@bazel_tools//platforms:osx", + "@bazel_tools//platforms:aarch64", + ], + toolchain = "@k8s_config//:toolchain", + toolchain_type = ":toolchain_type", +) + toolchain( name = "kubectl_windows_toolchain", target_compatible_with = [ diff --git a/toolchains/kubectl/README.md b/toolchains/kubectl/README.md index 3685bf68..8e20eb4d 100644 --- a/toolchains/kubectl/README.md +++ b/toolchains/kubectl/README.md @@ -175,7 +175,8 @@ Register the toolchains exported by this repository in your WORKSPACE and add a register_toolchains( "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_linux_amd64_toolchain", "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_linux_s390x_toolchain", - "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_osx_toolchain", + "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_osx_amd64_toolchain", + "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_osx_arm64_toolchain", "@io_bazel_rules_k8s//toolchains/kubectl:kubectl_windows_toolchain", )