syncer

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: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdvancedSchedulingFeatureAnnotation = "featuregates.experimental.workload.kcp.io/advancedscheduling"
)
View Source
const GVRForLocationIndexName = "GVRForLocation"
View Source
const LocationIndexName = "Location"

Variables

This section is empty.

Functions

func GetGVRForLocationIndexKey added in v0.10.0

func GetGVRForLocationIndexKey(location string, gvr metav1.GroupVersionResource) string

func GetLocationIndexKey added in v0.10.0

func GetLocationIndexKey(location string) string

func StartHeartbeat added in v0.11.0

func StartHeartbeat(ctx context.Context, kcpSyncTargetClient kcpclientset.Interface, syncTargetName, syncTargetUID string)

func StartSyncer

func StartSyncer(ctx context.Context, cfg *SyncerConfig, numSyncerThreads int, importPollInterval time.Duration, syncerNamespace string) error

Types

type APIImporter added in v0.6.0

type APIImporter struct {
	SyncedGVRs map[string]metav1.GroupVersionResource
	// contains filtered or unexported fields
}

func NewAPIImporter added in v0.6.0

func NewAPIImporter(
	upstreamConfig, downstreamConfig *rest.Config,
	synctargetInformer workloadinformers.SyncTargetInformer,
	apiImportInformer apiresourceinformer.APIResourceImportInformer,
	resourcesToSync []string,
	syncTargetPath logicalcluster.Path,
	syncTargetName string,
	syncTargetUID types.UID,
) (*APIImporter, error)

func (*APIImporter) ImportAPIs added in v0.6.0

func (i *APIImporter) ImportAPIs(ctx context.Context)

func (*APIImporter) Start added in v0.6.0

func (i *APIImporter) Start(ctx context.Context, pollInterval time.Duration)

func (*APIImporter) Stop added in v0.6.0

func (i *APIImporter) Stop(ctx context.Context)

type SyncerConfig added in v0.6.0

type SyncerConfig struct {
	UpstreamConfig                *rest.Config
	DownstreamConfig              *rest.Config
	ResourcesToSync               sets.String
	SyncTargetPath                logicalcluster.Path
	SyncTargetName                string
	SyncTargetUID                 string
	DownstreamNamespaceCleanDelay time.Duration
	DNSImage                      string
}

SyncerConfig defines the syncer configuration that is guaranteed to vary across syncer deployments. Capturing these details in a struct simplifies defining these details in test fixture.

Directories

Path Synopsis
dns

Jump to

Keyboard shortcuts

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