options

package
v0.0.0-...-432d548 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package options provides the flags used for the controller manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(fs *pflag.FlagSet, lfs *goflag.FlagSet)

AddFlags copy all global flags (flag & pflag) to a local flagset.

func AddGlobalFlags

func AddGlobalFlags(fs *pflag.FlagSet, name string)

AddGlobalFlags copy all global flags (flag & pflag) to a local flagset.

func NewDefaultComponentConfig

func NewDefaultComponentConfig() (*config.Config, error)

NewDefaultComponentConfig returns kube-controller manager configuration object.

func PrintNamedFlagsetsSections

func PrintNamedFlagsetsSections(namedFlagSets apiserverflag.NamedFlagSets, cmd *cobra.Command, name string)

PrintNamedFlagsetsSections PrintNamedFlagsetsSections

Types

type GenericControllerManagerConfigurationOptions

type GenericControllerManagerConfigurationOptions struct {
	Port             int32
	Address          string
	MinResyncPeriod  metav1.Duration
	ClientConnection k8sconfig.ClientConnectionConfiguration
	LeaderElection   k8sconfig.LeaderElectionConfiguration
	Controllers      []string
}

GenericControllerManagerConfigurationOptions holds the options which are generic.

func NewGenericControllerManagerConfigurationOptions

func NewGenericControllerManagerConfigurationOptions(cfg config.GenericControllerManagerConfiguration) *GenericControllerManagerConfigurationOptions

NewGenericControllerManagerConfigurationOptions returns generic configuration default values for both the kube-controller-manager and the cloud-contoller-manager. Any common changes should be made here. Any individual changes should be made in that controller.

func (*GenericControllerManagerConfigurationOptions) AddFlags

func (o *GenericControllerManagerConfigurationOptions) AddFlags(fss *apiserverflag.NamedFlagSets, allControllers, disabledByDefaultControllers []string)

AddFlags adds flags related to generic for controller manager to the specified FlagSet.

func (*GenericControllerManagerConfigurationOptions) ApplyTo

ApplyTo fills up generic config with options.

type KubeControllerManagerOptions

type KubeControllerManagerOptions struct {
	Generic *GenericControllerManagerConfigurationOptions

	Master     string
	Kubeconfig string

	LabelSelector   string
	WriteLabels     string
	Namespace       string
	Cluster         string
	Name            string
	ConcurrentSyncs int32

	//ExtendConfig define the exetrnal config file path for controllers
	ExtendConfig string

	KmonAddress string

	// delay duration before controllers start after became to leader
	DelayStart metav1.Duration

	MemObjs                string
	MemFsURL               string
	MemFsBackupURL         string
	MemSyncPeriodMs        int32
	MemTimeoutMs           int32
	MemBatcherHashKeyNum   uint32
	MemBatcherGroupKey     string
	MemStorePoolWorkerSize int
	MemStorePoolQueueSize  int
}

KubeControllerManagerOptions is the main context object for the kube-controller manager.

func NewKubeControllerManagerOptions

func NewKubeControllerManagerOptions() (*KubeControllerManagerOptions, error)

NewKubeControllerManagerOptions creates a new KubeControllerManagerOptions with a default config.

func (*KubeControllerManagerOptions) ApplyTo

ApplyTo fills up controller manager config with options.

func (KubeControllerManagerOptions) Config

Config return a controller manager config objective

func (*KubeControllerManagerOptions) Flags

func (s *KubeControllerManagerOptions) Flags(allControllers []string, disabledByDefaultControllers []string) apiserverflag.NamedFlagSets

Flags returns flags for a specific APIServer by section name

Jump to

Keyboard shortcuts

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