mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-25 22:39:38 +00:00
Add observedGeneration and validation to pod status and conditions
This commit is contained in:
@@ -172,7 +172,7 @@ func LogPodStates(pods []v1.Pod) {
|
||||
if pod.DeletionGracePeriodSeconds != nil {
|
||||
grace = fmt.Sprintf("%ds", *pod.DeletionGracePeriodSeconds)
|
||||
}
|
||||
framework.Logf("%-[1]*[2]s %-[3]*[4]s %-[5]*[6]s %-[7]*[8]s %[9]s",
|
||||
framework.Logf("%-[1]*[2]s %-[3]*[4]s %-[5]*[6]s %-[7]*[8]s %[9]v",
|
||||
maxPodW, pod.ObjectMeta.Name, maxNodeW, pod.Spec.NodeName, maxPhaseW, pod.Status.Phase, maxGraceW, grace, pod.Status.Conditions)
|
||||
}
|
||||
framework.Logf("") // Final empty line helps for readability.
|
||||
|
||||
@@ -313,7 +313,7 @@ func WatchPods(ctx context.Context, cs clientset.Interface, ns string, to io.Wri
|
||||
}
|
||||
buffer := new(bytes.Buffer)
|
||||
fmt.Fprintf(buffer,
|
||||
"%s pod: %s: %s/%s %s: %s %s\n",
|
||||
"%s pod: %s: %s/%s %s: %s %v\n",
|
||||
time.Now().Format(timeFormat),
|
||||
e.Type,
|
||||
pod.Namespace,
|
||||
|
||||
@@ -221,7 +221,7 @@ var _ = sigDescribe(feature.Windows, "GracefulNodeShutdown", framework.WithSeria
|
||||
if !isPodReadyToStartConditionSetToFalse(&pod) {
|
||||
framework.Logf("Expecting pod (%v/%v) 's ready to start condition set to false, "+
|
||||
"but it's not currently: Pod Condition %+v", pod.Namespace, pod.Name, pod.Status.Conditions)
|
||||
return fmt.Errorf("pod (%v/%v) 's ready to start condition should be false, condition: %s, phase: %s",
|
||||
return fmt.Errorf("pod (%v/%v) 's ready to start condition should be false, condition: %v, phase: %s",
|
||||
pod.Namespace, pod.Name, pod.Status.Conditions, pod.Status.Phase)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ var _ = SIGDescribe("GracefulNodeShutdown", framework.WithSerial(), feature.Grac
|
||||
if !isPodReadyToStartConditionSetToFalse(&pod) {
|
||||
framework.Logf("Expecting pod (%v/%v) 's ready to start condition set to false, "+
|
||||
"but it's not currently: Pod Condition %+v", pod.Namespace, pod.Name, pod.Status.Conditions)
|
||||
return fmt.Errorf("pod (%v/%v) 's ready to start condition should be false, condition: %s, phase: %s",
|
||||
return fmt.Errorf("pod (%v/%v) 's ready to start condition should be false, condition: %v, phase: %s",
|
||||
pod.Namespace, pod.Name, pod.Status.Conditions, pod.Status.Phase)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user