Documentation
¶
Index ¶
- type LoadBalancerController
- func (l *LoadBalancerController) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (l *LoadBalancerController) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (l *LoadBalancerController) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (l *LoadBalancerController) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (l *LoadBalancerController) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
- func (l *LoadBalancerController) UpdateLoadBalancerConfig(ctx context.Context, nodes []v1.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadBalancerController ¶
type LoadBalancerController struct { MetalService *metal.MetalService K8sClientSet clientset.Interface K8sClient client.Client // contains filtered or unexported fields }
func New ¶
func New(partitionID, projectID, clusterID, defaultExternalNetworkID string, additionalNetworks []string, loadBalancerType config.LoadBalancerType) *LoadBalancerController
New returns a new load balancer controller that satisfies the kubernetes cloud provider load balancer interface
func (*LoadBalancerController) EnsureLoadBalancer ¶
func (l *LoadBalancerController) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
EnsureLoadBalancer ensures that the cluster is running a load balancer for service. It creates a new load balancer or updates the existing one. Returns the status of the balancer. Neither 'service' nor 'nodes' are modified. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager.
func (*LoadBalancerController) EnsureLoadBalancerDeleted ¶
func (l *LoadBalancerController) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
EnsureLoadBalancerDeleted deletes the cluster 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. Parameter 'service' is not modified. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*LoadBalancerController) GetLoadBalancer ¶
func (l *LoadBalancerController) 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. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager.
func (*LoadBalancerController) GetLoadBalancerName ¶
func (l *LoadBalancerController) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
GetLoadBalancerName returns the name of the load balancer.
func (*LoadBalancerController) UpdateLoadBalancer ¶
func (l *LoadBalancerController) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
UpdateLoadBalancer updates hosts under the specified load balancer. Neither 'service' nor 'nodes' are modified. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager.
func (*LoadBalancerController) UpdateLoadBalancerConfig ¶ added in v0.9.2
func (l *LoadBalancerController) UpdateLoadBalancerConfig(ctx context.Context, nodes []v1.Node) error
UpdateLoadBalancerConfig updates the load balancer config for the given nodes