config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDeschedulerPort         = 10258
	DefaultInsecureDeschedulerPort = 10251
)
View Source
const GroupName = "descheduler"

GroupName is the group name use in this package

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
	Scheme        = runtime.NewScheme()
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type DefaultEvictorArgs

type DefaultEvictorArgs struct {
	metav1.TypeMeta

	DryRun bool
	// MaxNoOfPodsToEvictPerNode restricts maximum of pods to be evicted per node.
	MaxNoOfPodsToEvictPerNode *int
	// MaxNoOfPodsToEvictPerNamespace restricts maximum of pods to be evicted per namespace.
	MaxNoOfPodsToEvictPerNamespace *int

	// EvictFailedBarePods allows pods without ownerReferences and in failed phase to be evicted.
	EvictFailedBarePods bool

	// EvictLocalStoragePods allows pods using local storage to be evicted.
	EvictLocalStoragePods bool

	// EvictSystemCriticalPods allows eviction of pods of any priority (including Kubernetes system pods)
	EvictSystemCriticalPods bool

	// IgnorePVCPods prevents pods with PVCs from being evicted.
	IgnorePvcPods bool

	// NodeFit sets whether to consider taints, node selectors,
	// and pod affinity when evicting. A pod whose tolerations, node selectors,
	// and affinity match a node other than the one it is currently running on
	// is evictable.
	NodeFit bool
	// PriorityThreshold represents a threshold for pod's priority class.
	// Any pod whose priority class is lower is evictable.
	PriorityThreshold *PriorityThreshold
	// LabelSelector sets whether to apply label filtering when evicting.
	// Any pod matching the label selector is considered evictable.
	LabelSelector *metav1.LabelSelector
}

DefaultEvictorArgs holds arguments used to configure the DefaultEvictor plugin.

func (*DefaultEvictorArgs) DeepCopy

func (in *DefaultEvictorArgs) DeepCopy() *DefaultEvictorArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultEvictorArgs.

func (*DefaultEvictorArgs) DeepCopyInto

func (in *DefaultEvictorArgs) DeepCopyInto(out *DefaultEvictorArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DefaultEvictorArgs) DeepCopyObject

