Documentation ¶
Index ¶
- func AddAllFlags(fs *pflag.FlagSet, f ...Flagger)
- func AddAllToManager(mgr manager.Manager, all ...AddToMangerFunc) error
- func CompleteAll(c ...Completer) error
- type AddToMangerFunc
- type Completer
- type Flagger
- type ManagerConfig
- type ManagerOptions
- type Option
- type SourceClientConfig
- type SourceClientOptions
- type TargetClientConfig
- type TargetClientOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAllFlags ¶
AddAllFlags adds all Flaggers to the given FlagSet.
func AddAllToManager ¶
func AddAllToManager(mgr manager.Manager, all ...AddToMangerFunc) error
AddAllToManager calls all AddToManagerFuncs.
Types ¶
type AddToMangerFunc ¶
AddToMangerFunc is a function which will add a controller or something similar to a Manager.
type Completer ¶
type Completer interface {
Complete() error
}
Completer can complete some configuration options.
type ManagerConfig ¶
type ManagerConfig struct {
// contains filtered or unexported fields
}
ManagerConfig contains the completed general manager configuration which can be applied to manager.Options via Apply.
func (*ManagerConfig) Apply ¶
func (c *ManagerConfig) Apply(opts *manager.Options)
Apply sets the values of this ManagerConfig on the given manager.Options.
type ManagerOptions ¶
type ManagerOptions struct {
// contains filtered or unexported fields
}
ManagerOptions contains options needed to construct the controller-runtime manager.
func (*ManagerOptions) AddFlags ¶
func (o *ManagerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds the needed command line flags to the given FlagSet.
func (*ManagerOptions) Complete ¶
func (o *ManagerOptions) Complete() error
Complete builds the manager.Options based on the given flag values.
func (*ManagerOptions) Completed ¶
func (o *ManagerOptions) Completed() *ManagerConfig
Completed returns the constructed ManagerConfig.
type SourceClientConfig ¶
type SourceClientConfig struct { RESTConfig *rest.Config CacheResyncPeriod *time.Duration ClientSet *kubernetes.Clientset Scheme *runtime.Scheme Namespace string }
SourceClientConfig contains the constructed source clients including a kubernetes ClientSet and Scheme.
func (*SourceClientConfig) ApplyClientSet ¶
func (c *SourceClientConfig) ApplyClientSet(clientSet *kubernetes.Clientset)
ApplyClientSet sets clientSet to the ClientSet of this config.
func (*SourceClientConfig) ApplyManagerOptions ¶
func (c *SourceClientConfig) ApplyManagerOptions(opts *manager.Options)
ApplyManagerOptions sets the values of this SourceClientConfig on the given manager.Options.
type SourceClientOptions ¶
type SourceClientOptions struct {
// contains filtered or unexported fields
}
SourceClientOptions contains options needed to construct the source client.
func (*SourceClientOptions) AddFlags ¶
func (o *SourceClientOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds the needed command line flags to the given FlagSet.
func (*SourceClientOptions) Complete ¶
func (o *SourceClientOptions) Complete() error
Complete builds the source client based on the given flag values and saves it for retrieval via Completed.
func (*SourceClientOptions) Completed ¶
func (o *SourceClientOptions) Completed() *SourceClientConfig
Completed returns the constructed source clients including a kubernetes ClientSet and Scheme.
type TargetClientConfig ¶
type TargetClientConfig struct { Client client.Client RESTMapper meta.RESTMapper Scheme *runtime.Scheme // contains filtered or unexported fields }
TargetClientConfig contains the constructed target clients including a RESTMapper and Scheme. Before the first usage, Start and WaitForCacheSync should be called to ensure that the cache is running and has been populated successfully.
func NewTargetClientConfig ¶ added in v0.25.0
func NewTargetClientConfig(kubeconfigPath string, disableCache bool, cacheResyncPeriod time.Duration) (*TargetClientConfig, error)
NewTargetClientConfig creates a new target client config.
func (*TargetClientConfig) Apply ¶
func (c *TargetClientConfig) Apply(conf *TargetClientConfig)
Apply sets the values of this TargetClientConfig on the given config.
func (*TargetClientConfig) Start ¶
func (c *TargetClientConfig) Start(ctx context.Context) error
Start starts the target cache if the client is cached.
func (*TargetClientConfig) WaitForCacheSync ¶
func (c *TargetClientConfig) WaitForCacheSync(ctx context.Context) bool
WaitForCacheSync waits for the caches of the target cache to be synced initially.
type TargetClientOptions ¶
type TargetClientOptions struct { KubeconfigPath string DisableCache bool CacheResyncPeriod time.Duration // contains filtered or unexported fields }
TargetClientOptions contains options needed to construct the target client.
func (*TargetClientOptions) AddFlags ¶
func (o *TargetClientOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds the needed command line flags to the given FlagSet.
func (*TargetClientOptions) Complete ¶
func (o *TargetClientOptions) Complete() error
Complete builds the target client based on the given flag values and saves it for retrieval via Completed.
func (*TargetClientOptions) Completed ¶
func (o *TargetClientOptions) Completed() *TargetClientConfig
Completed returns the constructed target clients including a RESTMapper and Scheme. Before the first usage, Start and WaitForCacheSync should be called to ensure that the cache is running and has been populated successfully.