Skip to content

Commit

Permalink
generate: do not set OOMScoreAdj if no adjustment
Browse files Browse the repository at this point in the history
Existing OOMScoreAdj on the incoming spec should not be cleared.

Fixes #117

Signed-off-by: Samuel Karp <[email protected]>
  • Loading branch information
samuelkarp committed Oct 23, 2024
1 parent e8dd22a commit 555a15b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/runtime-tools/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ func (g *Generator) AdjustCgroupsPath(path string) {
func (g *Generator) AdjustOomScoreAdj(score *nri.OptionalInt) {
if score != nil {
g.SetProcessOOMScoreAdj(int(score.Value))
} else {
g.SetProcessOOMScoreAdj(0)
g.Config.Process.OOMScoreAdj = nil
}
}

Expand Down

0 comments on commit 555a15b

Please sign in to comment.