func (in *DefaultEvictorArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeschedulerConfiguration

type DeschedulerConfiguration struct {
	metav1.TypeMeta

	// LeaderElection defines the configuration of leader election client.
	LeaderElection config.LeaderElectionConfiguration

	// ClientConnection specifies the kubeconfig file and client connection
	// settings for the proxy server to use when communicating with the apiserver.
	ClientConnection config.ClientConnectionConfiguration

	// DebuggingConfiguration holds configuration for Debugging related features
	// TODO: We might wanna make this a substruct like Debugging componentbaseconfig.DebuggingConfiguration
	config.DebuggingConfiguration

	// HealthzBindAddress is the IP address and port for the health check server to serve on.
	HealthzBindAddress string
	// MetricsBindAddress is the IP address and port for the metrics server to serve on.
	MetricsBindAddress string

	// Time interval for descheduler to run
	DeschedulingInterval metav1.Duration

	// Dry run
	DryRun bool

	// Profiles are descheduling profiles that koord-descheduler supports.
	Profiles []DeschedulerProfile

	// NodeSelector for a set of nodes to operate over
	NodeSelector *metav1.LabelSelector
}

DeschedulerConfiguration configures a descheduler

func (*DeschedulerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeschedulerConfiguration.

func (*DeschedulerConfiguration) DeepCopyInto

func (in *DeschedulerConfiguration) DeepCopyInto(out *DeschedulerConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeschedulerConfiguration) DeepCopyObject

func (in *DeschedulerConfiguration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeschedulerProfile

type DeschedulerProfile struct {
	Name         string
	PluginConfig []PluginConfig
	Plugins      *Plugins
}

DeschedulerProfile is a descheduling profile.

func (*DeschedulerProfile) DeepCopy

func (in *DeschedulerProfile) DeepCopy() *DeschedulerProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeschedulerProfile.

func (*DeschedulerProfile) DeepCopyInto

func (in *DeschedulerProfile) DeepCopyInto(out *DeschedulerProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MigrationControllerArgs

type MigrationControllerArgs struct {
	metav1.TypeMeta

	// DryRun means only execute the entire migration logic except create Reservation or Delete Pod
	// Default is false
	DryRun bool

	// EvictFailedBarePods allows pods without ownerReferences and in failed phase to be evicted.
	EvictFailedBarePods bool

	// EvictLocalStoragePods allows pods using local storage to be evicted.
	EvictLocalStoragePods bool

	// EvictSystemCriticalPods allows eviction of pods of any priority (including Kubernetes system pods)
	EvictSystemCriticalPods bool

	// IgnorePVCPods prevents pods with PVCs from being evicted.
	IgnorePvcPods bool

	// LabelSelector sets whether to apply label filtering when evicting.
	// Any pod matching the label selector is considered evictable.
	LabelSelector *metav1.LabelSelector

	// Namespaces carries a list of included/excluded namespaces
	Namespaces *Namespaces

	// MaxMigratingPerNode represents he maximum number of pods that can be migrating during migrate per node.
	MaxMigratingPerNode *int32

	// MaxMigratingPerNamespace represents he maximum number of pods that can be migrating during migrate per namespace.
	MaxMigratingPerNamespace *int32

	// MaxMigratingPerWorkload represents he maximum number of pods that can be migrating during migrate per workload.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	MaxMigratingPerWorkload *intstr.IntOrString

	// MaxUnavailablePerWorkload represents he maximum number of pods that can be unavailable during migrate per workload.
	// The unavailable state includes NotRunning/NotReady/Migrating/Evicting
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	MaxUnavailablePerWorkload *intstr.IntOrString

	// MaxConcurrentReconciles is the maximum number of concurrent Reconciles which can be run. Defaults to 1.
	MaxConcurrentReconciles int32

	// DefaultJobMode represents the default operating mode of the PodMigrationJob
	// Default is PodMigrationJobModeReservationFirst
	DefaultJobMode string

	// DefaultJobTTL represents the default TTL of the PodMigrationJob
	// Default is 5 minute
	DefaultJobTTL metav1.Duration

	// EvictQPS controls the number of evict per second
	EvictQPS string
	// EvictBurst is the maximum number of tokens
	EvictBurst int32
	// EvictionPolicy represents how to delete Pod, support "Delete" and "Eviction", default value is "Eviction"
	EvictionPolicy string
	// DefaultDeleteOptions defines options when deleting migrated pods and preempted pods through the method specified by EvictionPolicy
	DefaultDeleteOptions *metav1.DeleteOptions
}

MigrationControllerArgs holds arguments used to configure the MigrationController

func (*MigrationControllerArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationControllerArgs.

func (*MigrationControllerArgs) DeepCopyInto

func (in *MigrationControllerArgs) DeepCopyInto(out *MigrationControllerArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MigrationControllerArgs) DeepCopyObject

func (in *MigrationControllerArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Namespaces

type Namespaces struct {
	Include []string
	Exclude []string
}

Namespaces carries a list of included/excluded namespaces for which a given strategy is applicable

func (*Namespaces) DeepCopy

func (in *Namespaces) DeepCopy() *Namespaces

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespaces.

func (*Namespaces) DeepCopyInto

func (in *Namespaces) DeepCopyInto(out *Namespaces)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Plugin

type Plugin struct {
	// Name defines the name of plugin
	Name string `json:"name"`
}

func (*Plugin) DeepCopy

func (in *Plugin) DeepCopy() *Plugin

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin.

func (*Plugin) DeepCopyInto

func (in *Plugin) DeepCopyInto(out *Plugin)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PluginConfig

type PluginConfig struct {
	Name string
	Args runtime.Object
}

func (*PluginConfig) DeepCopy

func (in *PluginConfig) DeepCopy() *PluginConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig.

func (*PluginConfig) DeepCopyInto

func (in *PluginConfig) DeepCopyInto(out *PluginConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PluginSet

type PluginSet struct {
	Enabled  []Plugin
	Disabled []Plugin
}

func (*PluginSet) DeepCopy

func (in *PluginSet) DeepCopy() *PluginSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginSet.

func (*PluginSet) DeepCopyInto

func (in *PluginSet) DeepCopyInto(out *PluginSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Plugins

type Plugins struct {
	Deschedule PluginSet
	Balance    PluginSet
	Evictor    PluginSet
}

func (*Plugins) DeepCopy

func (in *Plugins) DeepCopy() *Plugins

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins.

func (*Plugins) DeepCopyInto

func (in *Plugins) DeepCopyInto(out *Plugins)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PriorityThreshold

type PriorityThreshold struct {
	Value *int32
	Name  string
}

func (*PriorityThreshold) DeepCopy

func (in *PriorityThreshold) DeepCopy() *PriorityThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityThreshold.

func (*PriorityThreshold) DeepCopyInto

func (in *PriorityThreshold) DeepCopyInto(out *PriorityThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RemovePodsViolatingNodeAffinityArgs

type RemovePodsViolatingNodeAffinityArgs struct {
	metav1.TypeMeta

	Namespaces       *Namespaces
	LabelSelector    *metav1.LabelSelector
	NodeAffinityType []string
}

RemovePodsViolatingNodeAffinityArgs holds arguments used to configure the RemovePodsViolatingNodeAffinity plugin.

func (*RemovePodsViolatingNodeAffinityArgs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemovePodsViolatingNodeAffinityArgs.

func (*RemovePodsViolatingNodeAffinityArgs) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RemovePodsViolatingNodeAffinityArgs) DeepCopyObject

func (in *RemovePodsViolatingNodeAffinityArgs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

Directories

Path Synopsis
Package v1alpha2 is the v1alpha2 version of the descheduler API
Package v1alpha2 is the v1alpha2 version of the descheduler API

Jump to

Keyboard shortcuts

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