This PR changes the way we count unready pods during the rollout.
Instead of looking at an annotation that was created with the new replicaset, we look at the number of unready pods among the old pods.
Motivation
As part of https://github.com/DataDog/extendeddaemonset/pull/166, we enhanced the EDS to keep track of unhealthy pods before a deployment by adding an annotation on the new ERS.
However, it does not cover the case of canary failures. The annotation is never updated which means that the number of unreadyPods could be 0.
Additional Notes
N/A
Describe your test plan
Deploy the Agent using the operator on a 15 nodes clusters with the arguments attached to the datadog-operator command:
Once the canary pods are created, fail the canary manually with k eds canary fail datadog-agent -n datadog-agent-operator and make sure pods are being replaced:
What does this PR do?
This PR changes the way we count unready pods during the rollout. Instead of looking at an annotation that was created with the new replicaset, we look at the number of unready pods among the old pods.
Motivation
As part of https://github.com/DataDog/extendeddaemonset/pull/166, we enhanced the EDS to keep track of unhealthy pods before a deployment by adding an annotation on the new ERS. However, it does not cover the case of canary failures. The annotation is never updated which means that the number of
unreadyPods
could be 0.Additional Notes
N/A
Describe your test plan
k eds canary fail datadog-agent -n datadog-agent-operator
and make sure pods are being replaced: