Documentation
¶
Index ¶
- func ApplyCoreDNS(controllerContext *options.ControllerContext)
- func CreateVClusterKubeConfig(config *clientcmdapi.Config, options *options.VirtualClusterOptions) (*clientcmdapi.Config, error)
- func DisableMissingAPIs(discoveryClient discovery.DiscoveryInterface, controllers sets.Set[string]) (sets.Set[string], error)
- func GenerateCertsWithEtcdSans(ctx context.Context, currentNamespaceClient kubernetes.Interface, ...) error
- func GenerateK8sCerts(ctx context.Context, currentNamespaceClient kubernetes.Interface, ...) error
- func InitControllerContext(ctx context.Context, currentNamespace string, ...) (*options.ControllerContext, error)
- func InitManagers(ctx context.Context, options *options.VirtualClusterOptions, ...) (*options.ControllerContext, error)
- func Initialize(ctx context.Context, ...) error
- func LoadVirtualConfig(ctx context.Context, options *options.VirtualClusterOptions) (*rest.Config, *clientcmdapi.Config, error)
- func NewControllerContext(ctx context.Context, options *options.VirtualClusterOptions, ...) (*options.ControllerContext, error)
- func NewCurrentNamespaceClient(ctx context.Context, currentNamespace string, localManager ctrl.Manager, ...) (client.Client, error)
- func ParseControllers(options *options.VirtualClusterOptions) (sets.Set[string], error)
- func RegisterOrDeregisterAPIService(ctx *options.ControllerContext)
- func StartControllers(controllerContext *options.ControllerContext, ...) error
- func StartManagers(controllerContext *options.ControllerContext, syncers []syncertypes.Object) error
- func StartPlugins(ctx context.Context, currentNamespace string, ...) error
- func StartProxy(ctx *options.ControllerContext, ...) error
- func SyncKubernetesService(ctx *options.ControllerContext) error
- func UpdateSecretWithK0sCerts(ctx context.Context, currentNamespaceClient kubernetes.Interface, ...) error
- func ValidateOptions(options *options.VirtualClusterOptions) error
- func WaitForClientConfig(ctx context.Context, options *options.VirtualClusterOptions) (clientcmd.ClientConfig, error)
- func WriteKubeConfigToSecret(ctx context.Context, currentNamespace string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCoreDNS ¶
func ApplyCoreDNS(controllerContext *options.ControllerContext)
func CreateVClusterKubeConfig ¶
func CreateVClusterKubeConfig(config *clientcmdapi.Config, options *options.VirtualClusterOptions) (*clientcmdapi.Config, error)
func DisableMissingAPIs ¶ added in v0.19.0
func DisableMissingAPIs(discoveryClient discovery.DiscoveryInterface, controllers sets.Set[string]) (sets.Set[string], error)
DisableMissingAPIs checks if the apis are enabled, if any are missing, disable the syncer and print a log
func GenerateCertsWithEtcdSans ¶ added in v0.19.3
func GenerateCertsWithEtcdSans(ctx context.Context, currentNamespaceClient kubernetes.Interface, vClusterName, currentNamespace, serviceCIDR, certificatesDir, clusterDomain string) error
func GenerateK8sCerts ¶
func GenerateK8sCerts(ctx context.Context, currentNamespaceClient kubernetes.Interface, vClusterName, currentNamespace, serviceCIDR, certificatesDir, clusterDomain string) error
func InitControllerContext ¶
func InitControllerContext(
ctx context.Context,
currentNamespace string,
localManager,
virtualManager ctrl.Manager,
virtualRawConfig *clientcmdapi.Config,
vClusterOptions *options.VirtualClusterOptions,
) (*options.ControllerContext, error)
func InitManagers ¶ added in v0.19.0
func InitManagers(
ctx context.Context,
options *options.VirtualClusterOptions,
currentNamespace string,
inClusterConfig *rest.Config,
scheme *runtime.Scheme,
newPhysicalClient client.NewClientFunc,
newVirtualClient client.NewClientFunc,
) (*options.ControllerContext, error)
func Initialize ¶
func Initialize(
ctx context.Context,
workspaceNamespaceClient,
currentNamespaceClient kubernetes.Interface,
workspaceNamespace,
currentNamespace,
vClusterName string,
options *options.VirtualClusterOptions,
) error
Initialize creates the required secrets and configmaps for the control plane to start
func LoadVirtualConfig ¶
func LoadVirtualConfig(ctx context.Context, options *options.VirtualClusterOptions) (*rest.Config, *clientcmdapi.Config, error)
func NewControllerContext ¶
func NewControllerContext(
ctx context.Context,
options *options.VirtualClusterOptions,
currentNamespace string,
inClusterConfig *rest.Config,
scheme *runtime.Scheme,
) (*options.ControllerContext, error)
NewControllerContext builds the controller context we can use to start the syncer
func NewCurrentNamespaceClient ¶ added in v0.19.0
func NewCurrentNamespaceClient(ctx context.Context, currentNamespace string, localManager ctrl.Manager, options *options.VirtualClusterOptions) (client.Client, error)
func ParseControllers ¶ added in v0.19.0
func ParseControllers(options *options.VirtualClusterOptions) (sets.Set[string], error)
func RegisterOrDeregisterAPIService ¶
func RegisterOrDeregisterAPIService(ctx *options.ControllerContext)
func StartControllers ¶
func StartControllers(
controllerContext *options.ControllerContext,
controlPlaneNamespace,
controlPlaneService string,
controlPlaneConfig *rest.Config,
) error
func StartManagers ¶
func StartManagers(controllerContext *options.ControllerContext, syncers []syncertypes.Object) error
func StartPlugins ¶
func StartPlugins(
ctx context.Context,
currentNamespace string,
inClusterConfig,
virtualConfig *rest.Config,
virtualRawConfig *clientcmdapi.Config,
options *options.VirtualClusterOptions,
) error
func StartProxy ¶
func StartProxy(ctx *options.ControllerContext, controlPlaneNamespace, controlPlaneService string, controlPlaneClient kubernetes.Interface) error
func SyncKubernetesService ¶
func SyncKubernetesService(ctx *options.ControllerContext) error
func UpdateSecretWithK0sCerts ¶ added in v0.19.0
func UpdateSecretWithK0sCerts(
ctx context.Context,
currentNamespaceClient kubernetes.Interface,
currentNamespace, vClusterName string,
) error
func ValidateOptions ¶
func ValidateOptions(options *options.VirtualClusterOptions) error
func WaitForClientConfig ¶
func WaitForClientConfig(ctx context.Context, options *options.VirtualClusterOptions) (clientcmd.ClientConfig, error)
func WriteKubeConfigToSecret ¶
func WriteKubeConfigToSecret(ctx context.Context, currentNamespace string, currentNamespaceClient client.Client, options *options.VirtualClusterOptions, config *clientcmdapi.Config, isRemote bool) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.