Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultHostsRewriteImage = "library/alpine:3.13.1" GenericConfig = "CONFIG" )
Variables ¶
View Source
var DefaultEnabledControllers = sets.New(
"services",
"configmaps",
"secrets",
"endpoints",
"pods",
"events",
"persistentvolumeclaims",
"fake-nodes",
"fake-persistentvolumes",
)
View Source
var ExistingControllers = sets.New(
"services",
"configmaps",
"secrets",
"endpoints",
"pods",
"events",
"fake-nodes",
"fake-persistentvolumes",
"persistentvolumeclaims",
"ingresses",
"ingressclasses",
"nodes",
"persistentvolumes",
"storageclasses",
"hoststorageclasses",
"priorityclasses",
"networkpolicies",
"volumesnapshots",
"poddisruptionbudgets",
"serviceaccounts",
"csinodes",
"csidrivers",
"csistoragecapacities",
"namespaces",
)
Functions ¶
func AddFlags ¶ added in v0.13.0
func AddFlags(flags *pflag.FlagSet, options *VirtualClusterOptions)
Types ¶
type ControllerContext ¶
type ControllerContext struct { Context context.Context LocalManager ctrl.Manager VirtualManager ctrl.Manager CurrentNamespace string CurrentNamespaceClient client.Client Controllers sets.Set[string] Options *VirtualClusterOptions StopChan <-chan struct{} }
func NewControllerContext ¶
func NewControllerContext(currentNamespace string, localManager, 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,omitempty"` KubeConfigPath string `json:"kubeConfig,omitempty"` KubeConfigContextName string `json:"kubeConfigContextName,omitempty"` KubeConfigSecret string `json:"kubeConfigSecret,omitempty"` KubeConfigSecretNamespace string `json:"kubeConfigSecretNamespace,omitempty"` KubeConfigServer string `json:"kubeConfigServer,omitempty"` Tolerations []string `json:"tolerations,omitempty"` BindAddress string `json:"bindAddress,omitempty"` Port int `json:"port,omitempty"` Name string `json:"name,omitempty"` TargetNamespace string `json:"targetNamespace,omitempty"` ServiceName string `json:"serviceName,omitempty"` SetOwner bool `json:"setOwner,omitempty"` SyncAllNodes bool `json:"syncAllNodes,omitempty"` EnableScheduler bool `json:"enableScheduler,omitempty"` DisableFakeKubelets bool `json:"disableFakeKubelets,omitempty"` FakeKubeletIPs bool `json:"fakeKubeletIPs,omitempty"` ClearNodeImages bool `json:"clearNodeImages,omitempty"` TranslateImages []string `json:"translateImages,omitempty"` NodeSelector string `json:"nodeSelector,omitempty"` EnforceNodeSelector bool `json:"enforceNodeSelector,omitempty"` ServiceAccount string `json:"serviceAccount,omitempty"` OverrideHosts bool `json:"overrideHosts,omitempty"` OverrideHostsContainerImage string `json:"overrideHostsContainerImage,omitempty"` ClusterDomain string `json:"clusterDomain,omitempty"` LeaderElect bool `json:"leaderElect,omitempty"` LeaseDuration int64 `json:"leaseDuration,omitempty"` RenewDeadline int64 `json:"renewDeadline,omitempty"` RetryPeriod int64 `json:"retryPeriod,omitempty"` DisablePlugins bool `json:"disablePlugins,omitempty"` PluginListenAddress string `json:"pluginListenAddress,omitempty"` Plugins []string `json:"plugins,omitempty"` DefaultImageRegistry string `json:"defaultImageRegistry,omitempty"` EnforcePodSecurityStandard string `json:"enforcePodSecurityStandard,omitempty"` MapHostServices []string `json:"mapHostServices,omitempty"` MapVirtualServices []string `json:"mapVirtualServices,omitempty"` SyncLabels []string `json:"syncLabels,omitempty"` // hostpath mapper options RewriteHostPaths bool `json:"rewriteHostPaths,omitempty"` VirtualLogsPath string VirtualPodLogsPath string VirtualContainerLogsPath string VirtualKubeletPodPath string HostMetricsBindAddress string `json:"hostMetricsBindAddress,omitempty"` VirtualMetricsBindAddress string `json:"virtualMetricsBindAddress,omitempty"` MultiNamespaceMode bool `json:"multiNamespaceMode,omitempty"` NamespaceLabels []string `json:"namespaceLabels,omitempty"` SyncAllSecrets bool `json:"syncAllSecrets,omitempty"` SyncAllConfigMaps bool `json:"syncAllConfigMaps,omitempty"` ProxyMetricsServer bool `json:"proxyMetricsServer,omitempty"` // DEPRECATED FLAGS DeprecatedSyncNodeChanges bool `json:"syncNodeChanges"` DeprecatedDisableSyncResources string DeprecatedOwningStatefulSet string DeprecatedUseFakeNodes bool DeprecatedUseFakePersistentVolumes bool DeprecatedEnableStorageClasses bool DeprecatedEnablePriorityClasses bool DeprecatedSuffix string DeprecatedUseFakeKubelets bool }
VirtualClusterOptions holds the cmd flags
Click to show internal directories.
Click to hide internal directories.