From a96318703192f3075a1c0122b92e36d4df92fe21 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Thu, 19 Oct 2017 15:23:41 -0700 Subject: [PATCH] sandbox: Use first class sysctls instead of annotations Signed-off-by: Mrunal Patel --- server/sandbox_run.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/server/sandbox_run.go b/server/sandbox_run.go index eaf9ccc1..ea5c6169 100644 --- a/server/sandbox_run.go +++ b/server/sandbox_run.go @@ -400,15 +400,8 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest } // extract linux sysctls from annotations and pass down to oci runtime - safe, unsafe, err := SysctlsFromPodAnnotations(kubeAnnotations) - if err != nil { - return nil, err - } - for _, sysctl := range safe { - g.AddLinuxSysctl(sysctl.Name, sysctl.Value) - } - for _, sysctl := range unsafe { - g.AddLinuxSysctl(sysctl.Name, sysctl.Value) + for key, value := range req.GetConfig().GetLinux().GetSysctls() { + g.AddLinuxSysctl(key, value) } // Set OOM score adjust of the infra container to be very low