Deployment: Filter Pods by Deployment selector in addition to ControllerRef.
Deployment should ignore Pods that don't match the selector, even if they have a ControllerRef pointing to one of the ReplicaSets it owns. The ReplicaSet itself will orphan the Pod as soon as it syncs.
This commit is contained in:
@@ -515,9 +515,9 @@ func TestGetPodMapForReplicaSets(t *testing.T) {
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
|
||||
podMap, err := c.getPodMapForReplicaSets(d.Namespace, f.rsLister)
|
||||
podMap, err := c.getPodMapForDeployment(d, f.rsLister)
|
||||
if err != nil {
|
||||
t.Fatalf("getPodMapForReplicaSets() error: %v", err)
|
||||
t.Fatalf("getPodMapForDeployment() error: %v", err)
|
||||
}
|
||||
podCount := 0
|
||||
for _, podList := range podMap {
|
||||
|
Reference in New Issue
Block a user