ccm

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
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 {
	CertificateAlias string
	OneArm           *vcdsdk.OneArm

	EnableVirtualServiceSharedIP bool
	// 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

func (*LBManager) VerifyVCDResourcesForApplicationLB

func (lb *LBManager) VerifyVCDResourcesForApplicationLB(ctx context.Context, service *v1.Service) (bool, error)

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 VmInfo

type VmInfo struct {
	UUID      string
	Name      string
	Type      string
	Addresses []v1.NodeAddress
	TimeStamp time.Time
	// contains filtered or unexported fields
}

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.

func (*VmInfoCache) GetByName

func (vmic *VmInfoCache) GetByName(vmName string) (*VmInfo, error)

func (*VmInfoCache) GetByUUID

func (vmic *VmInfoCache) GetByUUID(vmUUID string) (*VmInfo, error)

Jump to

Keyboard shortcuts

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