Skip to content

Commit

Permalink
add logs for proxy server (#329)
Browse files Browse the repository at this point in the history
Signed-off-by: 佑祎 <zzw261520@alibaba-inc.com>
  • Loading branch information
zwzhang0107 committed Jun 30, 2022
1 parent 1fa6ec8 commit 37a3aec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/koordlet/runtimehooks/proxyserver/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (s *server) PreRunPodSandboxHook(ctx context.Context,
podCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PreRunPodSandbox, podCtx)
podCtx.ProxyDone(resp)
klog.V(5).Infof("send PreRunPodSandboxHook response %v", resp.String())
return resp, nil
}

Expand All @@ -56,6 +57,7 @@ func (s *server) PostStopPodSandboxHook(ctx context.Context,
podCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PostStopPodSandbox, podCtx)
podCtx.ProxyDone(resp)
klog.V(5).Infof("send PostStopPodSandboxHook response %v", resp.String())
return resp, nil
}

Expand All @@ -71,6 +73,7 @@ func (s *server) PreCreateContainerHook(ctx context.Context,
containerCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PreCreateContainer, containerCtx)
containerCtx.ProxyDone(resp)
klog.V(5).Infof("send PreCreateContainerHook response %v", resp.String())
return resp, nil
}

Expand All @@ -86,6 +89,7 @@ func (s *server) PreStartContainerHook(ctx context.Context,
containerCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PreStartContainer, containerCtx)
containerCtx.ProxyDone(resp)
klog.V(5).Infof("send PreStartContainerHook response %v", resp.String())
return resp, nil
}

Expand All @@ -101,6 +105,7 @@ func (s *server) PostStartContainerHook(ctx context.Context,
containerCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PostStartContainer, containerCtx)
containerCtx.ProxyDone(resp)
klog.V(5).Infof("send PostStartContainerHook response %v", resp.String())
return resp, nil
}

Expand All @@ -116,6 +121,7 @@ func (s *server) PostStopContainerHook(ctx context.Context,
containerCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PostStopContainer, containerCtx)
containerCtx.ProxyDone(resp)
klog.V(5).Infof("send PostStopContainerHook response %v", resp.String())
return resp, nil
}

Expand All @@ -131,5 +137,6 @@ func (s *server) PreUpdateContainerResourcesHook(ctx context.Context,
containerCtx.FromProxy(req)
hooks.RunHooks(rmconfig.PreUpdateContainerResources, containerCtx)
containerCtx.ProxyDone(resp)
klog.V(5).Infof("send PreUpdateContainerResourcesHook response %v", resp.String())
return resp, nil
}

0 comments on commit 37a3aec

Please sign in to comment.