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 NewUpdateStatusFederator ¶ added in v0.13.0
type FederatorExt ¶ added in v0.16.0
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
type UpdateFn func(oldObj *unstructured.Unstructured, newObj *unstructured.Unstructured) *unstructured.Unstructured
Source Files ¶
Click to show internal directories.
Click to hide internal directories.