forked from kubernetes/kops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
77 lines (71 loc) · 2.08 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_image",
"container_bundle",
)
container_image(
name = "dns-controller",
base = "@debian_hyperkube_base_amd64//image",
cmd = ["/usr/bin/dns-controller"],
directory = "/usr/bin/",
files = [
"//dns-controller/cmd/dns-controller",
],
)
load("@package_bundle//file:packages.bzl", "packages")
container_image(
name = "protokube-image",
base = "@debian_hyperkube_base_amd64//image",
cmd = ["/usr/bin/protokube"],
# Packages needed:
# ca-certificates: Needed to talk to EC2 API (in base)
# e2fsprogs: Needed to mount / format ext4 filesytems (in base)
# systemd: needed to start kubelet
# TODO: Replace systemd with direct calls, or chroot into rootfs
debs = [
packages["cgmanager"],
packages["dbus"],
packages["libapparmor1"],
packages["libcgmanager0"],
packages["libcryptsetup4"],
packages["libdbus-1-3"],
packages["libnih-dbus1"],
packages["libnih1"],
packages["libpam-systemd"],
packages["libprocps6"],
packages["libseccomp2"],
packages["procps"],
packages["systemd-shim"],
packages["systemd"],
],
files = [
"//channels/cmd/channels",
"//protokube/cmd/protokube",
],
# Cannot use directory with packages or they get installed with
# directory as the root.
# directory = "/usr/bin/",
# TODO: figure out if there's a way to add files
# to actual /usr/bin while using debs above.
symlinks = {
"/usr/bin/channels": "/channels",
"/usr/bin/protokube": "/protokube",
},
)
container_bundle(
name = "protokube",
images = {
"protokube:{PROTOKUBE_TAG}": "protokube-image",
},
stamp = True,
)
container_image(
name = "kube-discovery",
base = "@debian_hyperkube_base_amd64//image",
cmd = ["/usr/bin/kube-discovery"],
directory = "/usr/bin/",
files = [
"//kube-discovery/cmd/kube-discovery",
],
)