pathaware

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package pathaware provides a sigs.k8s.io/multicluster-runtime provider implementation for interacting with APIExport virtual workspaces exposed by a kcp instance. This provider can be used for writing controllers that reconcile APIs exposed via APIExport objects.

// This is a meta wrapper provider around the apiexport provider, adding path-awareness // to the clusters it manages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	*provider.Provider
	// contains filtered or unexported fields
}

Provider is a sigs.k8s.io/multicluster-runtime/pkg/multicluster.Provider that represents each logical cluster (in the kcp sense) exposed via a APIExport virtual workspace as a cluster in the sigs.k8s.io/multicluster-runtime sense.

Core functionality is delegated to the apiexport.Provider, this wrapper just adds best effort path-awareness index to it via hooks.

func New

func New(cfg *rest.Config, endpointSliceName string, options provider.Options) (*Provider, error)

New creates a new kcp virtual workspace provider. The provided rest.Config must point to a virtual workspace apiserver base path, i.e. up to but without the '/clusters/*' suffix. This information can be extracted from an APIExportEndpointSlice status.

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, clusterName string) (cluster.Cluster, error)

Get returns the cluster with the given name as a cluster.Cluster.

func (*Provider) IndexField

func (p *Provider) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error

IndexField adds an indexer to the clusters managed by this provider.

func (*Provider) Start

func (p *Provider) Start(ctx context.Context, aware multicluster.Aware) error

Start starts the provider and blocks.

Jump to

Keyboard shortcuts

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