k3s/pkg/kubelet/lifecycle
Kubernetes Submit Queue 649c0ddd0e Merge pull request #35342 from timstclair/rejected
Automatic merge from submit-queue

[AppArmor] Hold bad AppArmor pods in pending rather than rejecting

Fixes https://github.com/kubernetes/kubernetes/issues/32837

Overview of the fix:

If the Kubelet needs to reject a Pod for a reason that the control plane doesn't understand (e.g. which AppArmor profiles are installed on the node), then it might contiinuously try to run the pod on the same rejecting node. This change adds a concept of "soft rejection", in which the Pod is admitted, but not allowed to run (and therefore held in a pending state). This prevents the pod from being retried on other nodes, but also prevents the high churn. This is consistent with how other missing local resources (e.g. volumes) is handled.

A side effect of the change is that Pods which are not initially runnable will be retried. This is desired behavior since it avoids a race condition when a new node is brought up but the AppArmor profiles have not yet been loaded on it.

``` release-note
Pods with invalid AppArmor configurations will be held in a Pending state, rather than rejected (failed). Check the pod status message to find out why it is not running.
```

@kubernetes/sig-node @timothysc @rrati @davidopp
2016-11-05 22:52:26 -07:00
..
BUILD Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
fake_handler_runner.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
handlers.go Merge pull request #35342 from timstclair/rejected 2016-11-05 22:52:26 -07:00
handlers_test.go Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -07:00
interfaces.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
predicate.go Revert "Add kubelet awareness to taint tolerant match caculator." 2016-10-07 12:10:55 -07:00