qingcloud

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProviderName = "qingcloud"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Global struct {
		QYConfigPath      string `gcfg:"qyConfigPath"`
		Zone              string `gcfg:"zone"`
		DefaultVxNetForLB string `gcfg:"defaultVxNetForLB"`
		ClusterID         string `gcfg:"clusterID"`
		IsApp             bool   `gcfg:"isApp"`
	}
}

type QingCloud

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

A single Kubernetes cluster can run in multiple zones, but only within the same region (and cloud provider).

func (*QingCloud) AddSSHKeyToAllInstances

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

AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances. The method is currently only used in gce.

func (*QingCloud) Clusters

func (qc *QingCloud) Clusters() (cloudprovider.Clusters, bool)

func (*QingCloud) CurrentNodeName

func (qc *QingCloud) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error)

func (*QingCloud) EnsureLoadBalancer

func (qc *QingCloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)

EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager

func (*QingCloud) EnsureLoadBalancerDeleted

func (qc *QingCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error

EnsureLoadBalancerDeleted deletes the specified load balancer if it exists, returning nil if the load balancer specified either didn't exist or was successfully deleted. This construction is useful because many cloud providers' load balancers have multiple underlying components, meaning a Get could say that the LB doesn't exist even if some part of it is still laying around. Implementations must treat the *v1.Service parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager

func (*QingCloud) GetLoadBalancer

func (qc *QingCloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)

GetLoadBalancer returns whether the specified load balancer exists, and if so, what its status is.

func (*QingCloud) GetLoadBalancerName

func (qc *QingCloud) GetLoadBalancerName(_ context.Context, clusterName string, service *v1.Service) string

GetLoadBalancerName returns the name of the load balancer. Implementations must treat the *v1.Service parameter as read-only and not modify it.

func (*QingCloud) GetZone

func (qc *QingCloud) GetZone(ctx context.Context) (cloudprovider.Zone, error)

func (*QingCloud) GetZoneByNodeName

func (qc *QingCloud) 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 (*QingCloud) GetZoneByProviderID

func (qc *QingCloud) 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 (*QingCloud) HasClusterID

func (qc *QingCloud) HasClusterID() bool

HasClusterID returns true if the cluster has a clusterID

func (*QingCloud) Initialize

func (qc *QingCloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})

func (*QingCloud) InstanceExistsByProviderID

func (qc *QingCloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)

func (*QingCloud) InstanceID

func (qc *QingCloud) InstanceID(_ context.Context, nodeName types.NodeName) (string, error)

func (*QingCloud) InstanceShutdownByProviderID

func (qc *QingCloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)

func (*QingCloud) InstanceType

func (qc *QingCloud) InstanceType(ctx context.Context, name types.NodeName) (string, error)

func (*QingCloud) InstanceTypeByProviderID

func (qc *QingCloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)

func (*QingCloud) Instances

func (qc *QingCloud) Instances() (cloudprovider.Instances, bool)

Instances returns an implementation of Instances for QingCloud.

func (*QingCloud) LoadBalancer

func (qc *QingCloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)

LoadBalancer returns an implementation of LoadBalancer for QingCloud.

func (*QingCloud) NodeAddresses

func (qc *QingCloud) NodeAddresses(_ 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 (*QingCloud) NodeAddressesByProviderID

func (qc *QingCloud) NodeAddressesByProviderID(_ context.Context, providerID string) ([]v1.NodeAddress, error)

func (*QingCloud) ProviderName

func (qc *QingCloud) ProviderName() string

func (*QingCloud) Routes

func (qc *QingCloud) Routes() (cloudprovider.Routes, bool)

func (*QingCloud) UpdateLoadBalancer

func (qc *QingCloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error

UpdateLoadBalancer updates hosts under the specified load balancer. Implementations must treat the *v1.Service and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager

func (*QingCloud) Zones

func (qc *QingCloud) Zones() (cloudprovider.Zones, bool)

Jump to

Keyboard shortcuts

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