...
1load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
2load("@rules_pkg//:pkg.bzl", "pkg_tar")
3load("//hack/build/rules/container:index.bzl", "container_push")
4
5# TODO: should be rootless
6
7pkg_tar(
8 name = "kubectl_tar",
9 files = {
10 "//hack/tools:kubectl": "kubectl",
11 },
12 mode = "755",
13 package_dir = "/usr/local/bin",
14 tags = ["manual"],
15)
16
17oci_image(
18 name = "container",
19 base = "@alpine_3_20",
20 tags = ["manual"],
21 tars = [
22 ":kubectl_tar",
23 ],
24)
25
26oci_load(
27 name = "kubectl-oci-tar",
28 image = ":container",
29 repo_tags = ["latest"],
30 tags = ["manual"],
31)
32
33container_push(
34 image = ":container",
35 image_name = "alpine_kubectl",
36 repository_file = "//hack/build/rules/container:workloads-repo",
37 tags = ["manual"],
38)
View as plain text