manager

package
v1.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// DefaultWebhookServiceContainerPort is the default value for the eponymous
	// manager option.
	DefaultWebhookServiceContainerPort = 0

	// DefaultSyncPeriod is the default value for the eponymous
	// manager option.
	DefaultSyncPeriod = time.Minute * 10

	// DefaultPodName is the default value for the eponymous manager option.
	DefaultPodName = defaultPrefix + "controller-manager"

	DefaultPodNamespace = defaultPrefix + "system"

	// DefaultLeaderElectionID is the default value for the eponymous manager option.
	DefaultLeaderElectionID = DefaultPodName + "-runtime"
)
View Source
const (
	NSXNetworkProvider   = "NSX"
	VDSNetworkProvider   = "vsphere-network"
	DummyNetworkProvider = "DummyNetworkProvider"
)

Variables

This section is empty.

Functions

func GetNetworkProvider added in v1.1.0

GetNetworkProvider will return a network provider instance based on the environment the cfg is used to initialize a client that talks directly to api-server without using the cache

Types

type AddToManagerFunc

type AddToManagerFunc func(*context.ControllerManagerContext, ctrlmgr.Manager) error

AddToManagerFunc is a function that can be optionally specified with the manager's Options in order to explicitly decide what controllers and webhooks to add to the manager.

type Manager

type Manager interface {
	ctrl.Manager

	// GetContext returns the controller manager's context.
	GetContext() *context.ControllerManagerContext
}

Manager is a CAPV controller manager.

func New

func New(opts Options) (Manager, error)

New returns a new CAPV controller manager.

type Options

type Options struct {
	ctrlmgr.Options

	// EnableKeepAlive is a session feature to enable keep alive handler
	// for better load management on vSphere api server
	EnableKeepAlive bool

	// MaxConcurrentReconciles the maximum number of allowed, concurrent
	// reconciles.
	//
	// Defaults to the eponymous constant in this package.
	MaxConcurrentReconciles int

	// LeaderElectionNamespace is the namespace in which the pod running the
	// controller maintains a leader election lock
	//
	// Defaults to the eponymous constant in this package.
	PodNamespace string

	// PodName is the name of the pod running the controller manager.
	//
	// Defaults to the eponymous constant in this package.
	PodName string

	// Username is the username for the account used to access remote vSphere
	// endpoints.
	Username string

	// Password is the password for the account used to access remote vSphere
	// endpoints.
	Password string

	// KeepAliveDuration is the idle time interval in between send() requests
	// in keepalive handler
	KeepAliveDuration time.Duration

	// CredentialsFile is the file that contains credentials of CAPV
	CredentialsFile string

	KubeConfig *rest.Config

	// AddToManager is a function that can be optionally specified with
	// the manager's Options in order to explicitly decide what controllers
	// and webhooks to add to the manager.
	AddToManager AddToManagerFunc

	// NetworkProvider is the network provider used by Supervisor based clusters.
	// If not set, it will default to a DummyNetworkProvider which is intended for testing purposes.
	// VIM based clusters and managers will not need to set this flag.
	NetworkProvider string
}

Options describes the options used to create a new CAPV manager.

Jump to

Keyboard shortcuts

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