clustersynchro

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const LastAppliedConfigurationAnnotation = "kubectl.kubernetes.io/last-applied-configuration"

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStatusUpdater

type ClusterStatusUpdater interface {
	UpdateClusterStatus(ctx context.Context, name string, status *clusterv1alpha2.ClusterStatus) error
}

type ClusterSyncConfig added in v0.8.0

type ClusterSyncConfig struct {
	MetricsStoreBuilder     *kubestatemetrics.MetricsStoreBuilder
	PageSizeForResourceSync int64
}

type ClusterSynchro

type ClusterSynchro struct {
	RESTConfig           *rest.Config
	ClusterStatusUpdater ClusterStatusUpdater
	// contains filtered or unexported fields
}

func New

func New(name string, config *rest.Config, storage storage.StorageFactory, updater ClusterStatusUpdater, syncConfig ClusterSyncConfig) (*ClusterSynchro, error)

func (*ClusterSynchro) GetMetricsWriterList added in v0.8.0

func (s *ClusterSynchro) GetMetricsWriterList() (writers metricsstore.MetricsWriterList)

func (*ClusterSynchro) Run added in v0.1.0

func (s *ClusterSynchro) Run(shutdown <-chan struct{})

func (*ClusterSynchro) SetResources

func (s *ClusterSynchro) SetResources(syncResources []clusterv1alpha2.ClusterGroupResources, syncAllCustomResources bool)

func (*ClusterSynchro) Shutdown

func (s *ClusterSynchro) Shutdown(updateStatus bool)

type GVRSet added in v0.3.0

type GVRSet map[schema.GroupVersionResource]struct{}

func NewGVRSet added in v0.3.0

func NewGVRSet(gvrs ...schema.GroupVersionResource) GVRSet

func (GVRSet) Insert added in v0.3.0

func (set GVRSet) Insert(gvrs ...schema.GroupVersionResource)

type GroupResourceStatus added in v0.3.0

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

GroupResourceStatus manages the status of synchronized resources TODO: change to a more appropriate name

func NewGroupResourceStatus added in v0.3.0

func NewGroupResourceStatus() *GroupResourceStatus

func (*GroupResourceStatus) DeleteVersion added in v0.3.0

func (s *GroupResourceStatus) DeleteVersion(gvr schema.GroupVersionResource)

func (*GroupResourceStatus) DisableConcurrent added in v0.3.0

func (s *GroupResourceStatus) DisableConcurrent()

func (*GroupResourceStatus) EnableConcurrent added in v0.3.0

func (s *GroupResourceStatus) EnableConcurrent()

func (*GroupResourceStatus) GetStorageGVRToSyncGVRs added in v0.3.0

func (s *GroupResourceStatus) GetStorageGVRToSyncGVRs() map[schema.GroupVersionResource]GVRSet

func (*GroupResourceStatus) LoadGroupResourcesStatuses added in v0.3.0

func (s *GroupResourceStatus) LoadGroupResourcesStatuses() []clusterv1alpha2.ClusterGroupResourcesStatus

func (*GroupResourceStatus) Merge added in v0.3.0

func (*GroupResourceStatus) UpdateSyncCondition added in v0.3.0

func (s *GroupResourceStatus) UpdateSyncCondition(gvr schema.GroupVersionResource, status, reason, message string)

type ResourceNegotiator added in v0.3.0

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

func (*ResourceNegotiator) NegotiateSyncResources added in v0.3.0

func (negotiator *ResourceNegotiator) NegotiateSyncResources(syncResources []clusterv1alpha2.ClusterGroupResources) (*GroupResourceStatus, map[schema.GroupVersionResource]syncConfig)

func (*ResourceNegotiator) SetSyncAllCustomResources added in v0.3.0

func (negotiator *ResourceNegotiator) SetSyncAllCustomResources(sync bool)

type ResourceSynchro

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

func (*ResourceSynchro) Close

func (synchro *ResourceSynchro) Close() <-chan struct{}

func (*ResourceSynchro) ErrorHandler added in v0.5.0

func (synchro *ResourceSynchro) ErrorHandler(r *informer.Reflector, err error)

func (*ResourceSynchro) OnAdd

func (synchro *ResourceSynchro) OnAdd(obj interface{}, isInInitialList bool)

func (*ResourceSynchro) OnDelete

func (synchro *ResourceSynchro) OnDelete(obj interface{})

func (*ResourceSynchro) OnSync

func (synchro *ResourceSynchro) OnSync(obj interface{})

func (*ResourceSynchro) OnUpdate

func (synchro *ResourceSynchro) OnUpdate(_, obj interface{})

func (*ResourceSynchro) Run

func (synchro *ResourceSynchro) Run(shutdown <-chan struct{})

func (*ResourceSynchro) Start added in v0.3.0

func (synchro *ResourceSynchro) Start(stopCh <-chan struct{})

func (*ResourceSynchro) Status

type ResourceSynchroConfig added in v0.8.0

type ResourceSynchroConfig struct {
	schema.GroupVersionResource
	Kind string

	cache.ListerWatcher
	runtime.ObjectConvertor
	storage.ResourceStorage

	*kubestatemetrics.MetricsStore

	ResourceVersions    map[string]interface{}
	PageSizeForInformer int64
}

func (ResourceSynchroConfig) GroupVersionKind added in v0.8.0

func (c ResourceSynchroConfig) GroupVersionKind() schema.GroupVersionKind

type RetryableError added in v0.4.1

type RetryableError error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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