options

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CorednsOptions

type CorednsOptions struct {
	PeriodSeconds    time.Duration
	SuccessThreshold time.Duration
	FailureThreshold time.Duration
	StaleThreshold   time.Duration
}

CorednsOptions contains options for coredns detector.

func NewCorednsOptions

func NewCorednsOptions() *CorednsOptions

NewCorednsOptions return default options for coredns detector.

func (*CorednsOptions) AddFlags

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

AddFlags adds flags of coredns detector to the specified FlagSet.

func (*CorednsOptions) Complete

func (o *CorednsOptions) Complete() error

Complete fills in fields required to have valid data.

func (*CorednsOptions) Validate

func (o *CorednsOptions) Validate() field.ErrorList

Validate checks options and return a slice of found errs.

type GenericOptions

type GenericOptions struct {
	KarmadaKubeConfig   string
	KarmadaContext      string
	KarmadaConfig       *rest.Config
	MemberClusterConfig *rest.Config

	ClusterName string
	Hostname    string

	BindAddress string
	HealthzPort int

	Detectors []string

	LeaderElection componentbaseconfig.LeaderElectionConfiguration
}

GenericOptions contains some generic options.

func NewGenericOptions

func NewGenericOptions() *GenericOptions

NewGenericOptions return default generic options.

func (*GenericOptions) AddFlags

func (o *GenericOptions) AddFlags(fs *pflag.FlagSet, allDetectors []string)

AddFlags adds flags of generic options to the specified FlagSet.

func (*GenericOptions) Complete

func (o *GenericOptions) Complete() error

Complete fills in fields required to have valid data.

func (*GenericOptions) Validate

func (o *GenericOptions) Validate() field.ErrorList

Validate checks options and return a slice of found errs.

type Options

type Options struct {
	Generic *GenericOptions
	Coredns *CorednsOptions
}

Options contains everything necessary to create and run cluster-problem-detector.

func NewOptions

func NewOptions() *Options

NewOptions return default options.

func (*Options) Complete

func (o *Options) Complete() error

Complete fills in fields required to have valid data.

func (*Options) Flags

func (o *Options) Flags(allDetectors []string) cliflag.NamedFlagSets

Flags return all flag sets for options.

func (*Options) Validate

func (o *Options) Validate() field.ErrorList

Validate checks options and return a slice of found errs.

Jump to

Keyboard shortcuts

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