vsphereparavirtual

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RegisteredProviderName is the name of the cloud provider registered with
	// Kubernetes.
	RegisteredProviderName string = "vsphere-paravirtual"

	// ProviderName is the name used for constructing Provider ID
	ProviderName string = "vsphere"

	// CloudControllerManagerNS is the namespace for vsphere paravirtual cluster cloud provider
	CloudControllerManagerNS = "vmware-system-cloud-provider"
)
View Source
const (
	// VsphereParavirtualCloudProviderConfigPath is the path for vsphere paravirtual cloud provider config file
	VsphereParavirtualCloudProviderConfigPath string = "/etc/kubernetes/guestclusters/tanzukubernetescluster/ownerref.json"
	// SupervisorClusterConfigPath is the path for supervisor access related files,
	// like secret related file
	SupervisorClusterConfigPath = "/etc/cloud/ccm-provider"
	// SupervisorClusterAccessTokenFile is the access token file for supervisor access
	SupervisorClusterAccessTokenFile = "token"
	// SupervisorClusterAccessCAFile is the CA file for supervisor access
	SupervisorClusterAccessCAFile = "ca.crt"
	// SupervisorClusterAccessNamespaceFile is the namespace for supervisor access
	SupervisorClusterAccessNamespaceFile = "namespace"
	// SupervisorAPIServerPortEnv reads supervisor service endpoint info from env
	SupervisorAPIServerPortEnv string = "SUPERVISOR_APISERVER_PORT"
	// SupervisorAPIServerEndpointIPEnv reads supervisor API server endpoint IP from env
	SupervisorAPIServerEndpointIPEnv string = "SUPERVISOR_APISERVER_ENDPOINT_IP"
	// SupervisorServiceAccountNameEnv reads supervisor service account name from env
	SupervisorServiceAccountNameEnv string = "SUPERVISOR_CLUSTER_SERVICEACCOUNT_SECRET_NAME"
	// SupervisorAPIServerFQDN reads supervisor service API server's fully qualified domain name from env
	SupervisorAPIServerFQDN string = "supervisor.default.svc"
)
View Source
const (
	// LabelKeyClusterName is the label key to specify GC name for RouteSet CR
	LabelKeyClusterName = "clusterName"
	// RealizedStateTimeout is the timeout duration for realized state check
	RealizedStateTimeout = 10 * time.Second
	// RealizedStateSleepTime is the interval between realized state check
	RealizedStateSleepTime = 1 * time.Second
)

Variables

View Source
var (
	// SupervisorClusterSecret is the name of vsphere paravirtual supervisor cluster cloud provider secret
	SupervisorClusterSecret = "cloud-provider-creds"

	// ClusterName contains the cluster-name flag injected from main, needed for cleanup
	ClusterName string

	// RouteEnabled if set to true, will start ippool and node controller.
	RouteEnabled bool
)
View Source
var (
	ErrGetRouteSet    = errors.New("failed to get RouteSet")
	ErrCreateRouteSet = errors.New("failed to create RouteSet")
	ErrListRouteSet   = errors.New("failed to list RouteSet")
	ErrDeleteRouteSet = errors.New("failed to delete RouteSet")
)

A list of possible RouteSet operation error messages

View Source
var DiscoverNodeBackoff = wait.Backoff{
	Steps:    20,
	Duration: 50 * time.Millisecond,
	Jitter:   1.0,
}

DiscoverNodeBackoff is set to be the same with https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cloud/node_controller.go#L83

Functions

func GetRouteSetClient added in v1.21.0

func GetRouteSetClient(config *rest.Config) (client.Interface, error)

GetRouteSetClient returns a new RouteSet client that can be used to access SC

func GetRouteSetCondition added in v1.21.0

func GetRouteSetCondition(status *v1alpha1.RouteSetStatus, conditionType v1alpha1.RouteSetConditionType) *v1alpha1.RouteSetCondition

