Documentation ¶
Index ¶
- Variables
- func NewCloud(config io.Reader) (cloudprovider.Interface, error)
- type Cloud
- func (cloud *Cloud) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error
- func (cloud *Cloud) Clusters() (cloudprovider.Clusters, bool)
- func (cloud *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint string, ...) error
- func (cloud *Cloud) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error)
- func (cloud *Cloud) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error
- func (cloud *Cloud) ExternalID(ctx context.Context, nodeName types.NodeName) (string, error)
- func (cloud *Cloud) HasClusterID() bool
- func (cloud *Cloud) Initialize(clientBuilder controller.ControllerClientBuilder)
- func (cloud *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)
- func (cloud *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string, error)
- func (cloud *Cloud) InstanceType(ctx context.Context, name types.NodeName) (string, error)
- func (cloud *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)
- func (cloud *Cloud) Instances() (cloudprovider.Instances, bool)
- func (cloud *Cloud) ListRoutes(ctx context.Context, clusterName string) ([]*cloudprovider.Route, error)
- func (cloud *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (cloud *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
- func (cloud *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)
- func (cloud *Cloud) ProviderName() string
- func (cloud *Cloud) Routes() (cloudprovider.Routes, bool)
- func (cloud *Cloud) Zones() (cloudprovider.Zones, bool)
- type Config
Constants ¶
This section is empty.
Variables ¶
var (
CloudInstanceNotFound = errors.New("tencentcloud instance not found")
)
Functions ¶
Types ¶
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
func (*Cloud) AddSSHKeyToAllInstances ¶
AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances expected format for the key is standard ssh-keygen format: <protocol> <blob>
func (*Cloud) Clusters ¶
func (cloud *Cloud) Clusters() (cloudprovider.Clusters, bool)
Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) CreateRoute ¶
func (cloud *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint string, route *cloudprovider.Route) error
CreateRoute creates the described managed route route.Name will be ignored, although the cloud-provider may use nameHint to create a more user-meaningful name.
func (*Cloud) CurrentNodeName ¶
CurrentNodeName returns the name of the node we are currently running on On most clouds (e.g. GCE) this is the hostname, so we provide the hostname
func (*Cloud) DeleteRoute ¶
func (cloud *Cloud) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error
DeleteRoute deletes the specified managed route Route should be as returned by ListRoutes
func (*Cloud) ExternalID ¶
ExternalID returns the cloud provider ID of the node with the specified NodeName. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
func (*Cloud) HasClusterID ¶
HasClusterID returns true if a ClusterID is required and set
func (*Cloud) Initialize ¶
func (cloud *Cloud) Initialize(clientBuilder controller.ControllerClientBuilder)
Initialize provides the cloud with a kubernetes client builder and may spawn goroutines to perform housekeeping activities within the cloud provider.
func (*Cloud) InstanceExistsByProviderID ¶
func (cloud *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)
InstanceExistsByProviderID returns true if the instance for the given provider id still is running. If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
func (*Cloud) InstanceID ¶
InstanceID returns the cloud provider ID of the node with the specified NodeName.
func (*Cloud) InstanceType ¶
InstanceType returns the type of the specified instance.
func (*Cloud) InstanceTypeByProviderID ¶
func (cloud *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)
InstanceTypeByProviderID returns the type of the specified instance.
func (*Cloud) Instances ¶
func (cloud *Cloud) Instances() (cloudprovider.Instances, bool)
Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) ListRoutes ¶
func (cloud *Cloud) ListRoutes(ctx context.Context, clusterName string) ([]*cloudprovider.Route, error)
ListRoutes lists all managed routes that belong to the specified clusterName
func (*Cloud) LoadBalancer ¶
func (cloud *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
func (*Cloud) NodeAddresses ¶
func (cloud *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
NodeAddresses returns the addresses of the specified instance. TODO(roberthbailey): This currently is only used in such a way that it returns the address of the calling instance. We should do a rename to make this clearer.
func (*Cloud) NodeAddressesByProviderID ¶
func (cloud *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)
NodeAddressesByProviderID returns the addresses of the specified instance. The instance is specified using the providerID of the node. The 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
func (*Cloud) ProviderName ¶
ProviderName returns the cloud provider ID.