Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
LabelParentUID = "multicluster.admiralty.io/parent-uid"
)
Functions ¶
func IsChildNotFoundErr ¶
func IsDuplicateChildErr ¶
func NewController ¶
func NewController(ctx context.Context, parentClusters []*cluster.Cluster, childClusters []*cluster.Cluster, o Options) (*controller.Controller, error)
Types ¶
type Applier ¶
type Applier interface {
ChildClusterName(parent interface{}) (string, error)
MakeChild(parent interface{}, expectedChild interface{}) error
MutateChild(parent interface{}, child interface{}, expectedChild interface{}) (needUpdate bool, err error)
MutateParent(parent interface{}, childFound bool, child interface{}) (needUpdate bool, needStatusUpdate bool, err error)
}
type Options ¶
type Options struct {
ParentPrototype runtime.Object
ChildPrototype runtime.Object
ParentWatchOptions controller.WatchOptions
ChildNamespace string // optional, can optimize List operations vs. it only be set in MakeChild
Applier Applier
CopyLabels bool
MakeSelector func(parent interface{}) labels.Set // optional
MakeExpectedChildWhenFound bool
GetImpersonatorForChildWriter func(clusterName string) string
}
Click to show internal directories.
Click to hide internal directories.