summaryrefslogtreecommitdiffhomepage
path: root/webhook/BUILD
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-10-30 12:00:11 -0700
committergVisor bot <gvisor-bot@google.com>2020-10-30 12:02:09 -0700
commitd66aebb15a5804f84240dccac55cd56b1dde15e5 (patch)
tree02bcd8f1b070a773093b93eafbd8e0bb59d17e09 /webhook/BUILD
parent3a6f046ae8d852210ae2b82ba35e9a8c2e6757b9 (diff)
Add the gVisor admission webhook
PiperOrigin-RevId: 339913577
Diffstat (limited to 'webhook/BUILD')
-rw-r--r--webhook/BUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/webhook/BUILD b/webhook/BUILD
new file mode 100644
index 000000000..33c585504
--- /dev/null
+++ b/webhook/BUILD
@@ -0,0 +1,28 @@
+load("//images:defs.bzl", "docker_image")
+load("//tools:defs.bzl", "go_binary", "pkg_tar")
+
+package(licenses = ["notice"])
+
+docker_image(
+ name = "webhook_image",
+ data = ":files",
+ statements = ['ENTRYPOINT ["/webhook"]'],
+)
+
+# files is the full file system of the webhook container. It is simply:
+# /
+# └─ webhook
+pkg_tar(
+ name = "files",
+ srcs = [":webhook"],
+ extension = "tgz",
+ strip_prefix = "/third_party/gvisor/webhook",
+)
+
+go_binary(
+ name = "webhook",
+ srcs = ["main.go"],
+ pure = "on",
+ static = "on",
+ deps = ["//webhook/pkg/cli"],
+)