Merge pull request #130591 from fmuyassarov/devel/logging

Refine logging levels in job, IPAM, and replicaSet
This commit is contained in:
Kubernetes Prow Robot 2025-03-12 07:13:47 -07:00 committed by GitHub
commit 1c756849d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -595,7 +595,7 @@ func (jm *Controller) enqueueSyncJobInternal(logger klog.Logger, obj interface{}
// all controllers there will still be some replica instability. One way to handle this is // all controllers there will still be some replica instability. One way to handle this is
// by querying the store for all controllers that this rc overlaps, as well as all // by querying the store for all controllers that this rc overlaps, as well as all
// controllers that overlap this rc, and sorting them. // controllers that overlap this rc, and sorting them.
logger.Info("enqueueing job", "key", key, "delay", delay) logger.V(2).Info("enqueueing job", "key", key, "delay", delay)
jm.queue.AddAfter(key, delay) jm.queue.AddAfter(key, delay)
} }

View File

@ -244,7 +244,7 @@ func (r *rangeAllocator) processNextNodeWorkItem(ctx context.Context) bool {
// Finally, if no error occurs we Forget this item so it does not // Finally, if no error occurs we Forget this item so it does not
// get queue again until another change happens. // get queue again until another change happens.
r.queue.Forget(obj) r.queue.Forget(obj)
logger.Info("Successfully synced", "key", key) logger.V(4).Info("Successfully synced", "key", key)
return nil return nil
}(klog.FromContext(ctx), obj) }(klog.FromContext(ctx), obj)

View File

@ -678,7 +678,7 @@ func (rsc *ReplicaSetController) syncReplicaSet(ctx context.Context, key string)
logger := klog.FromContext(ctx) logger := klog.FromContext(ctx)
startTime := time.Now() startTime := time.Now()
defer func() { defer func() {
logger.Info("Finished syncing", "kind", rsc.Kind, "key", key, "duration", time.Since(startTime)) logger.V(4).Info("Finished syncing", "kind", rsc.Kind, "key", key, "duration", time.Since(startTime))
}() }()
namespace, name, err := cache.SplitMetaNamespaceKey(key) namespace, name, err := cache.SplitMetaNamespaceKey(key)