Add all dependencies for Kubernetes worker
Adds Kubelet, CNI plugins, containerd, runc and gVisor using a
pre-baked list of dependencies generated using scripts/gazelle-deps/sh.
This moves all dependencies of gVisor, Kubernetes, runc, etc into the
same 'namespace' of Bazel external repositories, giving us ease of
accessing code as libraries, and benefits when it comes to version
auditing.
The gazelle-deps.sh script is a temporary solution that will be replaced
ASAP, see T725.
This unblocks T486.
This is an alternative to D389.
Test Plan: `bazel build //core:image` runs and picks up the new binaries
X-Origin-Diff: phab/D487
GitOrigin-RevId: a28a25071fa2ae76b272d237ce9af777485065ff
diff --git a/third_party/go/patches/cni-plugins-build.patch b/third_party/go/patches/cni-plugins-build.patch
new file mode 100644
index 0000000..e9cef5b
--- /dev/null
+++ b/third_party/go/patches/cni-plugins-build.patch
@@ -0,0 +1,64 @@
+Copyright 2020 The Monogon Project Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+From 16e16b82c44cf48f0752a74de83845263fd04fda Mon Sep 17 00:00:00 2001
+From: Lorenz Brun <lorenz@brun.one>
+Date: Wed, 5 Feb 2020 16:37:42 +0100
+Subject: [PATCH] Build the plugins we need in pure mode
+
+---
+ plugins/ipam/host-local/BUILD.bazel | 1 +
+ plugins/main/loopback/BUILD.bazel | 1 +
+ plugins/main/ptp/BUILD.bazel | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/plugins/ipam/host-local/BUILD.bazel b/plugins/ipam/host-local/BUILD.bazel
+index ce1f2d6..72817a6 100644
+--- a/plugins/ipam/host-local/BUILD.bazel
++++ b/plugins/ipam/host-local/BUILD.bazel
+@@ -22,6 +22,7 @@ go_library(
+ go_binary(
+ name = "host-local",
+ embed = [":go_default_library"],
++ pure = "on",
+ visibility = ["//visibility:public"],
+ )
+
+diff --git a/plugins/main/loopback/BUILD.bazel b/plugins/main/loopback/BUILD.bazel
+index c4d6e00..952bfb1 100644
+--- a/plugins/main/loopback/BUILD.bazel
++++ b/plugins/main/loopback/BUILD.bazel
+@@ -19,6 +19,7 @@ go_library(
+ go_binary(
+ name = "loopback",
+ embed = [":go_default_library"],
++ pure = "on",
+ visibility = ["//visibility:public"],
+ )
+
+diff --git a/plugins/main/ptp/BUILD.bazel b/plugins/main/ptp/BUILD.bazel
+index 512de12..2eb5d50 100644
+--- a/plugins/main/ptp/BUILD.bazel
++++ b/plugins/main/ptp/BUILD.bazel
+@@ -23,6 +23,7 @@ go_library(
+ go_binary(
+ name = "ptp",
+ embed = [":go_default_library"],
++ pure = "on",
+ visibility = ["//visibility:public"],
+ )
+
+--
+2.20.1