federate

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Overview

Package federate provides an interface that abstracts the distribution of Kubernetes resources.

Index

Constants

View Source
const ClusterIDLabelKey = "submariner-io/clusterID"

ClusterIDLabelKey is the key for a label that may be added to federated resources to hold the ID of the cluster from which the resource originated, allowing for filtering of resources emanating from the originating cluster.

Variables

This section is empty.

Functions

This section is empty.

Types

type Federator

type Federator interface {
	// Distribute distributes the given resource to all federated clusters.
	// The actual distribution may occur asynchronously in which case any returned error only indicates that the request
	// failed.
	//
	// If the resource was previously distributed and the given resource differs, each previous cluster will receive the
	// updated resource.
	Distribute(ctx context.Context, resource runtime.Object) error

	// Delete stops distributing the given resource and deletes it from all clusters to which it was distributed.
	// The actual deletion may occur asynchronously in which any returned error only indicates that the request
	// failed.
	Delete(ctx context.Context, resource runtime.Object) error
}

Federator provides methods for accessing federated resources.

func NewNoopFederator added in v0.6.3

func NewNoopFederator() Federator

func NewUpdateFederator added in v0.10.1

func NewUpdateFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, targetNamespace string, update UpdateFn) Federator

func NewUpdateStatusFederator added in v0.13.0

func NewUpdateStatusFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, targetNamespace string) Federator

type FederatorExt added in v0.16.0

type FederatorExt interface {
	Federator

	LogEvents(withName string)
}

func NewCreateFederator added in v0.10.1

func NewCreateFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, targetNamespace string) FederatorExt

func NewCreateOrUpdateFederator added in v0.10.1

func NewCreateOrUpdateFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, targetNamespace,
	localClusterID string, keepMetadataField ...string,
) FederatorExt

type UpdateFn added in v0.13.0

Directories

Path Synopsis
Package fake provides a fake Federator for use in tests.
Package fake provides a fake Federator for use in tests.

Jump to

Keyboard shortcuts

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