...
1"""fetches linkerd manifests (helm chart)"""
2
3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4load(":version.bzl", "RELEASE_CHECKSUM", "VERSION")
5
6def fetch_linkerd_manifests():
7 """Returns all http_* targets for linkerd manifest bundles we rely on"""
8
9 http_archive(
10 name = "linkerd_manifests",
11 build_file_content = """
12package(default_visibility = ["//visibility:public"])
13filegroup(
14 name = "file",
15 srcs = glob(["**"]),
16 visibility = ["//visibility:public"],
17)
18 """.format(VERSION),
19 strip_prefix = "linkerd2-{0}".format(VERSION),
20 sha256 = RELEASE_CHECKSUM,
21 urls = ["https://github.com/linkerd/linkerd2/archive/refs/tags/{version}.tar.gz".format(
22 version = VERSION,
23 )],
24 )
25
26 http_archive(
27 name = "linkerd_helm_chart",
28 build_file_content = """
29package(default_visibility = ["//visibility:public"])
30load("@rules_pkg//:pkg.bzl", "pkg_tar")
31load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
32pkg_files(
33 name = "crd_chart_files",
34 strip_prefix = "charts/linkerd-crds/",
35 srcs = glob(["charts/linkerd-crds/**"]),
36)
37pkg_files(
38 name = "partials_chart_files",
39 strip_prefix = "charts/partials/",
40 srcs = glob(["charts/partials/**"]),
41)
42pkg_tar(
43 name = "crd_file",
44 extension = "tar.gz",
45 strip_prefix = ".",
46 package_dir = "/linkerd-crds",
47 srcs = [":crd_chart_files", ":partials_chart_files"],
48)
49pkg_files(
50 name = "crd_chart_values",
51 strip_prefix = "charts/linkerd-crds/",
52 srcs = glob(["charts/linkerd-crds/values.yaml"]),
53)
54 """.format(VERSION),
55 strip_prefix = "linkerd2-{0}/".format(VERSION),
56 sha256 = RELEASE_CHECKSUM,
57 urls = ["https://github.com/linkerd/linkerd2/archive/refs/tags/{version}.tar.gz".format(
58 version = VERSION,
59 )],
60 )
View as plain text