bootstrap

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KcpRootGroupExportNames lists the APIExports in the root workspace for standard kcp groups.
	KcpRootGroupExportNames = map[string]string{
		"tenancy.kcp.io":  "tenancy.kcp.io",
		"topology.kcp.io": "topology.kcp.io",
	}

	// KcpRootGroupResourceExportNames lists the APIExports in the root workspace for standard kcp group resources.
	KcpRootGroupResourceExportNames = map[schema.GroupResource]string{
		{Group: "core.kcp.io", Resource: "shards"}:                        "shards.core.kcp.io",
		{Group: "migration.kcp.io", Resource: "logicalclustermigrations"}: "migration.kcp.io",
	}
)

Functions

func IsCoreExport added in v0.34.0

func IsCoreExport(cluster logicalcluster.Name, name string) bool

IsCoreExport reports whether the APIExport named by cluster and name is one of the core APIExports in the root workspace, those listed in KcpRootGroupExportNames and KcpRootGroupResourceExportNames, whose identities every shard and the front-proxy need before they can serve.

func NewCoreWildcardIdentities added in v0.34.0

func NewCoreWildcardIdentities(groupExportNames map[string]string,
	groupResourceExportNames map[schema.GroupResource]string) (wrap func(rt http.RoundTripper) http.RoundTripper, handler cache.ResourceEventHandler, ready func() error)

NewCoreWildcardIdentities creates the identity-injecting round tripper for the core APIExports of the root workspace, the ones named by the given maps (see KcpRootGroupExportNames). The cache server is the source of truth for their identities: shards and virtual workspaces read the APIExports replicated to it, the front-proxy reads the APIIdentity view that the Admin workspace of its peer shards projects from them. No other identity is tracked here: nothing in kcp injects a provider's identity into wildcard URLs, consumers reach those APIs through bindings.

The returned handler is registered on an informer of either APIExports or APIIdentity entries; it picks the core ones out and feeds their identities as they arrive. The returned ready func fails while any core identity is still unknown. Requests that need an identity fail until it arrives.

Types

This section is empty.

Jump to

Keyboard shortcuts

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