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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user