rancher

package
v1.10.5-rancher-v2-1-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider struct {
	// contains filtered or unexported fields
}

CloudProvider implents Instances, Zones, and LoadBalancer

func (*CloudProvider) AddSSHKeyToAllInstances

func (r *CloudProvider) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error

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 (*CloudProvider) Clusters

func (r *CloudProvider) Clusters() (cloudprovider.Clusters, bool)

Clusters not supported

func (*CloudProvider) CurrentNodeName

func (r *CloudProvider) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error)

CurrentNodeName returns the name of the node we are currently running on

func (*CloudProvider) EnsureLoadBalancer

func (r *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName string, service *api.Service, nodes []*api.Node) (*api.LoadBalancerStatus, error)

EnsureLoadBalancer is an implementation of LoadBalancer.EnsureLoadBalancer.

func (*CloudProvider) EnsureLoadBalancerDeleted

func (r *CloudProvider) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *api.Service) error

EnsureLoadBalancerDeleted is an implementation of LoadBalancer.EnsureLoadBalancerDeleted.

func (*CloudProvider) ExternalID

func (r *CloudProvider) ExternalID(ctx context.Context, nodeName types.NodeName) (string, error)

ExternalID returns the cloud provider ID of the specified instance (deprecated).

func (*CloudProvider) GetLoadBalancer

func (r *CloudProvider) GetLoadBalancer(ctx context.Context, clusterName string, service *api.Service) (status *api.LoadBalancerStatus, exists bool, retErr error)

GetLoadBalancer is an implementation of LoadBalancer.GetLoadBalancer

func (*CloudProvider) GetSetting

func (r *CloudProvider) GetSetting(key string) (string, bool)

func (*CloudProvider) GetZone

func (r *CloudProvider) GetZone(ctx context.Context) (cloudprovider.Zone, error)

GetZone is an implementation of Zones.GetZone

func (*CloudProvider) GetZoneByNodeName

func (r *CloudProvider) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)

GetZoneByNodeName implements Zones.GetZoneByNodeName This is particularly useful in external cloud providers where the kubelet does not initialize node data.

func (*CloudProvider) GetZoneByProviderID

func (r *CloudProvider) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)

GetZoneByProviderID implements Zones.GetZoneByProviderID This is particularly useful in external cloud providers where the kubelet does not initialize node data.

func (*CloudProvider) HasClusterID

func (r *CloudProvider) HasClusterID() bool

HasClusterID returns true if the cluster has a clusterID

func (*CloudProvider) Initialize

func (r *CloudProvider) Initialize(clientBuilder controller.ControllerClientBuilder)

Initialize passes a Kubernetes clientBuilder interface to the cloud provider

func (*CloudProvider) InstanceExistsByProviderID

func (c *CloudProvider) InstanceExistsByProviderID(pctx context.Context, roviderID string) (bool, error)

InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.

func (*CloudProvider) InstanceID

func (r *CloudProvider) InstanceID(ctx context.Context, nodeName types.NodeName) (string, error)

InstanceID returns the cloud provider ID of the specified instance.

func (*CloudProvider) InstanceType

func (r *CloudProvider) InstanceType(ctx context.Context, nodeName types.NodeName) (string, error)

InstanceType returns the type of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)

func (*CloudProvider) InstanceTypeByProviderID

func (r *CloudProvider) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)

InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID This method 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 (*CloudProvider) Instances

func (r *CloudProvider) Instances() (cloudprovider.Instances, bool)

Instances returns an implementation of Instances for Rancher

func (*CloudProvider) List

func (r *CloudProvider) List(filter string) ([]types.NodeName, error)

List lists instances that match 'filter' which is a regular expression which must match the entire instance name (fqdn)

func (*CloudProvider) LoadBalancer

func (r *CloudProvider) LoadBalancer() (cloudprovider.LoadBalancer, bool)

LoadBalancer returns an implementation of LoadBalancer for Rancher

func (*CloudProvider) NodeAddresses

func (r *CloudProvider) NodeAddresses(ctx context.Context, nodeName types.NodeName) ([]api.NodeAddress, error)

NodeAddresses returns the addresses of the specified instance. This implementation only returns the address of the calling instance. This is ok because the gce implementation makes that assumption and the comment for the interface states it as a todo to clarify that it is only for the current host

func (*CloudProvider) NodeAddressesByProviderID

func (r *CloudProvider) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]api.NodeAddress, error)

NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID This method 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 (*CloudProvider) ProviderName

func (r *CloudProvider) ProviderName() string

ProviderName returns the cloud provider ID.

func (*CloudProvider) Routes

func (r *CloudProvider) Routes() (cloudprovider.Routes, bool)

Routes not supported

func (*CloudProvider) ScrubDNS

func (r *CloudProvider) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string)

ScrubDNS filters DNS settings for pods.

func (*CloudProvider) UpdateLoadBalancer

func (r *CloudProvider) UpdateLoadBalancer(ctx context.Context, clusterName string, service *api.Service, nodes []*api.Node) error

UpdateLoadBalancer is an implementation of LoadBalancer.UpdateLoadBalancer.

func (*CloudProvider) Zones

func (r *CloudProvider) Zones() (cloudprovider.Zones, bool)

Zones returns an implementation of Zones for Rancher

type Host

type Host struct {
	RancherHost *client.Host
	IPAddresses []client.IpAddress
}

type PublicEndpoint

type PublicEndpoint struct {
	IPAddress string
	Port      int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL