Add context to all relevant cloud APIs

This adds context to all the relevant cloud provider interface signatures.
Callers of those APIs are currently satisfied using context.TODO().
There will be follow on PRs to push the context through the stack.
For an idea of the full scope of this change please look at PR #58532.
This commit is contained in:
Walter Fender
2018-02-02 13:12:07 -08:00
parent b13092554c
commit e18e8ec3c0
49 changed files with 350 additions and 305 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package node
import (
"context"
"errors"
"fmt"
"strings"
@@ -177,7 +178,7 @@ func ExistsInCloudProvider(cloud cloudprovider.Interface, nodeName types.NodeNam
if !ok {
return false, fmt.Errorf("%v", ErrCloudInstance)
}
if _, err := instances.ExternalID(nodeName); err != nil {
if _, err := instances.ExternalID(context.TODO(), nodeName); err != nil {
if err == cloudprovider.InstanceNotFound {
return false, nil
}