• 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
..
admission Loading commit data...
api Loading commit data...
apimachinery Loading commit data...
apis Loading commit data...
apiserver Loading commit data...
auth Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
conversion Loading commit data...
credentialprovider Loading commit data...
fieldpath Loading commit data...
fields Loading commit data...
genericapiserver Loading commit data...
healthz Loading commit data...
httplog Loading commit data...
hyperkube Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
labels Loading commit data...
master Loading commit data...
metrics Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
runtime Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
storage Loading commit data...
types Loading commit data...
ui Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
OWNERS Loading commit data...