Documentation ¶
Index ¶
- Constants
- func ParseExtraHooks(valHooks, mutHooks []interface{}) ([]admissionregistrationv1.ValidatingWebhookConfiguration, ...)
- func ValidateConfigAndSetDefaults(config *VirtualClusterConfig) error
- type ControllerContext
- type LegacyVirtualClusterOptions
- type LegacyVirtualClusterProOptions
- type VirtualClusterConfig
- func (v VirtualClusterConfig) DisableMissingAPIs(discoveryClient discovery.DiscoveryInterface) error
- func (v VirtualClusterConfig) Distro() string
- func (v VirtualClusterConfig) LegacyOptions() (*LegacyVirtualClusterOptions, error)
- func (v VirtualClusterConfig) VirtualClusterKubeConfig() config.VirtualClusterKubeConfig
Constants ¶
View Source
const (
DefaultHostsRewriteImage = "library/alpine:3.13.1"
)
Variables ¶
This section is empty.
Functions ¶
func ParseExtraHooks ¶ added in v0.20.0
func ParseExtraHooks(valHooks, mutHooks []interface{}) ([]admissionregistrationv1.ValidatingWebhookConfiguration, []admissionregistrationv1.MutatingWebhookConfiguration, error)
func ValidateConfigAndSetDefaults ¶ added in v0.20.0
func ValidateConfigAndSetDefaults(config *VirtualClusterConfig) error
Types ¶
type ControllerContext ¶ added in v0.20.0
type ControllerContext struct { Context context.Context LocalManager ctrl.Manager VirtualManager ctrl.Manager VirtualRawConfig *clientcmdapi.Config VirtualClusterVersion *version.Info CurrentNamespace string CurrentNamespaceClient client.Client AdditionalServerFilters []servertypes.Filter Config *VirtualClusterConfig StopChan <-chan struct{} // set of extra services that should handle the traffic or pass it along ExtraHandlers []func(http.Handler) http.Handler }
type LegacyVirtualClusterOptions ¶
type LegacyVirtualClusterOptions struct { // PRO Options ProOptions LegacyVirtualClusterProOptions `json:",inline"` 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"` 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 int `json:"leaseDuration,omitempty"` RenewDeadline int `json:"renewDeadline,omitempty"` RetryPeriod int `json:"retryPeriod,omitempty"` PluginListenAddress string `json:"pluginListenAddress,omitempty"` Plugins []string `json:"plugins,omitempty"` DefaultImageRegistry string `json:"defaultImageRegistry,omitempty"` EnforcePodSecurityStandard string `json:"enforcePodSecurityStandard,omitempty"` SyncLabels []string `json:"syncLabels,omitempty"` // hostpath mapper options // this is only needed if using vcluster-hostpath-mapper component // see: https://github.com/loft-sh/vcluster-hostpath-mapper MountPhysicalHostPaths bool `json:"mountPhysicalHostPaths,omitempty"` HostMetricsBindAddress string `json:"hostMetricsBindAddress,omitempty"` VirtualMetricsBindAddress string `json:"virtualMetricsBindAddress,omitempty"` MultiNamespaceMode bool `json:"multiNamespaceMode,omitempty"` SyncAllSecrets bool `json:"syncAllSecrets,omitempty"` SyncAllConfigMaps bool `json:"syncAllConfigMaps,omitempty"` ProxyMetricsServer bool `json:"proxyMetricsServer,omitempty"` ServiceAccountTokenSecrets bool `json:"serviceAccountTokenSecrets,omitempty"` // DEPRECATED FLAGS DeprecatedSyncNodeChanges bool `json:"syncNodeChanges"` }
LegacyVirtualClusterOptions holds the cmd flags
type LegacyVirtualClusterProOptions ¶
type LegacyVirtualClusterProOptions struct { RemoteKubeConfig string `json:"remoteKubeConfig,omitempty"` RemoteNamespace string `json:"remoteNamespace,omitempty"` RemoteServiceName string `json:"remoteServiceName,omitempty"` EtcdReplicas int `json:"etcdReplicas,omitempty"` IntegratedCoredns bool `json:"integratedCoreDNS,omitempty"` EtcdEmbedded bool `json:"etcdEmbedded,omitempty"` NoopSyncer bool `json:"noopSyncer,omitempty"` SyncKubernetesService bool `json:"synck8sService,omitempty"` }
type VirtualClusterConfig ¶ added in v0.20.0
type VirtualClusterConfig struct { // Holds the vCluster config config.Config `json:",inline"` // Name is the name of the vCluster Name string `json:"name"` // ServiceName is the name of the service of the vCluster ServiceName string `json:"serviceName,omitempty"` // TargetNamespace is the namespace where the workloads go TargetNamespace string `json:"targetNamespace,omitempty"` }
VirtualClusterConfig wraps the config and adds extra info such as name, serviceName and targetNamespace
func ParseConfig ¶ added in v0.20.0
func ParseConfig(path, name string, setValues []string) (*VirtualClusterConfig, error)
func (VirtualClusterConfig) DisableMissingAPIs ¶ added in v0.20.0
func (v VirtualClusterConfig) DisableMissingAPIs(discoveryClient discovery.DiscoveryInterface) error
DisableMissingAPIs checks if the apis are enabled, if any are missing, disable the syncer and print a log
func (VirtualClusterConfig) Distro ¶
func (v VirtualClusterConfig) Distro() string
func (VirtualClusterConfig) LegacyOptions ¶ added in v0.20.0
func (v VirtualClusterConfig) LegacyOptions() (*LegacyVirtualClusterOptions, error)
LegacyOptions converts the config to the legacy cluster options
func (VirtualClusterConfig) VirtualClusterKubeConfig ¶ added in v0.20.0
func (v VirtualClusterConfig) VirtualClusterKubeConfig() config.VirtualClusterKubeConfig
Click to show internal directories.
Click to hide internal directories.