options

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllersOptions

func NewControllersOptions

func NewControllersOptions() *ControllersOptions

func (*ControllersOptions) AddFlags

func (o *ControllersOptions) AddFlags(fss *cliflag.NamedFlagSets)

func (*ControllersOptions) ApplyTo

ApplyTo fills up config with options

func (*ControllersOptions) Config

type GenericControllerOptions

type GenericControllerOptions struct {
	Controllers        []string
	LabelSelector      string
	DynamicGVResources []string

	election.LeaderElectionConfiguration

	WorkloadProfilingOptions
}

GenericControllerOptions holds the configurations for controller based configurations.

func NewGenericControllerOptions

func NewGenericControllerOptions() *GenericControllerOptions

NewGenericControllerOptions creates a new Options with a default config.

func (*GenericControllerOptions) AddFlags

AddFlags adds flags to the specified FlagSet.

func (*GenericControllerOptions) ApplyTo

ApplyTo fills up config with options

func (*GenericControllerOptions) Config

type HealthzOptions added in v0.2.0

type HealthzOptions struct {
	DryRun        bool
	NodeSelector  string
	AgentSelector map[string]string

	CheckWindow        time.Duration
	UnhealthyPeriods   time.Duration
	AgentUnhealthySecs map[string]int

	HandlePeriod  time.Duration
	AgentHandlers map[string]string

	TaintQPS                 float32
	EvictQPS                 float32
	DisruptionTaintThreshold float32
	DisruptionEvictThreshold float32
}

type IHPAOptions added in v0.5.6

type IHPAOptions struct {
	SyncWorkers  int
	ResyncPeriod time.Duration
}

func NewIHPAOptions added in v0.5.6

func NewIHPAOptions() *IHPAOptions

func (*IHPAOptions) AddFlags added in v0.5.6

func (o *IHPAOptions) AddFlags(fss *cliflag.NamedFlagSets)

func (*IHPAOptions) ApplyTo added in v0.5.6

func (o *IHPAOptions) ApplyTo(c *controller.IHPAConfig) error

type KCCOptions

type KCCOptions struct {
	ValidAPIGroupSet []string
}

KCCOptions holds the configurations for katalyst config.

func NewKCCOptions

func NewKCCOptions() *KCCOptions

NewKCCOptions creates a new Options with a default config.

func (*KCCOptions) AddFlags

func (o *KCCOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*KCCOptions) ApplyTo

func (o *KCCOptions) ApplyTo(c *controller.KCCConfig) error

ApplyTo fills up config with options

func (*KCCOptions) Config

func (o *KCCOptions) Config() (*controller.KCCConfig, error)

type LifeCycleOptions

type LifeCycleOptions struct {
	EnableHealthz      bool
	EnableCNCLifecycle bool

	*HealthzOptions
}

LifeCycleOptions holds the configurations for life cycle.

func NewLifeCycleOptions

func NewLifeCycleOptions() *LifeCycleOptions

NewLifeCycleOptions creates a new Options with a default config.

func (*LifeCycleOptions) AddFlags

func (o *LifeCycleOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*LifeCycleOptions) ApplyTo

ApplyTo fills up config with options

func (*LifeCycleOptions) Config

type MonitorOptions added in v0.4.0

type MonitorOptions struct {
	// EnableCNRMonitor is a flag to enable CNR monitor controller
	EnableCNRMonitor bool
}

MonitorOptions holds the configurations for Monitor.

func NewMonitorOptions added in v0.4.0

func NewMonitorOptions() *MonitorOptions

func (*MonitorOptions) AddFlags added in v0.4.0

func (o *MonitorOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*MonitorOptions) ApplyTo added in v0.4.0

ApplyTo fills up config with options

func (*MonitorOptions) Config added in v0.4.0

func (o *MonitorOptions) Config() (*controller.MonitorConfig, error)

type NodeOvercommitOptions added in v0.4.0

type NodeOvercommitOptions struct {
	// numer of workers to sync overcommit config
	SyncWorkers int

	// time interval of reconcile overcommit config
	ConfigReconcilePeriod time.Duration
}

NodeOvercommitOptions holds the configurations for nodeOvercommitConfig controller.

type Options

type Options struct {
	*options.GenericOptions
	// contains filtered or unexported fields
}

Options holds the configurations for controllers.

func NewOptions

func NewOptions() *Options

NewOptions creates a new Options with a default config.

func (*Options) AddFlags

func (o *Options) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*Options) ApplyTo

func (o *Options) ApplyTo(c *config.Configuration) error

ApplyTo fills up config with options

func (*Options) Config

func (o *Options) Config() (*config.Configuration, error)

type OvercommitOptions added in v0.4.0

type OvercommitOptions struct {
	NodeOvercommitOptions
}

OvercommitOptions holds the configurations for overcommit.

func NewOvercommitOptions added in v0.4.0

func NewOvercommitOptions() *OvercommitOptions

NewOvercommitOptions creates a new Options with a default config.

func (*OvercommitOptions) AddFlags added in v0.4.0

