• k8s-merge-robot's avatar
    Merge pull request #25065 from derekwaynecarr/pod_worker_updates · a503bcd7
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    PodWorkers UpdatePod takes options struct
    
    First commit from https://github.com/kubernetes/kubernetes/pull/24843 
    
    Second commit:
    The `PodWorkers.UpdatePod` operation is updated as follows:
    * use options struct to pass arguments
    * add a pod status func to allow override status
    * add pod termination grace period if sync operation requires a kill pod
    * add a call-back that is error aware
    
    Third commit:
    Add a `killPodNow` to kubelet that does a blocking kill pod call that properly integrates with pod workers.
    
    The plan is to pass `killPodNow` as a function pointer into the out of resource killer.
    
    ```
    // KillPodFunc kills a pod.
    // The pod status is updated, and then it is killed with the specified grace period.
    // This function must block until either the pod is killed or an error is encountered.
    // Arguments:
    // pod - the pod to kill
    // status - the desired status to associate with the pod (i.e. why its killed)
    // gracePeriodOverride - the grace period override to use instead of what is on the pod spec
    type KillPodFunc func(pod *api.Pod, status api.PodStatus, gracePeriodOverride *int64) error
    ```
    
    You can see it being used here in the WIP out of resource killer PR.
    
    https://github.com/kubernetes/kubernetes/pull/21274/commits/1344f858fba956c285eba6c418a3008576cd3843#diff-92ff0f643237f29824b4929574f84609R277
    
    /cc @vishh @yujuhong @pmorie 
    a503bcd7
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api/swagger-spec Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
release Loading commit data...
test Loading commit data...
third_party Loading commit data...
vendor Loading commit data...
www Loading commit data...
.generated_docs Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIB.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DESIGN.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
code-of-conduct.md Loading commit data...