• k8s-merge-robot's avatar
    Merge pull request #24567 from yifan-gu/post_start_hook · 4c7abddc
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    rkt: Add post-start hook support.
    
    This adds a poll-and-timeout procedure after the pod is
    started, to make sure the post-start hooks execute when the
    container is actually running.
    
    This is a temporal workaround for implementing post-hooks,
    a long term solution is to use lifecycle event to trigger
    those hooks, see https://github.com/kubernetes/kubernetes/issues/23084.
    
    Also this fixes a bug of getting container ID for a non-running
    container when running pre-stop hook.
    
    
    cc @sjpotter @euank @kubernetes/sig-node 
    4c7abddc
rkt_test.go 37.4 KB