factorial-io / phabalicious

Supports your deployments and every-day devops-tasks
http://docs.phab.io
MIT License
18 stars 3 forks source link

Use the pod-template-hash to get the actual running pod, instead any … #154

Closed stmh closed 3 years ago

stmh commented 3 years ago

This MR will fix failing deployments via phabalicious which output only an error like Error 137. This could happen when k8s does a rollout, it keeps the old containers a bit around, while starting the new containers. Phabalicious might then pick up an old container, starting e.g. a drupal reset and k8s will kill the obsolete container in the meantime.

The proper fix is to get the latest revision from the deployment and then the pod-template hash from the replicaset with that revision. This will be added to the existing pod-selector and used to find the correct pod.

Please review!