manager

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 24 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"
)

Variables

This section is empty.

Functions

This section is empty.

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 {
	ctrlmgr.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 {
	// LeaderElectionEnabled is a flag that enables leader election.
	LeaderElectionEnabled bool

	// LeaderElectionID is the name of the config map to use as the
	// locking resource when configuring leader election.
	LeaderElectionID string

	// SyncPeriod is the amount of time to wait between syncing the local
	// object cache with the API server.
	SyncPeriod time.Duration

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

	// MetricsAddr is the net.Addr string for the metrics server.
	MetricsAddr string

	// HealthAddr is the net.Addr string for the healthcheck server
	HealthAddr string

	// LeaderElectionNamespace is the namespace in which the pod running the
	// controller maintains a leader election lock
	//
	// Defaults to ""
	LeaderElectionNamespace string

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

	// WatchNamespace is the namespace the controllers watch for changes. If
	// no value is specified then all namespaces are watched.
	//
	// Defaults to the eponymous constant in this package.
	WatchNamespace 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

	// WebhookPort is the port that the webhook server serves at.
	WebhookPort int

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

	Logger     logr.Logger
	KubeConfig *rest.Config
	Scheme     *runtime.Scheme
	NewCache   cache.NewCacheFunc

	// 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
}

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