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.
1.7 KiB
1.7 KiB