Merge pull request #108089 from mysunshine92/nodeController-20220212

fix typo for nodelifecycle controller
This commit is contained in:
Kubernetes Prow Robot 2022-05-07 03:33:18 -07:00 committed by GitHub
commit fcffb6de7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -653,7 +653,7 @@ func (nc *Controller) doNoScheduleTaintingPass(ctx context.Context, nodeName str
return found return found
}) })
taintsToAdd, taintsToDel := taintutils.TaintSetDiff(taints, nodeTaints) taintsToAdd, taintsToDel := taintutils.TaintSetDiff(taints, nodeTaints)
// If nothing to add not delete, return true directly. // If nothing to add or delete, return true directly.
if len(taintsToAdd) == 0 && len(taintsToDel) == 0 { if len(taintsToAdd) == 0 && len(taintsToDel) == 0 {
return nil return nil
} }

View File

@ -103,7 +103,7 @@ func deletePodHandler(c clientset.Interface, emitEventFunc func(types.Namespaced
return func(ctx context.Context, args *WorkArgs) error { return func(ctx context.Context, args *WorkArgs) error {
ns := args.NamespacedName.Namespace ns := args.NamespacedName.Namespace
name := args.NamespacedName.Name name := args.NamespacedName.Name
klog.V(0).InfoS("NoExecuteTaintManager is deleting pod", "pod", args.NamespacedName.String()) klog.InfoS("NoExecuteTaintManager is deleting pod", "pod", args.NamespacedName.String())
if emitEventFunc != nil { if emitEventFunc != nil {
emitEventFunc(args.NamespacedName) emitEventFunc(args.NamespacedName)
} }
@ -160,7 +160,7 @@ func NewNoExecuteTaintManager(ctx context.Context, c clientset.Interface, getPod
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "taint-controller"}) recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "taint-controller"})
eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartStructuredLogging(0)
if c != nil { if c != nil {
klog.V(0).InfoS("Sending events to api server") klog.InfoS("Sending events to api server")
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.CoreV1().Events("")}) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.CoreV1().Events("")})
} else { } else {
klog.Fatalf("kubeClient is nil when starting NodeController") klog.Fatalf("kubeClient is nil when starting NodeController")
@ -184,7 +184,7 @@ func NewNoExecuteTaintManager(ctx context.Context, c clientset.Interface, getPod
// Run starts NoExecuteTaintManager which will run in loop until `stopCh` is closed. // Run starts NoExecuteTaintManager which will run in loop until `stopCh` is closed.
func (tc *NoExecuteTaintManager) Run(ctx context.Context) { func (tc *NoExecuteTaintManager) Run(ctx context.Context) {
klog.V(0).InfoS("Starting NoExecuteTaintManager") klog.InfoS("Starting NoExecuteTaintManager")
for i := 0; i < UpdateWorkerSize; i++ { for i := 0; i < UpdateWorkerSize; i++ {
tc.nodeUpdateChannels = append(tc.nodeUpdateChannels, make(chan nodeUpdateItem, NodeUpdateChannelSize)) tc.nodeUpdateChannels = append(tc.nodeUpdateChannels, make(chan nodeUpdateItem, NodeUpdateChannelSize))