Change:
<!-- Feature requests are unlikely to make progress as an issue. Instead, please suggest enhancements by engaging with SIGs on slack and mailing lists. A proposal that works through the design along with the implications of the change can be opened as a KEP: --I'd like only pods to have low OOM score -997. introduced a change which ensured all the critical priority classes will have a low OOM score -997. While this helped in relating OOM score to priority of pod, it also allows containers in pods to have -997 OOM score, making them one of the last processes to be OOMKilled. By definition pods can be scheduled elsewhere if there is crunch on the node where as pods cannot be rescheduled. This was the reason for to have higher priority value than . So, I think it makes sense for only pods to have low OOM score of -997. /sig node cc
/triage accepted
i think this is reasonable since is higher priority than and this would make a distinction between the two making killable but assured to be rescheduled
Note that oomscore has nothing to do with rescheduling. Eviction looks at priority, oomscore simply controls the killer. I think that strengthens the argument - the point of node-critical is makinng sure it's killed last, but even then that should be a rare, rare case (a memory leak in kube-proxy will blow out the workload, but if we just killed kube-proxy everything would heal). We may want to go back to the original justifications for -99x oomscore in system-node-critical and make sure we're still aligning correctly.

Discussion:
// and 1000. Containers with higher OOM scores are killed if the system runs out of memory. // See https://lwn.net/Articles/391222/ for more information. func GetContainerOOMScoreAdjust(pod *v1.Pod, container *v1.Container, memoryCapacity int64) int { <del> if types.IsCriticalPod(pod) { // Critical pods should be the last to get killed. </del> <ins> if types.IsNodeCriticalPod(pod) { // Only node critical pod should be the last to get killed. </ins> return guaranteedOOMScoreAdj }

systemCritical = scheduling.SystemCriticalPriority <del> critical = v1.Pod{ </del> <ins> clusterCritical = v1.Pod{ </ins> Spec: v1.PodSpec{ <del> Priority: &systemCritical, </del> <ins> PriorityClassName: scheduling.SystemClusterCritical, Priority:          &systemCritical, Containers: []v1.Container{ { Resources: v1.ResourceRequirements{}, }, }, }, } systemNodeCritical = scheduling.SystemCriticalPriority + 1000 nodeCritical = v1.Pod{ Spec: v1.PodSpec{ PriorityClassName: scheduling.SystemNodeCritical, Priority:          &systemNodeCritical, </ins> Containers: []v1.Container{ { Resources: v1.ResourceRequirements{},

highOOMScoreAdj: 3, }, { <del> pod:             &critical, </del> <ins> pod:             &clusterCritical, memoryCapacity:  4000000000, lowOOMScoreAdj:  1000, highOOMScoreAdj: 1000, }, { pod:             &nodeCritical, </ins> memoryCapacity:  4000000000, lowOOMScoreAdj:  -997, highOOMScoreAdj: -997,

func IsCriticalPodBasedOnPriority(priority int32) bool { return priority >= scheduling.SystemCriticalPriority } <ins> // IsNodeCriticalPod checks if the given pod is a system-node-critical func IsNodeCriticalPod(pod *v1.Pod) bool { return IsCriticalPod(pod) && (pod.Spec.PriorityClassName == scheduling.SystemNodeCritical) } </ins>