mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Improve mirror pod creation/deletion
- Ignore the "not found" error on deletion. - Recognize the "already exists" error on creation and check if the existing pod meets requirement. If so, don't report an error. - Immediately create a mirror pod after a successful deletion, if needed.
This commit is contained in:
@@ -3399,8 +3399,8 @@ func TestDeleteOutdatedMirrorPod(t *testing.T) {
|
||||
}
|
||||
name := kubecontainer.GetPodFullName(pod)
|
||||
creates, deletes := manager.GetCounts(name)
|
||||
if creates != 0 || deletes != 1 {
|
||||
t.Errorf("expected 0 creation and 1 deletion of %q, got %d, %d", name, creates, deletes)
|
||||
if creates != 1 || deletes != 1 {
|
||||
t.Errorf("expected 1 creation and 1 deletion of %q, got %d, %d", name, creates, deletes)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user