Every now and then developers will either make environmental changes or changes to the pod spec that cause the pod to fail to schedule. I've seen this most frequently happen when:
- A developer removes a container image from an internal registry that is referenced in the pod spec without updating the pod spec in all branches (The container will get stuck in ErrImagePull)
- A developer adds a container to the pod spec without overriding the entrypoint. When the container exits, kubernetes kills and restarts the pod before jenkins sees the pod becoming ready
It would be awesome if the kubernetes plugins could detect these failures and fail the build if this happens so the build doesn't run forever and we don't block other builds from scheduling. This is especially useful for users who don't have access to the kubernetes api to inspect *why* their builds aren't running.