"""fetches linkerd manifests (helm chart)""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load(":version.bzl", "RELEASE_CHECKSUM", "VERSION") def fetch_linkerd_manifests(): """Returns all http_* targets for linkerd manifest bundles we rely on""" http_archive( name = "linkerd_manifests", build_file_content = """ package(default_visibility = ["//visibility:public"]) filegroup( name = "file", srcs = glob(["**"]), visibility = ["//visibility:public"], ) """.format(VERSION), strip_prefix = "linkerd2-{0}".format(VERSION), sha256 = RELEASE_CHECKSUM, urls = ["https://github.com/linkerd/linkerd2/archive/refs/tags/{version}.tar.gz".format( version = VERSION, )], ) http_archive( name = "linkerd_helm_chart", build_file_content = """ package(default_visibility = ["//visibility:public"]) load("@rules_pkg//:pkg.bzl", "pkg_tar") load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix") pkg_files( name = "crd_chart_files", strip_prefix = "charts/linkerd-crds/", srcs = glob(["charts/linkerd-crds/**"]), ) pkg_files( name = "partials_chart_files", strip_prefix = "charts/partials/", srcs = glob(["charts/partials/**"]), ) pkg_tar( name = "crd_file", extension = "tar.gz", strip_prefix = ".", package_dir = "/linkerd-crds", srcs = [":crd_chart_files", ":partials_chart_files"], ) pkg_files( name = "crd_chart_values", strip_prefix = "charts/linkerd-crds/", srcs = glob(["charts/linkerd-crds/values.yaml"]), ) """.format(VERSION), strip_prefix = "linkerd2-{0}/".format(VERSION), sha256 = RELEASE_CHECKSUM, urls = ["https://github.com/linkerd/linkerd2/archive/refs/tags/{version}.tar.gz".format( version = VERSION, )], )