Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultWebhookServiceContainerPort is the default value for the eponymous // manager option. DefaultWebhookServiceContainerPort = 9878 // DefaultSyncPeriod is the default value for the eponymous // manager option. DefaultSyncPeriod = time.Minute * 10 // DefaultMaxConcurrentReconciles is the default value for the eponymous // manager option. DefaultMaxConcurrentReconciles = 1 // DefaultPodNamespace is the default value for the eponymous manager // option. DefaultPodNamespace = defaultPrefix + "system" // DefaultPodName is the default value for the eponymous manager option. DefaultPodName = defaultPrefix + "controller-manager" // DefaultPodServiceAccountName is the default name of the pod service account. DefaultPodServiceAccountName = "default" // DefaultLeaderElectionID is the default value for the eponymous manager option. DefaultLeaderElectionID = DefaultPodName + "-runtime" // DefaultWatchNamespace is the default value for the eponymous manager // option. DefaultWatchNamespace = "" // DefaultWebhookServiceNamespace is the default value for the eponymous // manager option. DefaultWebhookServiceNamespace = defaultPrefix + "system" // DefaultWebhookServiceName is the default value for the eponymous manager // option. DefaultWebhookServiceName = defaultPrefix + "webhook-service" // DefaultWebhookSecretNamespace is the default value for the eponymous // manager option. DefaultWebhookSecretNamespace = defaultPrefix + "system" // DefaultWebhookSecretName is the default value for the eponymous manager // option. DefaultWebhookSecretName = defaultPrefix + "webhook-server-cert" // DefaultWebhookSecretVolumeMountPath is the default value for the // eponymous manager option. //nolint:gosec DefaultWebhookSecretVolumeMountPath = "/tmp/k8s-webhook-server/serving-certs" // DefaultContainerNode is the default value for the eponymous manager option. DefaultContainerNode = false // DefaultInstanceStoragePVPlacementFailedTTL is the default wait time before declaring PV placement failed // after error annotation is set on PVC. DefaultInstanceStoragePVPlacementFailedTTL = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func InitializeProviders ¶
func InitializeProviders(ctx *context.ControllerManagerContext, mgr ctrlmgr.Manager) error
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.
var AddToManagerNoopFn AddToManagerFunc = func(_ *context.ControllerManagerContext, _ ctrlmgr.Manager) error { return nil }
type InitializeProvidersFunc ¶
type InitializeProvidersFunc func(*context.ControllerManagerContext, ctrlmgr.Manager) error
InitializeProvidersFunc is a function that can be optionally specified with the manager's Options in order to explicitly decide what providers in the context are initialized.
var InitializeProvidersNoopFn InitializeProvidersFunc = func(_ *context.ControllerManagerContext, _ ctrlmgr.Manager) error { return nil }
type Manager ¶
type Manager interface {
ctrlmgr.Manager
// GetContext returns the controller manager's context.
GetContext() *context.ControllerManagerContext
}
Manager is a VM Operator 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
// HealthProbeBindAddress is the TCP address that the controller should bind to
// for serving health probes
HealthProbeBindAddress 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
// PodNamespace is the namespace in which the pod running the controller
// manager is located.
//
// 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
// PodServiceAccountName is the name of the pod's service account.
//
// Defaults to the eponymous constant in this package.
PodServiceAccountName 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
// WebhookServiceContainerPort is the port on which the webhook service
// expects the webhook server to listen for incoming requests.
//
// Defaults to the eponymous constant in this package.
WebhookServiceContainerPort int
// WebhookServiceNamespace is the namespace in which the webhook service
// is located.
//
// Defaults to the eponymous constant in this package.
WebhookServiceNamespace string
// WebhookServiceName is the name of the webhook service.
//
// Defaults to the eponymous constant in this package.
WebhookServiceName string
// WebhookSecretNamespace is the namespace in which the webhook secret
// is located.
//
// Defaults to the eponymous constant in this package.
WebhookSecretNamespace string
// WebhookSecretName is the name of the webhook secret.
//
// Defaults to the eponymous constant in this package.
WebhookSecretName string
// WebhookSecretVolumeMountPath is the filesystem path to which the webhook
// secret is mounted.
//
// Defaults to the eponymous constant in this package.
WebhookSecretVolumeMountPath string
// ContainerNode flags whether guest cluster nodes are run in containers (with vcsim).
//
// Defaults to the eponymous constant in this package.
ContainerNode bool
Logger *logr.Logger
KubeConfig *rest.Config
Scheme *runtime.Scheme
NewCache cache.NewCacheFunc
// InitializeProviders is a function that can be optionally specified with the manager's Options in order
// to explicitly initialize the providers.
InitializeProviders InitializeProvidersFunc
// 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 GCM manager.
Click to show internal directories.
Click to hide internal directories.