Serge Bazanski | 19eb000 | 2021-01-21 14:25:25 +0100 | [diff] [blame] | 1 | Copyright 2020 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | |
| 16 | From 2adf4ec9796839014a708761b8fb6ad815306def Mon Sep 17 00:00:00 2001 |
| 17 | From: Serge Bazanski <serge@nexantic.com> |
| 18 | Date: Tue, 26 Jan 2021 11:37:01 +0100 |
| 19 | Subject: [PATCH] Manually revert |
| 20 | https://github.com/kubernetes/kubernetes/pull/90949 |
| 21 | |
| 22 | This 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 | |
| 28 | diff --git a/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go b/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go |
| 29 | index 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 | -- |
| 47 | 2.26.2 |
| 48 | |