context

package
v0.6.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEnabledControllers = []string{
	"services",
	"configmaps",
	"secrets",
	"endpoints",
	"pods",
	"events",
	"persistentvolumeclaims",
	"ingresses",
	"fake-nodes",
	"fake-persistentvolumes",
}
View Source
var ExistingControllers = map[string]bool{
	"services":               true,
	"configmaps":             true,
	"secrets":                true,
	"endpoints":              true,
	"pods":                   true,
	"events":                 true,
	"fake-nodes":             true,
	"fake-persistentvolumes": true,
	"persistentvolumeclaims": true,
	"ingresses":              true,
	"nodes":                  true,
	"persistentvolumes":      true,
	"storageclasses":         true,
	"priorityclasses":        true,
	"networkpolicies":        true,
	"volumesnapshots":        true,
}

Functions

This section is empty.

Types

type ControllerContext

type ControllerContext struct {
	Context context.Context

	LocalManager   ctrl.Manager
	VirtualManager ctrl.Manager

	CurrentNamespace       string
	CurrentNamespaceClient client.Client
	NodeServiceProvider    nodeservice.NodeServiceProvider

	Controllers map[string]bool

	CacheSynced func()
	LockFactory locks.LockFactory
	Options     *VirtualClusterOptions
	StopChan    <-chan struct{}
}

func NewControllerContext

func NewControllerContext(currentNamespace string, localManager ctrl.Manager, virtualManager ctrl.Manager, options *VirtualClusterOptions) (*ControllerContext, error)

type VirtualClusterOptions

type VirtualClusterOptions struct {
	Controllers string

	ServerCaCert        string
	ServerCaKey         string
	TLSSANs             []string
	RequestHeaderCaCert string
	ClientCaCert        string
	KubeConfig          string

	KubeConfigSecret          string
	KubeConfigSecretNamespace string
	KubeConfigServer          string

	BindAddress string
	Port        int

	Name string

	TargetNamespace string
	ServiceName     string

	SetOwner bool

	SyncAllNodes        bool
	SyncNodeChanges     bool
	DisableFakeKubelets bool

	TranslateImages []string

	NodeSelector        string
	ServiceAccount      string
	EnforceNodeSelector bool

	OverrideHosts               bool
	OverrideHostsContainerImage string

	ClusterDomain string

	LeaderElect   bool
	LeaseDuration int64
	RenewDeadline int64
	RetryPeriod   int64

	// DEPRECATED FLAGS
	DeprecatedDisableSyncResources     string
	DeprecatedOwningStatefulSet        string
	DeprecatedUseFakeNodes             bool
	DeprecatedUseFakePersistentVolumes bool
	DeprecatedEnableStorageClasses     bool
	DeprecatedEnablePriorityClasses    bool
	DeprecatedSuffix                   string
	DeprecatedUseFakeKubelets          bool
}

VirtualClusterOptions holds the cmd flags

Jump to

Keyboard shortcuts

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