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

[COIN-795] Enhance helm2 ARM64 compatibility #3

Merged
merged 7 commits into from
Sep 7, 2023
Merged
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
2 changes: 1 addition & 1 deletion helm/helm-chart-package.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ -n $DIGEST_PATH ] && [ "$DIGEST_PATH" != "" ]; then
IFS=':' read -ra digest_split <<< "$DIGEST"
DIGEST_SHA=${digest_split[1]}

sha=$DIGEST_PATH {YQ_PATH} -i '.{VALUES_TAG_YAML_PATH} = env(sha)' {CHART_VALUES_PATH}
sha=$DIGEST_SHA {YQ_PATH} -i '.{VALUES_TAG_YAML_PATH} = env(sha)' {CHART_VALUES_PATH}

echo "Replaced image tag in chart values.yaml with: $DIGEST_SHA"

Expand Down
7 changes: 7 additions & 0 deletions repositories/helm_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ def helm_repositories():
build_file = "@com_github_masmovil_bazel_rules//:helm.BUILD",
)

http_archive(
name = "helm_v2.17.0_linux_arm64",
sha256 = "c3ebe8fa04b4e235eb7a9ab030a98d3002f93ecb842f0a8741f98383a9493d7f",
urls = ["https://get.helm.sh/helm-v2.17.0-linux-arm64.tar.gz"],
build_file = "@com_github_masmovil_bazel_rules//:helm.BUILD",
)

http_archive(
name = "helm_v3.12.2_darwin",
sha256 = "6e8bfc84a640e0dc47cc49cfc2d0a482f011f4249e2dff2a7e23c7ef2df1b64e",
Expand Down
1 change: 1 addition & 0 deletions repositories/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def repositories():
"@com_github_masmovil_bazel_rules//toolchains/yq:yq_osx_arm64_toolchain",
"@com_github_masmovil_bazel_rules//toolchains/yq:yq_windows_toolchain",
"@com_github_masmovil_bazel_rules//toolchains/helm:helm_v2.17.0_linux_toolchain",
"@com_github_masmovil_bazel_rules//toolchains/helm:helm_v2.17.0_linux_arm64_toolchain",
"@com_github_masmovil_bazel_rules//toolchains/helm:helm_v2.17.0_osx_toolchain",
"@com_github_masmovil_bazel_rules//toolchains/helm-3:helm_v3.12.2_linux_toolchain",
"@com_github_masmovil_bazel_rules//toolchains/helm-3:helm_v3.12.2_linux_arm64_toolchain",
Expand Down
21 changes: 21 additions & 0 deletions toolchains/helm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ helm_toolchain(
visibility = ["//visibility:public"],
)

helm_toolchain(
name = "helm_v2.17.0_linux_arm64",
tool = "@helm_v2.17.0_linux_arm64//:helm",
helm_version = "2.17.0",
visibility = ["//visibility:public"],
)

toolchain(
name = "helm_v2.17.0_linux_toolchain",
exec_compatible_with = [
Expand All @@ -33,6 +40,20 @@ toolchain(
toolchain_type = ":toolchain_type",
)

toolchain(
name = "helm_v2.17.0_linux_arm64_toolchain",
exec_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:arm64",
],
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:arm64",
],
toolchain = ":helm_v2.17.0_linux_arm64",
toolchain_type = ":toolchain_type",
)

toolchain(
name = "helm_v2.17.0_osx_toolchain",
target_compatible_with = [
Expand Down
12 changes: 12 additions & 0 deletions toolchains/kubectl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@ kubectl_toolchain(
visibility = ["//visibility:public"],
)

kubectl_toolchain(
name = "kubectl_darwin_arm64",
tool = "@kubectl_darwin_arm64//file",
visibility = ["//visibility:public"],
)

kubectl_toolchain(
name = "kubectl_linux",
tool = "@kubectl_linux//file",
visibility = ["//visibility:public"],
)

kubectl_toolchain(
name = "kubectl_linux_arm64",
tool = "@kubectl_linux_arm64//file",
visibility = ["//visibility:public"],
)

toolchain(
name = "kubectl_linux_toolchain",
exec_compatible_with = [
Expand Down
Loading