bootstrap

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package bootstrap installs the mcp component's kcp-side objects: the workspace that owns them, the APIExport a consumer enables by binding, and the grant the operator needs to read through it.

Index

Constants

View Source
const (
	// DefaultWorkspacePrefix is the parent the component's workspace is
	// created under.
	DefaultWorkspacePrefix = "root:mcp"
	// DefaultControllersWorkspace is the leaf this component owns.
	DefaultControllersWorkspace = "controllers"
	// DefaultWorkspaceType is the type used for workspaces created here.
	DefaultWorkspaceType = "universal"

	// ExportName is the export a consumer binds to enable MCP, and the
	// name of the endpoint slice that follows it.
	ExportName = "mcp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// WorkspacePrefix and ControllersWorkspace locate the workspace the
	// objects are installed into.
	WorkspacePrefix      string
	ControllersWorkspace string
	WorkspaceType        string

	// ServerUsers and ServerGroups are the identities granted the role the
	// operator needs to read through the export. kcp-operator mounts a
	// client certificate, so its server arrives as a User.
	ServerUsers  []string
	ServerGroups []string

	Timeout time.Duration
}

Options configures Init.

type Result

type Result struct {
	// WorkspacePath is where the objects landed.
	WorkspacePath string
	// ExportCluster is the logical cluster of that workspace, which is
	// what a consumer's APIBinding references.
	ExportCluster string
	// SliceURLs are the per-shard virtual workspace URLs the slice
	// resolved to. Empty until a consumer binds.
	SliceURLs []string
}

Result reports what Init installed.

func Init

func Init(ctx context.Context, cfg *rest.Config, opts Options) (*Result, error)

Init creates the component's workspace and applies its assets.

Jump to

Keyboard shortcuts

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