Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RetainClusterFields ¶
func RetainClusterFields(targetKind string, desiredObj, clusterObj, fedObj *unstructured.Unstructured) error
RetainClusterFields updates the desired object with values retained from the cluster object.
Types ¶
type CheckUnmanagedDispatcher ¶
type CheckUnmanagedDispatcher interface { OperationDispatcher CheckRemovedOrUnlabeled(clusterName string, isHostNamespace isNamespaceInHostClusterFunc) }
func NewCheckUnmanagedDispatcher ¶
func NewCheckUnmanagedDispatcher(clientAccessor clientAccessorFunc, targetKind string, targetName util.QualifiedName) CheckUnmanagedDispatcher
type FederatedResourceForDispatch ¶
type FederatedResourceForDispatch interface { TargetName() util.QualifiedName TargetKind() string Object() *unstructured.Unstructured VersionForCluster(clusterName string) (string, error) ObjectForCluster(clusterName string) (*unstructured.Unstructured, error) RecordError(errorCode string, err error) RecordEvent(reason, messageFmt string, args ...interface{}) }
FederatedResourceForDispatch is the subset of the FederatedResource interface required for dispatching operations to managed resources.
type ManagedDispatcher ¶
type ManagedDispatcher interface { UnmanagedDispatcher Create(clusterName string) Update(clusterName string, clusterObj *unstructured.Unstructured) VersionMap() map[string]string StatusMap() status.PropagationStatusMap RecordClusterError(propStatus status.PropagationStatus, clusterName string, err error) RecordStatus(clusterName string, propStatus status.PropagationStatus) }
ManagedDispatcher dispatches operations to member clusters for resources managed by a federated resource.
func NewManagedDispatcher ¶
func NewManagedDispatcher(clientAccessor clientAccessorFunc, fedResource FederatedResourceForDispatch, skipAdoptingResources bool) ManagedDispatcher
type OperationDispatcher ¶
type OperationDispatcher interface { // Wait returns true for ok if all operations completed // successfully and false if only some operations completed // successfully. An error is returned on timeout. Wait() (ok bool, timeoutErr error) }
OperationDispatcher provides an interface to wait for operations dispatched to member clusters.
type UnmanagedDispatcher ¶
type UnmanagedDispatcher interface { OperationDispatcher Delete(clusterName string) RemoveManagedLabel(clusterName string, clusterObj *unstructured.Unstructured) }
UnmanagedDispatcher dispatches operations to member clusters for resources that are no longer managed by a federated resource.
func NewUnmanagedDispatcher ¶
func NewUnmanagedDispatcher(clientAccessor clientAccessorFunc, targetKind string, targetName util.QualifiedName) UnmanagedDispatcher
Click to show internal directories.
Click to hide internal directories.