Documentation ¶
Index ¶
- Constants
- type Config
- type QingCloud
- func (qc *QingCloud) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error
- func (qc *QingCloud) Clusters() (cloudprovider.Clusters, bool)
- func (qc *QingCloud) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error)
- func (qc *QingCloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (qc *QingCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (qc *QingCloud) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (qc *QingCloud) GetLoadBalancerName(_ context.Context, clusterName string, service *v1.Service) string
- func (qc *QingCloud) GetZone(ctx context.Context) (cloudprovider.Zone, error)
- func (qc *QingCloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
- func (qc *QingCloud) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
- func (qc *QingCloud) HasClusterID() bool
- func (qc *QingCloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
- func (qc *QingCloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)
- func (qc *QingCloud) InstanceID(_ context.Context, nodeName types.NodeName) (string, error)
- func (qc *QingCloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)
- func (qc *QingCloud) InstanceType(ctx context.Context, name types.NodeName) (string, error)
- func (qc *QingCloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)
- func (qc *QingCloud) Instances() (cloudprovider.Instances, bool)
- func (qc *QingCloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (qc *QingCloud) NodeAddresses(_ context.Context, name types.NodeName) ([]v1.NodeAddress, error)
- func (qc *QingCloud) NodeAddressesByProviderID(_ context.Context, providerID string) ([]v1.NodeAddress, error)
- func (qc *QingCloud) ProviderName() string
- func (qc *QingCloud) Routes() (cloudprovider.Routes, bool)
- func (qc *QingCloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- func (qc *QingCloud) Zones() (cloudprovider.Zones, bool)
Constants ¶
const (
ProviderName = "qingcloud"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) CurrentNodeName ¶
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) 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 ¶
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 (*QingCloud) InstanceID ¶
func (*QingCloud) InstanceShutdownByProviderID ¶
func (*QingCloud) InstanceType ¶
func (*QingCloud) InstanceTypeByProviderID ¶
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 (*QingCloud) ProviderName ¶
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