Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.