context

package
v0.6.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 7 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,
	"poddisruptionbudgets":   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

	Controllers map[string]bool
	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 `json:"controllers,omitempty"`

	ServerCaCert        string   `json:"serverCaCert,omitempty"`
	ServerCaKey         string   `json:"serverCaKey,omitempty"`
	TLSSANs             []string `json:"tlsSans,omitempty"`
	RequestHeaderCaCert string   `json:"requestHeaderCaCert,omitempty"`
	ClientCaCert        string   `json:"clientCaCert"`
	KubeConfig          string   `json:"kubeConfig"`

	KubeConfigSecret          string   `json:"kubeConfigSecret"`
	KubeConfigSecretNamespace string   `json:"kubeConfigSecretNamespace"`
	KubeConfigServer          string   `json:"kubeConfigServer"`
	Tolerations               []string `json:"tolerations,omitempty"`

	BindAddress string `json:"bindAddress"`
	Port        int    `json:"port"`

	Name string `json:"name"`

	TargetNamespace string `json:"targetNamespace"`
	ServiceName     string `json:"serviceName"`

	SetOwner bool `json:"setOwner"`

	SyncAllNodes        bool `json:"syncAllNodes"`
	SyncNodeChanges     bool `json:"syncNodeChanges"`
	DisableFakeKubelets bool `json:"disableFakeKubelets"`

	TranslateImages []string `json:"translateImages"`

	NodeSelector        string `json:"nodeSelector"`
	ServiceAccount      string `json:"serviceAccount"`
	EnforceNodeSelector bool   `json:"enforceNodeSelector"`

	OverrideHosts               bool   `json:"overrideHosts"`
	OverrideHostsContainerImage string `json:"overrideHostsContainerImage"`

	ClusterDomain string `json:"clusterDomain"`

	LeaderElect   bool  `json:"leaderElect"`
	LeaseDuration int64 `json:"leaseDuration"`
	RenewDeadline int64 `json:"renewDeadline"`
	RetryPeriod   int64 `json:"retryPeriod"`

	DisablePlugins      bool   `json:"disablePlugins"`
	PluginListenAddress string `json:"pluginListenAddress"`

	DefaultImageRegistry string `json:"defaultImageRegistry"`

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