syncmgr

package
v1.9.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Skip   = "skip"
	Create = "create"
	Update = "update"
	Delete = "delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gc added in v1.8.10

type Gc struct {
	client.Client
	// contains filtered or unexported fields
}

func NewGc added in v1.8.10

func NewGc(cfg *rest.Config, client client.Client) *Gc

func (*Gc) GcWork added in v1.8.10

func (g *Gc) GcWork()

GcWork gc work If a resource exists on the current cluster but not on the control cluster, the resource is a residual resource and needs to be deleted

type GenericObjFunc added in v1.2.2

type GenericObjFunc func(obj client.Object) (client.Object, error)

type SyncManager

type SyncManager struct {
	ctrl.Manager
	LocalClient            client.Client
	PivotClusterKubeConfig string
	PivotCubeHost          string
}

SyncManager watch and sync resource from cluster master to cluster member

func (*SyncManager) Initialize

func (s *SyncManager) Initialize() error

func (*SyncManager) Run

func (s *SyncManager) Run(stop <-chan struct{})

func (*SyncManager) SetupCtrlWithManager added in v1.2.2

func (s *SyncManager) SetupCtrlWithManager(resource client.Object, objFunc GenericObjFunc) error

1. native resource should not be affected? 2. what if sync resource changed manually in member cluster? use webhook? 3. update operation is valid? 4. how to record log? 5. use reflect of not to copy interface value?

setupCtrlWithManager add reconcile func for each sync resource resync reference to https://github.com/cloudnativeto/sig-kubernetes/issues/11

Jump to

Keyboard shortcuts

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