diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/entities/pods.go | 2 | ||||
-rw-r--r-- | pkg/specgenutil/specgen.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index da93d3f8b..8406ca019 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -210,7 +210,7 @@ type ContainerCreateOptions struct { Name string `json:"container_name"` NoHealthCheck bool OOMKillDisable bool - OOMScoreAdj int + OOMScoreAdj *int Arch string OS string Variant string diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index 186d3862b..7d4fca846 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -753,8 +753,8 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions s.PreserveFDs = c.PreserveFDs } - if s.OOMScoreAdj == nil || c.OOMScoreAdj != 0 { - s.OOMScoreAdj = &c.OOMScoreAdj + if s.OOMScoreAdj == nil || c.OOMScoreAdj != nil { + s.OOMScoreAdj = c.OOMScoreAdj } if c.Restart != "" { splitRestart := strings.Split(c.Restart, ":") |