@@ -48,14 +48,14 @@ type NodeHealthMonitor struct {
4848}
4949
5050var (
51- // nodeInfoMutex syncnornized writes by NodeHealthMonitor with reads from AppWrapperReconciler and SlackClusterQueueMonitor
51+ // nodeInfoMutex synchronizes writes by NodeHealthMonitor with reads from AppWrapperReconciler and SlackClusterQueueMonitor
5252 nodeInfoMutex sync.RWMutex
5353
5454 // noExecuteNodes is a mapping from Node names to resources with an Autopilot NoExecute taint
5555 noExecuteNodes = make (map [string ]sets.Set [string ])
5656
5757 // noScheduleNodes is a mapping from Node names to ResourceLists of unschedulable resources.
58- // A resource may be unscheduable either because:
58+ // A resource may be unschedulable either because:
5959 // (a) the Node is cordoned (node.Spec.Unschedulable is true) or
6060 // (b) Autopilot has labeled the Node with a NoExecute or NoSchedule taint for the resource.
6161 noScheduleNodes = make (map [string ]v1.ResourceList )
@@ -91,15 +91,14 @@ func (r *NodeHealthMonitor) Reconcile(ctx context.Context, req ctrl.Request) (ct
9191func (r * NodeHealthMonitor ) triggerSlackCQMonitor () {
9292 if r .Config .SlackQueueName != "" {
9393 select {
94- // Trigger dispatch by means of "*/*" request
9594 case r .Events <- event.GenericEvent {Object : & metav1.PartialObjectMetadata {ObjectMeta : metav1.ObjectMeta {Name : dispatchEventName }}}:
9695 default :
9796 // do not block if event is already in channel
9897 }
9998 }
10099}
101100
102- // update for the deletion of nodeName
101+ // update noExecuteNodes and noScheduleNodes for the deletion of nodeName
103102func (r * NodeHealthMonitor ) updateForNodeDeletion (ctx context.Context , nodeName string ) {
104103 if _ , ok := noExecuteNodes [nodeName ]; ok {
105104 nodeInfoMutex .Lock () // BEGIN CRITICAL SECTION
0 commit comments