• Kubernetes Submit Queue's avatar
    Merge pull request #35342 from timstclair/rejected · 649c0ddd
    Kubernetes Submit Queue authored
    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
    649c0ddd
Name
Last commit
Last update
..
builder Loading commit data...
environment Loading commit data...
jenkins Loading commit data...
remote Loading commit data...
runner Loading commit data...
services Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
apparmor_test.go Loading commit data...
benchmark_util.go Loading commit data...
cgroup_manager_test.go Loading commit data...
container.go Loading commit data...
container_manager_test.go Loading commit data...
density_test.go Loading commit data...
disk_eviction_test.go Loading commit data...
doc.go Loading commit data...
dynamic_kubelet_configuration_test.go Loading commit data...
e2e_node_suite_test.go Loading commit data...
gubernator.sh Loading commit data...
image.go Loading commit data...
image_conformance_test.go Loading commit data...
image_id_test.go Loading commit data...
image_list.go Loading commit data...
kubelet_test.go Loading commit data...
lifecycle_hook_test.go Loading commit data...
memory_eviction_test.go Loading commit data...
mirror_pod_test.go Loading commit data...
resource_collector.go Loading commit data...
resource_usage_test.go Loading commit data...
restart_test.go Loading commit data...
runtime_conformance_test.go Loading commit data...
simple_mount.go Loading commit data...
summary_test.go Loading commit data...
util.go Loading commit data...