Add containerd & gVisor support
This adds containerd, CNI, gVisor and all the necessary shims
and supporting infrastructure. It also enables all relevant features in
the Linux kernel. containerd is designed as a simple supervisor.Runnable.
It is not being started yet, this will happen in D497.
Split out from feature/kubelet.
Test Plan:
Has been tested in conjunction with the rest of D497, will be
covered by a K8s E2E test there.
X-Origin-Diff: phab/D509
GitOrigin-RevId: 92523516b7e361a30da330eb187787e6045bfd17
diff --git a/third_party/go/patches/gvisor-containerd-shim-nogo.patch b/third_party/go/patches/gvisor-containerd-shim-nogo.patch
new file mode 100644
index 0000000..73da277
--- /dev/null
+++ b/third_party/go/patches/gvisor-containerd-shim-nogo.patch
@@ -0,0 +1,46 @@
+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 d926d6f44be46c7dbc932247c0cd3daf6a34586f Mon Sep 17 00:00:00 2001
+From: Lorenz Brun <lorenz@brun.one>
+Date: Mon, 4 May 2020 15:16:58 +0200
+Subject: [PATCH] Remove unreachable code
+
+Going upstream as https://github.com/google/gvisor-containerd-shim/pull/59
+
+---
+ pkg/v1/proc/deleted_state.go | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/pkg/v1/proc/deleted_state.go b/pkg/v1/proc/deleted_state.go
+index 95b4406..b023384 100644
+--- a/pkg/v1/proc/deleted_state.go
++++ b/pkg/v1/proc/deleted_state.go
+@@ -38,12 +38,10 @@ func (s *deletedState) Start(ctx context.Context) error {
+ }
+
+ func (s *deletedState) Delete(ctx context.Context) error {
+- return errors.Errorf("cannot delete a deleted process")
+ return errors.Wrap(errdefs.ErrNotFound, "cannot delete a deleted process")
+ }
+
+ func (s *deletedState) Kill(ctx context.Context, sig uint32, all bool) error {
+- return errors.Errorf("cannot kill a deleted process")
+ return errors.Wrap(errdefs.ErrNotFound, "cannot kill a deleted process")
+ }
+
+--
+2.25.1
+