daemonset: use contextual logging

This commit is contained in:
ZhangKe10140699
2022-11-04 16:37:32 +08:00
parent b740a34302
commit 7198bcffcd
7 changed files with 326 additions and 219 deletions

View File

@@ -34,7 +34,9 @@ import (
)
func startDaemonSetController(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
ctx = klog.NewContext(ctx, klog.LoggerWithName(klog.FromContext(ctx), "daemonset-controller"))
dsc, err := daemon.NewDaemonSetsController(
ctx,
controllerContext.InformerFactory.Apps().V1().DaemonSets(),
controllerContext.InformerFactory.Apps().V1().ControllerRevisions(),
controllerContext.InformerFactory.Core().V1().Pods(),