Documentation ¶
Index ¶
- type CloudProvider
- func (p *CloudProvider) Clusters() (cloudprovider.Clusters, bool)
- func (p *CloudProvider) HasClusterID() bool
- func (p *CloudProvider) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
- func (p *CloudProvider) Instances() (cloudprovider.Instances, bool)
- func (p *CloudProvider) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (p *CloudProvider) ProviderName() string
- func (p *CloudProvider) Routes() (cloudprovider.Routes, bool)
- func (p *CloudProvider) Zones() (cloudprovider.Zones, bool)
- type ShimLoadBalancer
- func (b *ShimLoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (b *ShimLoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (b *ShimLoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (b *ShimLoadBalancer) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (b *ShimLoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudProvider ¶
type CloudProvider struct { Name string LB *ShimLoadBalancer }
func (*CloudProvider) Clusters ¶
func (p *CloudProvider) Clusters() (cloudprovider.Clusters, bool)
Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
func (*CloudProvider) HasClusterID ¶
func (p *CloudProvider) HasClusterID() bool
HasClusterID returns true if a ClusterID is required and set
func (*CloudProvider) Initialize ¶
func (p *CloudProvider) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
Initialize provides the cloud with a kubernetes client builder and may spawn goroutines to perform housekeeping or run custom controllers specific to the cloud provider. Any tasks started here should be cleaned up when the stop channel closes.
func (*CloudProvider) Instances ¶
func (p *CloudProvider) Instances() (cloudprovider.Instances, bool)
Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (*CloudProvider) LoadBalancer ¶
func (p *CloudProvider) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
func (*CloudProvider) ProviderName ¶
func (p *CloudProvider) ProviderName() string
ProviderName returns the cloud provider ID.
func (*CloudProvider) Routes ¶
func (p *CloudProvider) Routes() (cloudprovider.Routes, bool)
Routes returns a routes interface along with whether the interface is supported.
func (*CloudProvider) Zones ¶
func (p *CloudProvider) Zones() (cloudprovider.Zones, bool)
Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
type ShimLoadBalancer ¶
type ShimLoadBalancer struct {
// contains filtered or unexported fields
}
func NewShimLoadBalancer ¶
func NewShimLoadBalancer( l *logrus.Logger, cl pb.ShimLoadBalancerServiceClient, ) *ShimLoadBalancer
func (*ShimLoadBalancer) EnsureLoadBalancer ¶
func (b *ShimLoadBalancer) 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 (*ShimLoadBalancer) EnsureLoadBalancerDeleted ¶
func (b *ShimLoadBalancer) 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 (*ShimLoadBalancer) GetLoadBalancer ¶
func (b *ShimLoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
TODO: Break this up into different interfaces (LB, etc) when we have more than one type of service GetLoadBalancer returns whether the specified load balancer exists, and if so, what its status is. 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 (*ShimLoadBalancer) GetLoadBalancerName ¶
func (b *ShimLoadBalancer) GetLoadBalancerName(ctx 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 (*ShimLoadBalancer) UpdateLoadBalancer ¶
func (b *ShimLoadBalancer) 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