From 066826d476d2b62a49648d9ef4e7ca1b4ca2a0ba Mon Sep 17 00:00:00 2001 From: Kensei Nakada Date: Thu, 18 Jul 2024 20:39:29 +0900 Subject: [PATCH] fix wordings --- pkg/scheduler/framework/types.go | 4 ++-- pkg/scheduler/internal/queue/events.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/scheduler/framework/types.go b/pkg/scheduler/framework/types.go index acac4c378f4..2e6e7b9234b 100644 --- a/pkg/scheduler/framework/types.go +++ b/pkg/scheduler/framework/types.go @@ -71,7 +71,7 @@ const ( // UpdatePodOther is a update for pod's other fields. // NOT RECOMMENDED using it in your plugin's EventsToRegister, // use Pod/Update instead when you have to subscribe Pod updates which are not covered by other UpdatePodXYZ events. - // Otherwise, your plugin would be broken when the upstream supports a new Pod specific Update event. + // Otherwise, your plugin might be broken when the upstream supports a new Pod specific Update event. // It's used only for the internal event handling. UpdatePodOther @@ -89,7 +89,7 @@ type GVK string // Note: // - UpdatePodXYZ or UpdateNodeXYZ: triggered by updating particular parts of a Pod or a Node, e.g. updatePodLabel. // Use specific events rather than general ones (updatePodLabel vs update) can make the requeueing process more efficient -// and consume less memories as less events will be cached at scheduler. +// and consume less memory as less events will be cached at scheduler. 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. diff --git a/pkg/scheduler/internal/queue/events.go b/pkg/scheduler/internal/queue/events.go index 54975be703c..376ac4252a2 100644 --- a/pkg/scheduler/internal/queue/events.go +++ b/pkg/scheduler/internal/queue/events.go @@ -130,7 +130,9 @@ func PodSchedulingPropertiesChange(newPod *v1.Pod, oldPod *v1.Pod) (events []fra type podChangeExtractor func(newNode *v1.Pod, oldNode *v1.Pod) *framework.ClusterEvent func extractPodResourceRequestChange(newPod, oldPod *v1.Pod) *framework.ClusterEvent { - opt := resource.PodResourcesOptions{InPlacePodVerticalScalingEnabled: utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling)} + opt := resource.PodResourcesOptions{ + InPlacePodVerticalScalingEnabled: utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling), + } if !equality.Semantic.DeepEqual(resource.PodRequests(newPod, opt), resource.PodRequests(oldPod, opt)) { return &PodRequestChange }