blob: d8377b5631713a10d00b5ce134b98d09adb49939 [file] [log] [blame]
Serge Bazanski19eb0002021-01-21 14:25:25 +01001Copyright 2020 The Monogon Project Authors.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14
15
16From 2adf4ec9796839014a708761b8fb6ad815306def Mon Sep 17 00:00:00 2001
17From: Serge Bazanski <serge@nexantic.com>
18Date: Tue, 26 Jan 2021 11:37:01 +0100
19Subject: [PATCH] Manually revert
20 https://github.com/kubernetes/kubernetes/pull/90949
21
22This reverts PR 90494 which breaks runc within Metropolis. See T916.
23
24---
25 pkg/kubelet/kuberuntime/kuberuntime_sandbox.go | 7 ++-----
26 1 file changed, 2 insertions(+), 5 deletions(-)
27
28diff --git a/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go b/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go
29index 0978044f753..c46436f2a41 100644
30--- a/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go
31+++ b/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go
32@@ -148,11 +148,8 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxLinuxConfig(pod *v1.Pod) (
33 lc := &runtimeapi.LinuxPodSandboxConfig{
34 CgroupParent: cgroupParent,
35 SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{
36- Privileged: kubecontainer.HasPrivilegedContainer(pod),
37-
38- // Forcing sandbox to run as `runtime/default` allow users to
39- // use least privileged seccomp profiles at pod level. Issue #84623
40- SeccompProfilePath: v1.SeccompProfileRuntimeDefault,
41+ Privileged: kubecontainer.HasPrivilegedContainer(pod),
42+ SeccompProfilePath: m.getSeccompProfile(pod.Annotations, "", pod.Spec.SecurityContext, nil),
43 },
44 }
45
46--
472.26.2
48