container_create: better handling of devices
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
b7b57e8731
commit
e8553a124d
3 changed files with 105 additions and 18 deletions
|
@ -35,6 +35,8 @@ const (
|
|||
// TODO: Remove this const once this value is provided over CRI
|
||||
// See https://github.com/kubernetes/kubernetes/issues/47938
|
||||
PodInfraOOMAdj int = -998
|
||||
// PodInfraCPUshares is default cpu shares for sandbox container.
|
||||
PodInfraCPUshares = 2
|
||||
)
|
||||
|
||||
// privilegedSandbox returns true if the sandbox configuration
|
||||
|
@ -389,6 +391,8 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
|
|||
// so it doesn't get killed.
|
||||
g.SetProcessOOMScoreAdj(PodInfraOOMAdj)
|
||||
|
||||
g.SetLinuxResourcesCPUShares(PodInfraCPUshares)
|
||||
|
||||
hostNetwork := req.GetConfig().GetLinux().GetSecurityContext().GetNamespaceOptions().HostNetwork
|
||||
|
||||
// set up namespaces
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue