Fix UpdateSnapshot when Node is partially removed

Change-Id: I5b459e9ea67020183c87d1ce0a2380efb8cc3e05
This commit is contained in:
Aldo Culquicondor
2020-09-28 17:01:12 -04:00
parent db9f1e91d9
commit d6f09f7dfb
3 changed files with 35 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ limitations under the License.
package cache
import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
)
@@ -99,6 +99,8 @@ type Cache interface {
// UpdateSnapshot updates the passed infoSnapshot to the current contents of Cache.
// The node info contains aggregated information of pods scheduled (including assumed to be)
// on this node.
// The snapshot only includes Nodes that are not deleted at the time this function is called.
// nodeinfo.Node() is guaranteed to be not nil for all the nodes in the snapshot.
UpdateSnapshot(nodeSnapshot *Snapshot) error
// Dump produces a dump of the current cache.