Documentation ¶
Index ¶
- Variables
- func NewConfigWithWildcardIdentities(config *rest.Config, groupExportNames map[string]string, ...) (identityConfig *rest.Config, resolve func(ctx context.Context) error)
- func NewWildcardIdentitiesWrappingRoundTripper(groupExportNames map[string]string, ...) (func(rt http.RoundTripper) http.RoundTripper, func(ctx context.Context) error)
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", "scheduling.kcp.io": "scheduling.kcp.io", "workload.kcp.io": "workload.kcp.io", "apiresource.kcp.io": "apiresource.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", } )
Functions ¶
func NewConfigWithWildcardIdentities ¶
func NewConfigWithWildcardIdentities(config *rest.Config, groupExportNames map[string]string, groupResourceExportNames map[schema.GroupResource]string, localShardKubeClusterClient kcpkubernetesclientset.ClusterInterface) (identityConfig *rest.Config, resolve func(ctx context.Context) error)
NewConfigWithWildcardIdentities creates a rest.Config with injected resource identities for individual group or group resources. Each group or resource is coming from one APIExport whose names are passed in as a map.
The returned resolve function will get the APIExports and extract the identities. The resolve func might return an error if the APIExport is not found or for other reason. Only after it succeeds a client using the returned rest.Config can use the group and group resources with identities.
func NewWildcardIdentitiesWrappingRoundTripper ¶ added in v0.7.0
func NewWildcardIdentitiesWrappingRoundTripper(groupExportNames map[string]string, groupResourceExportNames map[schema.GroupResource]string, config *rest.Config, localShardKubeClusterClient kcpkubernetesclientset.ClusterInterface) (func(rt http.RoundTripper) http.RoundTripper, func(ctx context.Context) error)
NewWildcardIdentitiesWrappingRoundTripper creates an HTTP RoundTripper that injects resource identities for individual groups or group resources. Each group or resource is coming from one APIExport whose names are passed in as a map. The RoundTripper is exposed as a function that allows wrapping the RoundTripper
The method also returns the resolve function that gets the APIExports and extract the identities. The resolve func might return an error if the APIExport is not found or for other reason. Only after it succeeds a client using the returned RoundTripper can use the group and group resources with identities.
Types ¶
This section is empty.