Is there any way to control rolling upgrades? I want my pods to not be brought down until a condition is met, such as a script returning a zero value.
For example, each VM in my cluster contains only one pod. I have a script on each VM monitoring a port range, say 1000 - 2000. When I update the image or change an environment variable in the manifest and a rolling upgrade kicks off, I want Kubernetes to only bring down a pod if my script returns that none of the ports in the range are being used.