sync

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

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{}, namespaceIsTarget bool) (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 added in v0.0.5

type FederatedResource interface {
	FederatedName() util.QualifiedName
	TargetName() util.QualifiedName
	Object() *unstructured.Unstructured
	GetVersions() (map[string]string, error)
	UpdateVersions(selectedClusters []string, versionMap map[string]string) error
	DeleteVersions()
	ComputePlacement(clusters []*fedv1a1.FederatedCluster) (selectedClusters, unselectedClusters []string, err error)
	SkipClusterChange(clusterObj pkgruntime.Object) bool
	ObjectForCluster(clusterName string) (*unstructured.Unstructured, error)
	MarkedForDeletion() bool
	EnsureDeletion() error
	EnsureFinalizers() error
}

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

type FederatedResourceAccessor interface {
	Run(stopChan <-chan struct{})
	HasSynced() bool
	FederatedResource(qualifiedName util.QualifiedName) (FederatedResource, 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),
	informer util.FederatedInformer,
	updater util.FederatedUpdater) (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

Jump to

Keyboard shortcuts

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