From 70d49ff0c7c9756a4c61e7a9d21cee71d736af08 Mon Sep 17 00:00:00 2001 From: gongguan Date: Tue, 16 Jun 2020 22:01:13 +0800 Subject: [PATCH] revert InstanceMetadataByProviderID definition and deprecation of related instance functions --- staging/src/k8s.io/cloud-provider/cloud.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/staging/src/k8s.io/cloud-provider/cloud.go b/staging/src/k8s.io/cloud-provider/cloud.go index 35b59e74daa..059e9761aff 100644 --- a/staging/src/k8s.io/cloud-provider/cloud.go +++ b/staging/src/k8s.io/cloud-provider/cloud.go @@ -163,7 +163,6 @@ type Instances interface { // ProviderID is a unique identifier of the node. This will not be called // from the node whose nodeaddresses are being queried. i.e. local metadata // services cannot be used in this method to obtain nodeaddresses - // Deprecated: Remove once all calls are migrated to InstanceMetadataByProviderID NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error) // InstanceID returns the cloud provider ID of the node with the specified NodeName. // Note that if the instance does not exist, we must return ("", cloudprovider.InstanceNotFound) @@ -172,7 +171,6 @@ type Instances interface { // InstanceType returns the type of the specified instance. InstanceType(ctx context.Context, name types.NodeName) (string, error) // InstanceTypeByProviderID returns the type of the specified instance. - // Deprecated: Remove once all calls are migrated to InstanceMetadataByProviderID InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error) // AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances // expected format for the key is standard ssh-keygen format: @@ -183,12 +181,9 @@ type Instances interface { // InstanceExistsByProviderID returns true if the instance for the given provider exists. // If false is returned with no error, the instance will be immediately deleted by the cloud controller manager. // This method should still return true for instances that exist but are stopped/sleeping. - // Deprecated: Remove once all calls are migrated to InstanceMetadataByProviderID InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) // InstanceShutdownByProviderID returns true if the instance is shutdown in cloudprovider InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error) - // InstanceMetadataByProviderID returns the instance's metadata. - InstanceMetadataByProviderID(ctx context.Context, providerID string) (*InstanceMetadata, error) } // Route is a representation of an advanced routing rule.