mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Merge pull request #130591 from fmuyassarov/devel/logging
Refine logging levels in job, IPAM, and replicaSet
This commit is contained in:
commit
1c756849d6
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user