Documentation

Index

Constants

View Source
const (

	// If this finalizer is present on a federated resource, the sync
	// controller will have the opportunity to perform pre-deletion operations
	// (like deleting managed resources from member clusters).
	FinalizerSyncController = "federation.k8s.io/sync-controller"

	// If this annotation is present on a federated resource, resources in the
	// member clusters managed by the federated resource should be orphaned.
	// If the annotation is not present (the default), resources in member
	// clusters will be deleted before the federated resource is deleted.
	OrphanManagedResources = "federation.k8s.io/orphan"
)

Variables

This section is empty.

Functions

func GetOverrideHash

func GetOverrideHash(rawObj *unstructured.Unstructured) (string, error)

func GetTemplateHash

func GetTemplateHash(fieldMap map[string]interface{}) (string, error)

func StartFederationSyncController

func StartFederationSyncController(controllerConfig *util.ControllerConfig, stopChan <-chan struct{}, typeConfig typeconfig.Interface, fedNamespaceAPIResource *metav1.APIResource) error

    StartFederationSyncController starts a new sync controller for a type config

    Types

    type FederatedResource

    type FederatedResource interface {
    	dispatch.FederatedResourceForDispatch
    
    	FederatedName() util.QualifiedName
    	FederatedKind() string
    	UpdateVersions(selectedClusters []string, versionMap map[string]string) error
    	DeleteVersions()
    	ComputePlacement(clusters []*fedv1a1.FederatedCluster) (selectedClusters sets.String, err error)
    	IsNamespaceInHostCluster(clusterObj pkgruntime.Object) bool
    }

      FederatedResource encapsulates the behavior of a logical federated resource which may be implemented by one or more kubernetes resources in the cluster hosting the federation control plane.

      type FederatedResourceAccessor

      type FederatedResourceAccessor interface {
      	Run(stopChan <-chan struct{})
      	HasSynced() bool
      	FederatedResource(qualifiedName util.QualifiedName) (federatedResource FederatedResource, possibleOrphan bool, err error)
      	VisitFederatedResources(visitFunc func(obj interface{}))
      }

        FederatedResourceAccessor provides a way to retrieve and visit logical federated resources (e.g. FederatedConfigMap)

        func NewFederatedResourceAccessor

        func NewFederatedResourceAccessor(
        	controllerConfig *util.ControllerConfig,
        	typeConfig typeconfig.Interface,
        	fedNamespaceAPIResource *metav1.APIResource,
        	client genericclient.Client,
        	enqueueObj func(pkgruntime.Object),
        	eventRecorder record.EventRecorder) (FederatedResourceAccessor, error)

        type FederationSyncController

        type FederationSyncController struct {
        	// contains filtered or unexported fields
        }

          FederationSyncController synchronizes the state of a federated type to clusters that are members of the federation.

          func (*FederationSyncController) Run

          func (s *FederationSyncController) Run(stopChan <-chan struct{})

          Directories

          Path Synopsis