mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #116571 from mengjiao-liu/scheduler-plugins-defaultbinder
Migrate pkg/scheduler/framework/plugins/defaultbinder to contextual logging
This commit is contained in:
		@@ -49,7 +49,8 @@ func (b DefaultBinder) Name() string {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Bind binds pods to nodes using the k8s client.
 | 
					// Bind binds pods to nodes using the k8s client.
 | 
				
			||||||
func (b DefaultBinder) Bind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status {
 | 
					func (b DefaultBinder) Bind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status {
 | 
				
			||||||
	klog.V(3).InfoS("Attempting to bind pod to node", "pod", klog.KObj(p), "node", klog.KRef("", nodeName))
 | 
						logger := klog.FromContext(ctx)
 | 
				
			||||||
 | 
						logger.V(3).Info("Attempting to bind pod to node", "pod", klog.KObj(p), "node", klog.KRef("", nodeName))
 | 
				
			||||||
	binding := &v1.Binding{
 | 
						binding := &v1.Binding{
 | 
				
			||||||
		ObjectMeta: metav1.ObjectMeta{Namespace: p.Namespace, Name: p.Name, UID: p.UID},
 | 
							ObjectMeta: metav1.ObjectMeta{Namespace: p.Namespace, Name: p.Name, UID: p.UID},
 | 
				
			||||||
		Target:     v1.ObjectReference{Kind: "Node", Name: nodeName},
 | 
							Target:     v1.ObjectReference{Kind: "Node", Name: nodeName},
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user