This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
WORKSPACE
261 lines (213 loc) · 9.23 KB
/
WORKSPACE
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
sha256 = "7904dbecbaffd068651916dce77ff3437679f9d20e1a7956bff43826e7645fcc",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.25.1/rules_go-v0.25.1.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.25.1/rules_go-v0.25.1.tar.gz",
],
)
http_archive(
name = "bazel_gazelle",
sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains(
go_version = "1.15.7",
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
gazelle_dependencies()
#=============================================================================
http_archive(
name = "io_bazel_rules_docker",
sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
strip_prefix = "rules_docker-0.14.4",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.14.4/rules_docker-v0.14.4.tar.gz"],
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
container_deps()
load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
pip_deps()
# Note: We can't (easily) use distroless because we need: fsck, blkid, mount, others? to mount disks
# We also have to use debian-hyperkube-base because we need nsenter / fsck
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_pull",
)
container_pull(
name = "debian-hyperkube-base-amd64",
architecture = "amd64",
digest = "sha256:5d4ea2fb5fbe9a9a9da74f67cf2faefc881968bc39f2ac5d62d9167e575812a1",
registry = "k8s.gcr.io",
repository = "debian-hyperkube-base",
tag = "0.12.1", # ignored, but kept here for documentation
)
container_pull(
name = "debian-hyperkube-base-arm64",
architecture = "arm64",
digest = "sha256:78eeb1a31eef7c16f954444d64636d939d89307e752964ad6d9d06966c722da3",
registry = "k8s.gcr.io",
repository = "debian-hyperkube-base",
tag = "0.12.1", # ignored, but kept here for documentation
)
#=============================================================================
# etcd rules
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
# We build etcd 2.2 from source, because the released version has some critical problems,
# particularly visible around caching of /etc/hosts
#http_file(
# name = "etcd_2.2.1_tar",
# sha256 = "59f7985c81b6bc551246c165c2fd83e33a063875e4e0c61920b1d90a4910f462",
# urls = ["https://github.com/coreos/etcd/releases/download/v2.2.1/etcd-v2.2.1-linux-amd64.tar.gz"],
#)
http_file(
name = "etcd_3.1.12_amd64_tar",
sha256 = "4b22184bef1bba8b4908b14bae6af4a6d33ec2b91e4f7a240780e07fa43f2111",
urls = ["https://github.com/coreos/etcd/releases/download/v3.1.12/etcd-v3.1.12-linux-amd64.tar.gz"],
)
# 3.1.12 was not released for arm64
#http_file(
# name = "etcd_3.1.12_arm64_tar",
# sha256 = "4b22184bef1bba8b4908b14bae6af4a6d33ec2b91e4f7a240780e07fa43f2123",
# urls = ["https://github.com/coreos/etcd/releases/download/v3.1.12/etcd-v3.1.12-linux-arm64.tar.gz"],
#)
http_file(
name = "etcd_3.2.18_amd64_tar",
sha256 = "b729db0732448064271ea6fdcb901773c4fe917763ca07776f22d0e5e0bd4097",
urls = ["https://github.com/coreos/etcd/releases/download/v3.2.18/etcd-v3.2.18-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.2.18_arm64_tar",
sha256 = "085c13764af02ca2762cbacade374583a532d4f75a7b996a62f67f8f044641e6",
urls = ["https://github.com/coreos/etcd/releases/download/v3.2.18/etcd-v3.2.18-linux-arm64.tar.gz"],
)
http_file(
name = "etcd_3.2.24_amd64_tar",
sha256 = "947849dbcfa13927c81236fb76a7c01d587bbab42ab1e807184cd91b026ebed7",
urls = ["https://github.com/coreos/etcd/releases/download/v3.2.24/etcd-v3.2.24-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.2.24_arm64_tar",
sha256 = "7d3db622fb8d22a669a9351e1002ed2a7a776004a4a35888734bf39323889390",
urls = ["https://github.com/coreos/etcd/releases/download/v3.2.24/etcd-v3.2.24-linux-arm64.tar.gz"],
)
http_file(
name = "etcd_3.3.10_amd64_tar",
sha256 = "1620a59150ec0a0124a65540e23891243feb2d9a628092fb1edcc23974724a45",
urls = ["https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.3.10_arm64_tar",
sha256 = "5ec97b0b872adce275b8130d19db314f7f2b803aeb24c4aae17a19e2d66853c4",
urls = ["https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-arm64.tar.gz"],
)
http_file(
name = "etcd_3.3.13_amd64_tar",
sha256 = "2c2e2a9867c1c61697ea0d8c0f74c7e9f1b1cf53b75dff95ca3bc03feb19ea7e",
urls = ["https://github.com/coreos/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.3.13_arm64_tar",
sha256 = "ff76e534db8378f112b48c445944069fc9923bef04dae4d66e36801da13cc8a1",
urls = ["https://github.com/coreos/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-arm64.tar.gz"],
)
http_file(
name = "etcd_3.3.17_amd64_tar",
sha256 = "8c1168a24d17a2d6772f8148ea35d4f3398c51f1e23db90c849d506adb387060",
urls = ["https://github.com/coreos/etcd/releases/download/v3.3.17/etcd-v3.3.17-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.3.17_arm64_tar",
sha256 = "0ea20dfbf3085f584f788287fd398979d0f1271549be6497d81ec635b9b4c121",
urls = ["https://github.com/coreos/etcd/releases/download/v3.3.17/etcd-v3.3.17-linux-arm64.tar.gz"],
)
http_file(
name = "etcd_3.4.3_amd64_tar",
sha256 = "6c642b723a86941b99753dff6c00b26d3b033209b15ee33325dc8e7f4cd68f07",
urls = ["https://github.com/coreos/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.4.3_arm64_tar",
sha256 = "01bd849ad99693600bd59db8d0e66ac64aac1e3801900665c31bd393972e3554",
urls = ["https://github.com/coreos/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-arm64.tar.gz"],
)
http_file(
name = "etcd_3.4.13_amd64_tar",
sha256 = "2ac029e47bab752dacdb7b30032f230f49e2f457cbc32e8f555c2210bb5ff107",
urls = ["https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-amd64.tar.gz"],
)
http_file(
name = "etcd_3.4.13_arm64_tar",
sha256 = "1934ebb9f9f6501f706111b78e5e321a7ff8d7792d3d96a76e2d01874e42a300",
urls = ["https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-arm64.tar.gz"],
)
#=============================================================================
# Build etcd from source
# This picks up a number of critical bug fixes, for example:
# * Caching of /etc/hosts https://github.com/golang/go/issues/13340
# * General GC etc improvements
# * Misc security fixes that are not backported
# Download via HTTP
go_repository(
name = "etcd_v2_2_1_source",
urls = ["https://github.com/etcd-io/etcd/archive/v2.2.1.tar.gz"],
sha256 = "1c0ce63812ef951f79c0a544c91f9f1ba3c6b50cb3e8197de555732454864d05",
importpath = "github.com/coreos/etcd",
strip_prefix = "etcd-2.2.1/",
build_external = "vendored",
build_file_name = "BUILD.bazel", # See https://github.com/bazelbuild/rules_go/issues/456
build_file_proto_mode = "disable_global",
)
#=============================================================================
http_file(
name = "debian_packages_gz_amd64",
sha256 = "369d45f6c138af98d8ea8a598564dcabc1f6991ac777fb2d351e846f195cdc13",
urls = ["http://snapshot.debian.org/archive/debian/20201101T154040Z/dists/buster/main/binary-amd64/Packages.gz"],
)
http_file(
name = "debian_packages_gz_arm64",
sha256 = "62a7e0c34f45a2524024ef4871e48f061f8d57d54e6f9d75d2aa2bff55ca91b8",
urls = ["http://snapshot.debian.org/archive/debian/20201101T154040Z/dists/buster/main/binary-arm64/Packages.gz"],
)
container_pull(
name = "distroless-base-amd64",
architecture = "amd64",
digest = "sha256:3d0daa49182f9eb6796e8f5e47387e11d3b61e8c118e6fffedfa5fdc6e353cc4",
registry = "gcr.io/distroless",
repository = "base-debian10",
)
container_pull(
name = "distroless-base-amd64-debug",
architecture = "amd64",
digest = "sha256:bc7547acdc118fdbb9516e11988ef391151aa367f63d748a7997640f624d7495",
registry = "gcr.io/distroless",
repository = "base-debian10",
)
container_pull(
name = "distroless-base-arm64",
architecture = "arm64",
digest = "sha256:7c6c26ae988a6e2fcbdddd798644245c6effd9e6375ec2679599d71cdffc3e02",
registry = "gcr.io/distroless",
repository = "base-debian10",
)
container_pull(
name = "distroless-base-arm64-debug",
architecture = "arm64",
digest = "sha256:fe081a649b63147009c1bd32d65da1f399d214420e9497b8fe383ecbcc2ce60d",
registry = "gcr.io/distroless",
repository = "base-debian10",
)
local_repository(
name = "deb_tools",
path = "tools/deb-tools",
)