func (o *OvercommitOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet

func (*OvercommitOptions) ApplyTo added in v0.4.0

func (*OvercommitOptions) Config added in v0.4.0

type ResourcePortraitIndicatorPluginOptions added in v0.5.4

type ResourcePortraitIndicatorPluginOptions struct {
	// available datasource: prom
	DataSource string
	// DataSourcePromConfig is the prometheus datasource config
	DataSourcePromConfig prometheus.PromConfig
	// AlgorithmServingAddress is the algorithm serving address
	AlgorithmServingAddress string
	// AlgorithmConfigMapName is the configmap name used by resource portrait plugin
	AlgorithmConfigMapName string
	// AlgorithmConfigMapNamespace is the configmap namespace used by resource portrait plugin
	AlgorithmConfigMapNamespace string
	// EnableAutomaticResyncGlobalConfiguration is used to enable automatic synchronization of global configuration.
	// If this switch is enabled, the plug-in will refresh itself configuration in SPD with the configuration in the
	// global ConfigMap. If this switch is disable, users can customize the configuration in SPD.
	EnableAutomaticResyncGlobalConfiguration bool
}

ResourcePortraitIndicatorPluginOptions holds the configurations for resource portrait indicator plugin data.

func NewResourcePortraitIndicatorPluginOptions added in v0.5.4

func NewResourcePortraitIndicatorPluginOptions() *ResourcePortraitIndicatorPluginOptions

func (*ResourcePortraitIndicatorPluginOptions) AddFlags added in v0.5.4

AddFlags adds flags to the specified FlagSet.

func (*ResourcePortraitIndicatorPluginOptions) ApplyTo added in v0.5.4

ApplyTo fills up config with options

type ResourceRecommendOptions

type ResourceRecommendOptions struct {
	// time interval of resync VPA
	VPAResyncPeriod time.Duration
}

ResourceRecommendOptions holds the configurations for resource recommend.

type ResourceRecommenderOptions added in v0.4.1

type ResourceRecommenderOptions struct {
	OOMRecordMaxNumber int `desc:"max number for oom record"`

	HealthProbeBindPort string `desc:"The port the health probe binds to."`
	MetricsBindPort     string `desc:"The port the metric endpoint binds to."`

	// available datasource: prom
	DataSource []string
	// DataSourcePromConfig is the prometheus datasource config
	DataSourcePromConfig prometheus.PromConfig

	// LogVerbosityLevel to specify log verbosity level. (The default level is 4)
	// Set it to something larger than 4 if more detailed logs are needed.
	LogVerbosityLevel string
}

func NewResourceRecommenderOptions added in v0.4.1

func NewResourceRecommenderOptions() *ResourceRecommenderOptions

NewResourceRecommenderOptions creates a new Options with a default config.

func (*ResourceRecommenderOptions) AddFlags added in v0.4.1

AddFlags adds flags to the specified FlagSet

func (*ResourceRecommenderOptions) ApplyTo added in v0.4.1

func (*ResourceRecommenderOptions) Config added in v0.4.1

type SPDOptions

type SPDOptions struct {
	ResyncPeriod           time.Duration
	SPDWorkloadGVResources []string
	SPDPodLabelIndexerKeys []string
	EnableCNCCache         bool
	IndicatorPlugins       []string
	BaselinePercent        map[string]int64

	*ResourcePortraitIndicatorPluginOptions
}

SPDOptions holds the configurations for service profile data.

func NewSPDOptions

func NewSPDOptions() *SPDOptions

NewSPDOptions creates a new Options with a default config.

func (*SPDOptions) AddFlags

func (o *SPDOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*SPDOptions) ApplyTo

func (o *SPDOptions) ApplyTo(c *controller.SPDConfig) error

ApplyTo fills up config with options

func (*SPDOptions) Config

func (o *SPDOptions) Config() (*controller.SPDConfig, error)

type VPAOptions

type VPAOptions struct {
	// we use VPAWorkloadGVResources to define those VPA concerned GVRs
	VPAWorkloadGVResources []string
	VPAPodLabelIndexerKeys []string
	// count of workers to sync VPA and VPARec
	VPASyncWorkers    int
	VPARecSyncWorkers int

	VPARecommendationOptions
	ResourceRecommendOptions
}

VPAOptions holds the configurations for vertical pod auto-scaler.

func NewVPAOptions

func NewVPAOptions() *VPAOptions

NewVPAOptions creates a new Options with a default config.

func (*VPAOptions) AddFlags

func (o *VPAOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*VPAOptions) ApplyTo

func (o *VPAOptions) ApplyTo(c *controller.VPAConfig) error

ApplyTo fills up config with options

func (*VPAOptions) Config

func (o *VPAOptions) Config() (*controller.VPAConfig, error)

type VPARecommendationOptions

type VPARecommendationOptions struct{}

VPARecommendationOptions holds the configurations for vertical pod auto-scaler recommendation.

type WorkloadProfilingOptions added in v0.4.0

type WorkloadProfilingOptions struct {
	ExplicitChecking bool

	// the requirements below work as 'and' rather than 'or'
	AnnoSelector   string
	LabelSelector  string
	Namespaces     []string
	AntiNamespaces []string
}

WorkloadProfilingOptions holds the configurations for spd lifecycle

Jump to

Keyboard shortcuts

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