initializingworkspaces

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package initializingworkspaces provides a sigs.k8s.io/multicluster-runtime provider implementation for interacting with initializing virtual workspace exposed by a kcp instance. This provider can be used for writing controllers that reconcile Workspaces in the Initializing phase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Scheme is the scheme to use for the provider. If this is nil, it defaults
	// to the client-go scheme.
	Scheme *runtime.Scheme
	// WildcardCache is the wildcard cache to use for the provider. If this is
	// nil, a new wildcard cache will be created for the given rest.Config.
	WildcardCache mcpcache.WildcardCache

	// InitializerName is the name of the initializer to watch for in LogicalCluster.Status.Initializers
	InitializerName string
}

Options are the options for creating a new instance of the initializing workspaces provider.

type Provider

type Provider struct {
	// 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) having a specific initializer and exposed via the initializingworkspaces virtual workspace endpoint as a cluster in the sigs.k8s.io/multicluster-runtime sense.

func New

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

New creates a new KCP initializing workspaces provider.

func (*Provider) Get

func (p *Provider) Get(_ context.Context, name string) (cluster.Cluster, error)

Get returns a cluster.Cluster by logical cluster name.

func (*Provider) IndexField

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

IndexField indexes the given object by the given field on all engaged clusters, current and future.

func (*Provider) Run

func (p *Provider) Run(ctx context.Context, mgr mcmanager.Manager) error

Run starts the provider and blocks.

Jump to

Keyboard shortcuts

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