deployment controller: use contextual logging

This commit is contained in:
ZhangKe10140699
2022-11-02 09:37:38 +08:00
parent 69465d2949
commit 66bda6c092
15 changed files with 329 additions and 184 deletions

View File

@@ -74,7 +74,9 @@ func startReplicaSetController(ctx context.Context, controllerContext Controller
}
func startDeploymentController(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
ctx = klog.NewContext(ctx, klog.LoggerWithName(klog.FromContext(ctx), "deployment"))
dc, err := deployment.NewDeploymentController(
ctx,
controllerContext.InformerFactory.Apps().V1().Deployments(),
controllerContext.InformerFactory.Apps().V1().ReplicaSets(),
controllerContext.InformerFactory.Core().V1().Pods(),