Documentation ¶
Index ¶
- Constants
- func GetK8SClient() *kubernetes.Clientset
- type LBManager
- func (lb *LBManager) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (lbs *v1.LoadBalancerStatus, err error)
- func (lb *LBManager) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error
- func (lb *LBManager) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (lb *LBManager) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string
- func (lb *LBManager) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (err error)
- type VCDCloudProvider
- func (vcdCP *VCDCloudProvider) Clusters() (cloudProvider.Clusters, bool)
- func (vcdCP *VCDCloudProvider) HasClusterID() bool
- func (vcdCP *VCDCloudProvider) Initialize(clientBuilder cloudProvider.ControllerClientBuilder, stop <-chan struct{})
- func (vcdCP *VCDCloudProvider) Instances() (cloudProvider.Instances, bool)
- func (_ *VCDCloudProvider) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (vcdCP *VCDCloudProvider) LoadBalancer() (cloudProvider.LoadBalancer, bool)
- func (vcdCP *VCDCloudProvider) ProviderName() string
- func (vcdCP *VCDCloudProvider) Routes() (cloudProvider.Routes, bool)
- func (vcdCP *VCDCloudProvider) Zones() (cloudProvider.Zones, bool)
- type VmInfo
- type VmInfoCache
Constants ¶
const (
ProviderName = "vmware-cloud-director"
)
ProviderName : name of the cloud provider
Variables ¶
This section is empty.
Functions ¶
func GetK8SClient ¶
func GetK8SClient() *kubernetes.Clientset
GetK8SClient : Get pre-initialized kube-client
Types ¶
type LBManager ¶
type LBManager struct {
// contains filtered or unexported fields
}
LBManager -
func (*LBManager) EnsureLoadBalancer ¶
func (lb *LBManager) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (lbs *v1.LoadBalancerStatus, err 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 (*LBManager) EnsureLoadBalancerDeleted ¶
func (lb *LBManager) 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 (*LBManager) GetLoadBalancer ¶
func (lb *LBManager) 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. 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 (*LBManager) GetLoadBalancerName ¶
func (lb *LBManager) 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 (*LBManager) UpdateLoadBalancer ¶
func (lb *LBManager) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (err 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
type VCDCloudProvider ¶
type VCDCloudProvider struct {
// contains filtered or unexported fields
}
VCDCloudProvider - contains all of the interfaces for our cloud provider
func (*VCDCloudProvider) Clusters ¶
func (vcdCP *VCDCloudProvider) Clusters() (cloudProvider.Clusters, bool)
Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
func (*VCDCloudProvider) HasClusterID ¶
func (vcdCP *VCDCloudProvider) HasClusterID() bool
HasClusterID provides an opportunity for cloud-provider-specific code to process DNS settings for pods.
func (*VCDCloudProvider) Initialize ¶
func (vcdCP *VCDCloudProvider) Initialize(clientBuilder cloudProvider.ControllerClientBuilder, stop <-chan struct{})
Initialize - starts the cloud-provider controller
func (*VCDCloudProvider) Instances ¶
func (vcdCP *VCDCloudProvider) Instances() (cloudProvider.Instances, bool)
Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
func (*VCDCloudProvider) InstancesV2 ¶
func (_ *VCDCloudProvider) InstancesV2() (cloudprovider.InstancesV2, bool)
func (*VCDCloudProvider) LoadBalancer ¶
func (vcdCP *VCDCloudProvider) LoadBalancer() (cloudProvider.LoadBalancer, bool)
LoadBalancer returns a loadbalancer interface. Also returns true if the interface is supported, false otherwise.
func (*VCDCloudProvider) ProviderName ¶
func (vcdCP *VCDCloudProvider) ProviderName() string
ProviderName returns the cloud provider ID.
func (*VCDCloudProvider) Routes ¶
func (vcdCP *VCDCloudProvider) Routes() (cloudProvider.Routes, bool)
Routes returns a routes interface along with whether the interface is supported.
func (*VCDCloudProvider) Zones ¶
func (vcdCP *VCDCloudProvider) Zones() (cloudProvider.Zones, bool)
Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
type VmInfoCache ¶
type VmInfoCache struct {
// contains filtered or unexported fields
}
VmInfoCache caches VM details. Ideally we need a LRU cache with ttl-based expiry. But since we have ~10k nodes per cluster, we can ignore limits and expiry.