sync

package
v0.1.0-rc6-bzc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

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 = "kubefed.io/sync-controller"
)

Variables

This section is empty.

Functions

func GetOverrideHash added in v0.0.6

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

func GetTemplateHash added in v0.0.5

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

func StartKubeFedSyncController

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

StartKubeFedSyncController starts a new sync controller for a type config

Types

type FederatedResource added in v0.0.5

type FederatedResource interface {
	dispatch.FederatedResourceForDispatch

	FederatedName() util.QualifiedName
	FederatedKind() string
	UpdateVersions(selectedClusters []string, versionMap map[string]string) error
	DeleteVersions()
	ComputePlacement(clusters []*fedv1b1.KubeFedCluster) (selectedClusters sets.String, err error)
	NamespaceNotFederated() 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 KubeFed control plane.

type FederatedResourceAccessor added in v0.0.5

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 added in v0.0.5

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

type KubeFedSyncController

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

KubeFedSyncController synchronizes the state of federated resources in the host cluster with resources in member clusters.

func (*KubeFedSyncController) Run

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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