Shopify / krane

A command-line tool that helps you ship changes to a Kubernetes namespace and understand the result
MIT License
1.38k stars 114 forks source link

Fix StatefulSet#deploy_succeeded? for OnDelete #950

Closed JamesOwenHall closed 7 months ago

JamesOwenHall commented 7 months ago

What are you trying to accomplish with this PR? In #926, a check was added to StatefulSet#deploy_succeeded? that requires all pods belonging to a StatefulSet to have the controller-revision-hash label set to the StatefulSet's updateRevision status. It ensures that all of the StatefulSet's pods have been updated to the StatefulSet's latest revision. This is fine for StatefulSets with updateStrategy: RollingUpdate, but doesn't work when it's OnDelete and we don't want to wait for some other mechanism to roll the pods.

We're wrong to run this check for all StatefulSets.

How is this accomplished? I've removed the check entirely since the StatefulSet's status should be sufficient to monitor rollout status.

What could go wrong? ...