cmd

package
v1.58.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// AddToSourceScheme registers all API types in the given scheme that resource-manager expects to be in the source
	// cluster scheme (the Manager's scheme).
	AddToSourceScheme = sourceSchemeBuilder.AddToScheme
)

Functions

func AddAllFlags

func AddAllFlags(fs *pflag.FlagSet, f ...Flagger)

AddAllFlags adds all Flaggers to the given FlagSet.

func AddAllToManager

func AddAllToManager(mgr manager.Manager, all ...AddToMangerFunc) error

AddAllToManager calls all AddToManagerFuncs.

func AddToTargetScheme added in v1.42.0

func AddToTargetScheme(scheme *runtime.Scheme) error

AddToTargetScheme registers all API types in the given scheme that resource-manager expects to be in the target cluster scheme (the Cluster that ManagedResources are applied to).

func CompleteAll

func CompleteAll(c ...Completer) error

CompleteAll completes all Completers.

Types

type AddToMangerFunc

type AddToMangerFunc func(manager.Manager) error

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 Flagger

type Flagger interface {
	AddFlags(*pflag.FlagSet)
}

Flagger can add needed flags to a FlagSet.

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 Option

type Option interface {
	Flagger
	Completer
}

Option is a compound interface type for an option for the resource-manager.

type ProfilingOptions added in v1.44.0

type ProfilingOptions struct {
	// EnableProfiling enables profiling via web interface host:port/debug/pprof/.
	EnableProfiling bool
	// EnableContentionProfiling enable lock contention profiling, if profiling is enabled
	EnableContentionProfiling bool
}

ProfilingOptions contains options needed to enable profiling.

func (*ProfilingOptions) AddFlags added in v1.44.0

func (p *ProfilingOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds the needed command line flags to the given FlagSet.

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 TargetClusterConfig added in v1.35.0

type TargetClusterConfig struct {
	Cluster             cluster.Cluster
	DisableCachedClient bool
}

TargetClusterConfig 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.

type TargetClusterOptions added in v1.35.0

type TargetClusterOptions struct {

	// Namespace is the namespace in which controllers for the target cluster act on objects (defaults to all namespaces)
	Namespace string
	// If RESTConfig is set, don't load the kubeconfig but use the provided config instead (for integration tests).
	RESTConfig *rest.Config
	// contains filtered or unexported fields
}

TargetClusterOptions contains options needed to construct the target config.

func (*TargetClusterOptions) AddFlags added in v1.35.0

func (o *TargetClusterOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds the needed command line flags to the given FlagSet.

func (*TargetClusterOptions) Complete added in v1.35.0

func (o *TargetClusterOptions) Complete() error

Complete builds the target config based on the given flag values and saves it for retrieval via Completed.

func (*TargetClusterOptions) Completed added in v1.35.0

func (o *TargetClusterOptions) Completed() *TargetClusterConfig

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.

Jump to

Keyboard shortcuts

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