Documentation ¶
Overview ¶
Package federate provides an interface that abstracts the distribution of Kubernetes resources.
Index ¶
- Constants
- type ClusterEventHandler
- type ClusterInformer
- type Federator
- func NewCreateFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, ...) Federator
- func NewCreateOrUpdateFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, ...) Federator
- func NewNoopFederator() Federator
- func NewUpdateFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, ...) Federator
- func NewUpdateStatusFederator(dynClient dynamic.Interface, restMapper meta.RESTMapper, ...) Federator
- type UpdateFn
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 ClusterEventHandler ¶
type ClusterEventHandler interface { // OnAdd is called when a cluster is added. The given 'kubeConfig' can be used to access // the cluster's kube API endpoint. OnAdd(clusterID string, kubeConfig *rest.Config) // OnUpdate is called when some aspect of a cluster's kube API endpoint configuration has changed. OnUpdate(clusterID string, kubeConfig *rest.Config) // OnRemove is called when a cluster is removed. OnRemove(clusterID string) }
ClusterEventHandler handles federated cluster lifecycle event notifications.
type ClusterInformer ¶
type ClusterInformer interface { // AddHandler adds a ClusterEventHandler to be notified when cluster lifecycle events occur. // The handler is notified asynchronously of the existing set of clusters via OnAdd events, one per cluster. AddHandler(handler ClusterEventHandler) error }
ClusterInformer provides functionality to inform on federated cluster lifecycle events.
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(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(resource runtime.Object) error }
Federator provides methods for accessing federated resources.
func NewCreateFederator ¶ added in v0.10.1
func NewCreateOrUpdateFederator ¶ added in v0.10.1
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 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.