remove pre/post affinity checks
This commit is contained in:
parent
de631034c0
commit
b71bbe135b
|
|
@ -246,8 +246,6 @@ func (data *internalDeltaSnapshotData) removePod(namespace, name, nodeName strin
|
||||||
data.clearCaches()
|
data.clearCaches()
|
||||||
}
|
}
|
||||||
|
|
||||||
preAffinityPods := len(dni.PodsWithAffinity())
|
|
||||||
|
|
||||||
podFound := false
|
podFound := false
|
||||||
for _, pod := range dni.Pods() {
|
for _, pod := range dni.Pods() {
|
||||||
if pod.Namespace == namespace && pod.Name == name {
|
if pod.Namespace == namespace && pod.Name == name {
|
||||||
|
|
@ -263,13 +261,7 @@ func (data *internalDeltaSnapshotData) removePod(namespace, name, nodeName strin
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maybe consider deleting from the list in the future. Maybe not.
|
// Maybe consider deleting from the list in the future. Maybe not.
|
||||||
postAffinityPods := len(dni.PodsWithAffinity())
|
data.clearCaches()
|
||||||
if preAffinityPods == 1 && postAffinityPods == 0 {
|
|
||||||
data.havePodsWithAffinity = nil
|
|
||||||
}
|
|
||||||
if data.podList != nil {
|
|
||||||
data.clearPodCaches()
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue