Documentation
¶
Overview ¶
Package bootstrap installs the kcp-side objects the marketplace needs: the three APIExports and their endpoint slices, the producer WorkspaceType, and the two hand-bound tiers (catalog and producers parent).
Workspace-path plumbing is shared with the access component (access/pkg/bootstrap); this package only owns the marketplace assets.
Index ¶
- Constants
- func BindCatalog(ctx context.Context, cfg *rest.Config, result *Result, opts Options) error
- func BindProvidersParent(ctx context.Context, cfg *rest.Config, result *Result, opts Options) error
- func GrantPlatformAdmins(ctx context.Context, cfg *rest.Config, users, groups []string) error
- func WaitForEndpointSliceURLs(ctx context.Context, cfg *rest.Config, sliceName string) ([]string, error)
- type Options
- type Result
Constants ¶
const ( // ExportCatalog serves Producers in the catalog workspace. ExportCatalog = "marketplace-catalog" // ExportPublish serves no resources; it carries the claims the publish // flow needs in producer workspaces, with the // publish-side claims. ExportPublish = "marketplace-publish" // ExportProvisioner grants the claim to create producer workspaces. ExportProvisioner = "marketplace-provisioner" )
The three exports. Each has an endpoint slice of the same name, and the operator runs one manager (or holds one client) per slice. Nothing is exported into consumer workspaces: enabling is a plain kcp APIBinding the consumer creates, so the marketplace has no footprint there.
const ( DefaultWorkspacePrefix = "root:marketplace" DefaultControllersWorkspace = "controllers" // DefaultCatalogWorkspace is the registry: the workspace Producer // records live in. Deliberately not the workspace producers are // provisioned under. DefaultCatalogWorkspace = "catalog" // DefaultProducersWorkspace is the provisioning parent: every // provisioned producer workspace is created as its child. It holds no // marketplace objects at all. DefaultProducersWorkspace = "producers" )
Defaults for where things are installed.
const (
WorkspaceTypeProvider = "producer"
)
The workspace type the operator provisions producer workspaces with. It deliberately does not extend root:universal, so a producer workspace serves apis.kcp.io and the kcp built-ins but neither tenancy.kcp.io nor topology.kcp.io.
Variables ¶
This section is empty.
Functions ¶
func BindCatalog ¶
BindCatalog makes the workspace cfg points at the Producer registry: it binds marketplace-catalog, then waits until Producers are servable.
func BindProvidersParent ¶
BindProvidersParent makes the workspace cfg points at the provisioning parent: it binds marketplace-provisioner, so producer workspaces can be created as its children. Nothing to wait for — the claim adds reach, not a servable API.
func GrantPlatformAdmins ¶
GrantPlatformAdmins makes the given identities administrators of the Producer registry cfg points at: they may enter it and manage Producers, and nothing else. It is applied even with no identities, so that dropping someone from the list revokes them.
Types ¶
type Options ¶
type Options struct {
// ServerUsers and ServerGroups are additional identities granted the
// server role in the exports workspace — the identities the operator
// and the virtual workspace authenticate as when they are not this
// bootstrap's own credential.
ServerUsers []string
ServerGroups []string
}
Options configures Bootstrap.
type Result ¶
type Result struct {
// ExportsPath is the canonical path of the workspace holding the
// exports, and ExportsCluster its logical cluster name.
ExportsPath string
ExportsCluster string
// WorkspacesIdentityHash is the identity of kcp's tenancy.kcp.io
// export, which every claim on `workspaces` must repeat.
WorkspacesIdentityHash string
}
Result reports what Bootstrap installed.