m/test/e2e: test NodePort

This was originally written as a test for validating fixes for
the issue that NodePort was not working if any non-local pods were in
the NodePort service, even for externalTrafficPolicy: cluster services.
As it turns out CL:2795 fixed this, the changes in previous versions of
this CL broke it again. So now it just consists of the test itself,
which passes.

Change-Id: If4cf4ffc46a5456b4defa330776e043593e61b29
Reviewed-on: https://review.monogon.dev/c/monogon/+/1924
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/metropolis/test/e2e/httpserver/BUILD.bazel b/metropolis/test/e2e/httpserver/BUILD.bazel
new file mode 100644
index 0000000..160ebf8
--- /dev/null
+++ b/metropolis/test/e2e/httpserver/BUILD.bazel
@@ -0,0 +1,49 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
+load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_binary")
+
+go_library(
+    name = "httpserver_lib",
+    srcs = ["main.go"],
+    importpath = "source.monogon.dev/metropolis/test/e2e/httpserver",
+    visibility = ["//visibility:private"],
+)
+
+go_binary(
+    name = "httpserver",
+    embed = [":httpserver_lib"],
+    pure = "on",
+    visibility = ["//visibility:private"],
+)
+
+platform_transition_binary(
+    name = "httpserver_transitioned",
+    binary = ":httpserver",
+    target_platform = "//build/platforms:linux_amd64_static",
+    visibility = ["//visibility:private"],
+)
+
+load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
+
+pkg_tar(
+    name = "httpserver_layer",
+    srcs = [":httpserver_transitioned"],
+    visibility = ["//visibility:private"],
+)
+
+load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball")
+
+oci_image(
+    name = "httpserver_image",
+    base = "@distroless_base",
+    entrypoint = ["/httpserver"],
+    tars = [":httpserver_layer"],
+    visibility = ["//metropolis/test/e2e:__pkg__"],
+    workdir = "/app",
+)
+
+oci_tarball(
+    name = "httpserver_tarball",
+    image = ":httpserver_image",
+    repo_tags = ["bazel/metropolis/test/e2e/httpserver:httpserver_image"],
+    visibility = ["//metropolis/test/e2e:__pkg__"],
+)