upsync

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceVersionAnnotation is an annotation set on a resource upsynced upstream
	// that contains the resourceVersion of the corresponding downstream resource
	// when it was last upsynced.
	// It is used to check easily, without having to compare the resource contents,
	// whether an upsynced upstream resource is up-to-date with the downstream resource.
	ResourceVersionAnnotation = "workload.kcp.io/rv"
)

Variables

This section is empty.

Functions

func NewUpSyncer

func NewUpSyncer(syncerLogger logr.Logger, syncTargetClusterName logicalcluster.Name,
	syncTargetName, syncTargetKey string,
	upstreamClient kcpdynamic.ClusterInterface, downstreamClient dynamic.Interface,
	ddsifForUpstreamUpsyncer *ddsif.DiscoveringDynamicSharedInformerFactory,
	ddsifForDownstream *ddsif.GenericDiscoveringDynamicSharedInformerFactory[cache.SharedIndexInformer, cache.GenericLister, informers.GenericInformer],
	syncTargetUID types.UID) (*controller, error)

NewUpSyncer returns a new controller which upsyncs, through the Upsyncer virtual workspace, downstream resources which are part of the upsyncable resource types (fixed limited list for now), and provide the following labels:

  • internal.workload.kcp.io/cluster: <sync target key>
  • state.workload.kcp.io/<sync target key>: Upsync

and optionally, for cluster-wide resources, the `kcp.io/namespace-locator` annotation filled with the information necessary identify the upstream workspace to upsync to.

Types

This section is empty.

Jump to

Keyboard shortcuts

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