...
1"""
2Name: Local Path Provisioner
3Description: Local Storage Provider
4Repo: https://github.com/rancher/local-path-provisioner
5Release Cadence: Upgrade to every patch version.
6
7Upgrade Steps:
81. Set the `VERSION` variable to the new version.
92. Replace the container image digests (`PROVISIONER_DIGEST`), which can be found by running;
10 bazel run @com_github_google_go_containerregistry//cmd/crane -- digest --platform=linux/amd64 rancher/local-path-provisioner:<VERSION>
113. Update the `PROVISIONER_ARCHIVE_SHA` value; which can be retrieved by running;
12 sha256sum <local-provisioner.tar.gz>
134. Run `just third_party/k8s/rancher-local-storage/update`
14"""
15
16load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17
18VERSION = "0.0.28"
19PROVISIONER_DIGEST = "sha256:cdf9953e88a7afd3674b1203e3179c5be45b7c4f25c1596bb4885519b768601a"
20PROVISIONER_ARCHIVE_SHA = "e57f1845216ea143151d7c565129dcd6bdab9b76c2601b052e4e0c119151438b"
21REPO = "rancher/local-path-provisioner"
22REGISTRY = "index.docker.io"
23
24RANCHER_LOCAL_STORAGE_IMAGES = {
25 "local-path-provisioner": {
26 "TAG": "v{0}".format(VERSION),
27 "DIGEST": PROVISIONER_DIGEST,
28 "REPO": REPO,
29 "REGISTRY": REGISTRY,
30 },
31}
32
33def fetch_rancher_local_storage_manifests():
34 """Returns all http_* targets for the local storage manifest bundles we rely on"""
35
36 http_archive(
37 name = "rancher_local_storage_manifests",
38 build_file_content = """
39package(default_visibility = ["//visibility:public"])
40filegroup(
41 name = "file",
42 srcs = glob(["**"]),
43 visibility = ["//visibility:public"],
44)
45 """,
46 strip_prefix = "local-path-provisioner-{0}/deploy".format(VERSION),
47 sha256 = PROVISIONER_ARCHIVE_SHA,
48 urls = ["https://github.com/rancher/local-path-provisioner/archive/refs/tags/v{version}.tar.gz".format(
49 version = VERSION,
50 )],
51 )
View as plain text