Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Added toolchain support for Apple M1 and made toolchain_type public t…
Browse files Browse the repository at this point in the history
…o allow extensions (#697)
  • Loading branch information
lomeshpatel authored May 16, 2022
1 parent 8db1759 commit 64268c4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion k8s/k8s.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def k8s_repositories():
"@io_bazel_rules_k8s//toolchains/kubectl:kubectl_linux_amd64_toolchain",
"@io_bazel_rules_k8s//toolchains/kubectl:kubectl_linux_arm64_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_macos_x86_64_toolchain",
"@io_bazel_rules_k8s//toolchains/kubectl:kubectl_macos_arm64_toolchain",
"@io_bazel_rules_k8s//toolchains/kubectl:kubectl_windows_toolchain",
)

Expand Down
21 changes: 18 additions & 3 deletions toolchains/kubectl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

load(":kubectl_toolchain.bzl", "kubectl_toolchain")

package(default_visibility = ["//visibility:private"])
package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

Expand Down Expand Up @@ -63,15 +63,30 @@ toolchain(
)

toolchain(
name = "kubectl_osx_toolchain",
name = "kubectl_macos_x86_64_toolchain",
target_compatible_with = [
"@platforms//os:osx",
"@platforms//os:macos",
"@platforms//cpu:x86_64",
],
toolchain = "@k8s_config//:toolchain",
toolchain_type = ":toolchain_type",
)

alias(
name = "kubectl_osx_toolchain",
actual = ":kubectl_macos_x86_64_toolchain",
)

toolchain(
name = "kubectl_macos_arm64_toolchain",
target_compatible_with = [
"@platforms//os:macos",
"@platforms//cpu:arm64",
],
toolchain = "@k8s_config//:toolchain",
toolchain_type = ":toolchain_type",
)

toolchain(
name = "kubectl_windows_toolchain",
target_compatible_with = [
Expand Down

0 comments on commit 64268c4

Please sign in to comment.