options

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecryptFunc added in v1.7.0

type DecryptFunc func(c *ServerOption) error

type ServerOption

type ServerOption struct {
	KubeClientOptions kube.ClientOptions
	CertFile          string
	KeyFile           string
	CaCertFile        string
	CertData          []byte
	KeyData           []byte
	CaCertData        []byte
	// leaderElection defines the configuration of leader election.
	LeaderElection config.LeaderElectionConfiguration
	// Deprecated: use ResourceNamespace instead.
	LockObjectNamespace string
	PrintVersion        bool
	// WorkerThreads is the number of threads syncing job operations
	// concurrently. Larger number = faster job updating, but more CPU load.
	WorkerThreads uint32
	// MaxRequeueNum is the number of times a job, queue or command will be requeued before it is dropped out of the queue.
	// With the current rate-limiter in use (5ms*2^(maxRetries-1)) the following numbers represent the times
	// a job, queue or command is going to be requeued:
	// 5ms, 10ms, 20ms, 40ms, 80ms, 160ms, 320ms, 640ms, 1.3s, 2.6s, 5.1s, 10.2s, 20.4s, 41s, 82s
	MaxRequeueNum  int
	SchedulerNames []string
	// HealthzBindAddress is the IP address and port for the health check server to serve on,
	// defaulting to 0.0.0.0:11251
	HealthzBindAddress string
	EnableHealthz      bool
	// To determine whether inherit owner's annotations for pods when create podgroup
	InheritOwnerAnnotations bool
	// WorkerThreadsForPG is the number of threads syncing podgroup operations
	// The larger the number, the faster the podgroup processing, but requires more CPU load.
	WorkerThreadsForPG uint32
	// WorkerThreadsForGC is the number of threads for recycling jobs
	// The larger the number, the faster the job recycling, but requires more CPU load.
	WorkerThreadsForGC uint32
	// Controllers specify controllers to set up.
	// Case1: Use '*' for all controllers,
	// Case2: "+gc-controller,+job-controller,+jobflow-controller,+jobtemplate-controller,+pg-controller,+queue-controller"
	// to enable specific controllers,
	// Case3: "-gc-controller,-job-controller,-jobflow-controller,-jobtemplate-controller,-pg-controller,-queue-controller"
	// to disable specific controllers,
	Controllers []string
}

ServerOption is the main context object for the controllers.

func NewServerOption

func NewServerOption() *ServerOption

NewServerOption creates a new CMServer with a default config.

func (*ServerOption) AddFlags

func (s *ServerOption) AddFlags(fs *pflag.FlagSet, knownControllers []string)

AddFlags adds flags for a specific CMServer to the specified FlagSet.

func (*ServerOption) CheckOptionOrDie

func (s *ServerOption) CheckOptionOrDie() error

CheckOptionOrDie checks all options and returns all errors if they are invalid. If there are any invalid options, it aggregates all the errors and returns them.

func (*ServerOption) ParseCAFiles added in v1.7.0

func (s *ServerOption) ParseCAFiles(decryptFunc DecryptFunc) error

ParseCAFiles parse ca file by decryptFunc

Jump to

Keyboard shortcuts

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