Merge pull request #100345 from ravisantoshgudimetla/fix-ds-test

Tighten DS rollout catching function
This commit is contained in:
Kubernetes Prow Robot 2021-03-22 18:51:35 -07:00 committed by GitHub
commit 1822523afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1050,6 +1050,10 @@ func checkDaemonPodsImageAndAvailability(c clientset.Interface, ds *appsv1.Daemo
unavailablePods := 0
nodesToUpdatedPodCount := make(map[string]int)
for _, pod := range pods {
// Ignore the pod on the node that is supposed to be deleted
if pod.DeletionTimestamp != nil {
continue
}
if !metav1.IsControlledBy(&pod, ds) {
continue
}
@ -1080,6 +1084,10 @@ func checkDaemonPodsImageAndAvailability(c clientset.Interface, ds *appsv1.Daemo
func checkDaemonSetPodsLabels(podList *v1.PodList, hash string) {
for _, pod := range podList.Items {
// Ignore all the DS pods that will be deleted
if pod.DeletionTimestamp != nil {
continue
}
podHash := pod.Labels[appsv1.DefaultDaemonSetUniqueLabelKey]
gomega.Expect(len(podHash)).To(gomega.BeNumerically(">", 0))
if len(hash) > 0 {