GetRouteSetCondition extracts the provided condition from the given RouteSetStatus and returns that. Returns nil if the condition is not present.

func GetUUIDFromProviderID

func GetUUIDFromProviderID(providerID string) string

GetUUIDFromProviderID returns a UUID from the supplied cloud provider ID.

func NewInstances

func NewInstances(clusterNS string, kcfg *rest.Config) (cloudprovider.Instances, error)

NewInstances returns an implementation of cloudprovider.Instances

func NewLoadBalancer

func NewLoadBalancer(clusterNS string, kcfg *rest.Config, ownerRef *metav1.OwnerReference) (cloudprovider.LoadBalancer, error)

NewLoadBalancer returns an implementation of cloudprovider.LoadBalancer

func NewZones added in v1.21.2

func NewZones(namespace string, kcfg *rest.Config) (cloudprovider.Zones, error)

NewZones returns an implementation of cloudprovider.Instances

Types

type RoutesProvider added in v1.21.0

type RoutesProvider interface {
	cloudprovider.Routes
	AddNode(*v1.Node)
	DeleteNode(*v1.Node)
}

RoutesProvider is the interface definition for Routes functionality

func NewRoutes added in v1.21.0

func NewRoutes(clusterNS string, kcfg *rest.Config, ownerRef metav1.OwnerReference) (RoutesProvider, error)

NewRoutes returns an implementation of RoutesProvider

type SupervisorEndpoint

type SupervisorEndpoint struct {
	// supervisor cluster proxy service hostname
	Endpoint string
	// supervisor cluster proxy service  port
	Port string
}

SupervisorEndpoint is the supervisor cluster endpoint

type VSphereParavirtual

type VSphereParavirtual struct {
	// contains filtered or unexported fields
}

VSphereParavirtual is an implementation of cloud provider Interface for vsphere paravirtual.

func (*VSphereParavirtual) Clusters

func (cp *VSphereParavirtual) Clusters() (cloudprovider.Clusters, bool)

Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.

func (*VSphereParavirtual) HasClusterID

func (cp *VSphereParavirtual) HasClusterID() bool

HasClusterID returns true if a ClusterID is required and set/

func (*VSphereParavirtual) Initialize

func (cp *VSphereParavirtual) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})

Initialize initializes the vSphere paravirtual cloud provider.

func (*VSphereParavirtual) Instances

func (cp *VSphereParavirtual) Instances() (cloudprovider.Instances, bool)

Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.

func (*VSphereParavirtual) InstancesV2

func (cp *VSphereParavirtual) InstancesV2() (cloudprovider.InstancesV2, bool)

InstancesV2 returns an implementation of cloudprovider.InstancesV2.

TODO: implement this for v1.20

func (*VSphereParavirtual) LoadBalancer

func (cp *VSphereParavirtual) LoadBalancer() (cloudprovider.LoadBalancer, bool)

LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.

func (*VSphereParavirtual) ProviderName

func (cp *VSphereParavirtual) ProviderName() string

ProviderName returns the cloud provider ID. Note: Returns 'vsphere' instead of 'vsphere-paravirtual' since CAPV expects the ProviderID to be in form 'vsphere://***' https://github.com/kubernetes/cloud-provider-vsphere/issues/447

func (*VSphereParavirtual) Routes

func (cp *VSphereParavirtual) Routes() (cloudprovider.Routes, bool)

Routes returns a routes interface along with whether the interface is supported.

func (*VSphereParavirtual) Zones

func (cp *VSphereParavirtual) Zones() (cloudprovider.Zones, bool)

Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.

Directories

Path Synopsis
apis
nsxnetworking/v1alpha1
Package v1alpha1 contains API Schema definitions for the nsxnetworking v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=nsx.vmware.com
Package v1alpha1 contains API Schema definitions for the nsxnetworking v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=nsx.vmware.com
client
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/nsxnetworking/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/nsxnetworking/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
controllers

Jump to

Keyboard shortcuts

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