mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 01:39:02 +00:00
client-go: update expansions callers
This commit is contained in:
@@ -232,7 +232,7 @@ func (e *Extender) Bind(binding *extenderv1.ExtenderBindingArgs) error {
|
||||
},
|
||||
}
|
||||
|
||||
return e.Client.CoreV1().Pods(b.Namespace).Bind(b)
|
||||
return e.Client.CoreV1().Pods(b.Namespace).Bind(context.TODO(), b, metav1.CreateOptions{})
|
||||
}
|
||||
|
||||
func machine1_2_3Predicate(pod *v1.Pod, node *v1.Node) (bool, error) {
|
||||
|
@@ -301,13 +301,13 @@ func (bp *BindPlugin) Bind(ctx context.Context, state *framework.CycleState, p *
|
||||
bp.pluginInvokeEventChan <- pluginInvokeEvent{pluginName: bp.Name(), val: bp.numBindCalled}
|
||||
}
|
||||
if bp.bindStatus.IsSuccess() {
|
||||
if err := bp.client.CoreV1().Pods(p.Namespace).Bind(&v1.Binding{
|
||||
if err := bp.client.CoreV1().Pods(p.Namespace).Bind(context.TODO(), &v1.Binding{
|
||||
ObjectMeta: metav1.ObjectMeta{Namespace: p.Namespace, Name: p.Name, UID: p.UID, Annotations: map[string]string{bindPluginAnnotation: bp.Name()}},
|
||||
Target: v1.ObjectReference{
|
||||
Kind: "Node",
|
||||
Name: nodeName,
|
||||
},
|
||||
}); err != nil {
|
||||
}, metav1.CreateOptions{}); err != nil {
|
||||
return framework.NewStatus(framework.Error, fmt.Sprintf("bind failed: %v", err))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user