From e1e035e3a80a48bd4b5726bd58358b219f005468 Mon Sep 17 00:00:00 2001 From: Kensei Nakada Date: Sat, 16 Dec 2023 11:22:30 +0000 Subject: [PATCH] doc: make it clear that newly scheduled Pods are Pod/Add events --- pkg/scheduler/framework/types.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/scheduler/framework/types.go b/pkg/scheduler/framework/types.go index 45306d33be4..fcb71f2604a 100644 --- a/pkg/scheduler/framework/types.go +++ b/pkg/scheduler/framework/types.go @@ -65,6 +65,12 @@ type GVK string // Constants for GVKs. const ( + // There are a couple of notes about how the scheduler notifies the events of Pods: + // - Add: add events could be triggered by either a newly created Pod or an existing Pod that is scheduled to a Node. + // - Delete: delete events could be triggered by: + // - a Pod that is deleted + // - a Pod that was assumed, but gets un-assumed due to some errors in the binding cycle. + // - an existing Pod that was unscheduled but gets scheduled to a Node. Pod GVK = "Pod" Node GVK = "Node" PersistentVolume GVK = "PersistentVolume"