diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go index 15d7b6f2e3f..f2e33f97bd1 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go @@ -111,7 +111,7 @@ func (g *Cloud) NodeAddresses(_ context.Context, _ types.NodeName) ([]v1.NodeAdd // NodeAddressesByProviderID will not be called from the node that is requesting this ID. // i.e. metadata service and other local methods cannot be used here func (g *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error) { - timeoutCtx, cancel := cloud.ContextWithCallTimeout() + timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) defer cancel() _, zone, name, err := splitProviderID(providerID) @@ -229,7 +229,7 @@ func (g *Cloud) InstanceType(ctx context.Context, nodeName types.NodeName) (stri // AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances // expected format for the key is standard ssh-keygen format: func (g *Cloud) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error { - ctx, cancel := cloud.ContextWithCallTimeout() + ctx, cancel := context.WithTimeout(ctx, 1*time.Hour) defer cancel() return wait.Poll(2*time.Second, 30*time.Second, func() (bool, error) {