Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
Mapping maps a set of source APIGroup/Version pairs to destination APIGroup/Version pairs.
func NewMapping ¶
func NewMapping(forward map[schema.GroupVersion]schema.GroupVersion) (Mapping, error)
NewMapping returns a new mapping based on the provided input GroupVersion map.
func (Mapping) GetGroupVersion ¶
func (m Mapping) GetGroupVersion(group string) (source, destination schema.GroupVersion, found bool)
GetGroupVersion returns the GroupVersion mapping pairs for a given APIGroup.
func (Mapping) GetVersion ¶
GetVersion Returns the version of an APIGroup.
type SyncListener ¶
type SyncListener struct { OnDestinationAdded func(name string, kind string, listKind string) OnDestinationRemoved func(name string) }
SyncListener defines an interface for a listener that will get notified as destination Crds are added/removed.
type Synchronizer ¶
type Synchronizer struct {
// contains filtered or unexported fields
}
Synchronizer is a Kubernetes controller that keeps a synchronized copy of an source set of CRDs in destination APIGroup/Version(s). The mapping from source to destination is specified by a mapping object. A passed-in listener can be used to detect when target CRDs are added/deleted.
func NewSynchronizer ¶
func NewSynchronizer(config *rest.Config, mapping Mapping, resyncPeriod time.Duration, listener SyncListener) (*Synchronizer, error)
NewSynchronizer returns a new instance of a Synchronizer. The returned Synchronizer is not started: this needs to be done explicitly using start()/Stop() methods.
func (*Synchronizer) Start ¶
func (s *Synchronizer) Start() error
Start commences synchronizing CRDs.