client-go: update expansions callers

This commit is contained in:
Jordan Liggitt
2020-03-06 16:29:23 -05:00
parent 4c034278f4
commit d8abacba40
14 changed files with 25 additions and 23 deletions

View File

@@ -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) {

View File

@@ -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))
}
}