Documentation ¶
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type DeschedulerPolicy
- type DeschedulerStrategy
- type FailedPods
- type Namespaces
- type NodeResourceUtilizationThresholds
- type Percentage
- type PodLifeTime
- type PodsHavingTooManyRestarts
- type RemoveDuplicates
- type ResourceThresholds
- type StrategyList
- type StrategyName
- type StrategyParameters
Constants ¶
const GroupName = "descheduler"
GroupName is the group name use in this package
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme Scheme = runtime.NewScheme() )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type DeschedulerPolicy ¶
type DeschedulerPolicy struct { metav1.TypeMeta // Strategies Strategies StrategyList // NodeSelector for a set of nodes to operate over NodeSelector *string // 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 // MaxNoOfPodsToEvictPerNode restricts maximum of pods to be evicted per node. MaxNoOfPodsToEvictPerNode *uint // MaxNoOfPodsToEvictPerNamespace restricts maximum of pods to be evicted per namespace. MaxNoOfPodsToEvictPerNamespace *uint }
func (*DeschedulerPolicy) DeepCopy ¶ added in v0.4.0
func (in *DeschedulerPolicy) DeepCopy() *DeschedulerPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeschedulerPolicy.
func (*DeschedulerPolicy) DeepCopyInto ¶ added in v0.4.0
func (in *DeschedulerPolicy) DeepCopyInto(out *DeschedulerPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeschedulerPolicy) DeepCopyObject ¶ added in v0.4.0
func (in *DeschedulerPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeschedulerStrategy ¶
type DeschedulerStrategy struct { // Enabled or disabled Enabled bool // Weight Weight int // Strategy parameters Params *StrategyParameters }
func (*DeschedulerStrategy) DeepCopy ¶ added in v0.4.0
func (in *DeschedulerStrategy) DeepCopy() *DeschedulerStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeschedulerStrategy.
func (*DeschedulerStrategy) DeepCopyInto ¶ added in v0.4.0
func (in *DeschedulerStrategy) DeepCopyInto(out *DeschedulerStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailedPods ¶ added in v0.22.0
type FailedPods struct { ExcludeOwnerKinds []string MinPodLifetimeSeconds *uint Reasons []string IncludingInitContainers bool }
func (*FailedPods) DeepCopy ¶ added in v0.22.0
func (in *FailedPods) DeepCopy() *FailedPods
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailedPods.
func (*FailedPods) DeepCopyInto ¶ added in v0.22.0
func (in *FailedPods) DeepCopyInto(out *FailedPods)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Namespaces ¶ added in v0.19.0
Namespaces carries a list of included/excluded namespaces for which a given strategy is applicable
func (*Namespaces) DeepCopy ¶ added in v0.19.0
func (in *Namespaces) DeepCopy() *Namespaces
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespaces.
func (*Namespaces) DeepCopyInto ¶ added in v0.19.0
func (in *Namespaces) DeepCopyInto(out *Namespaces)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeResourceUtilizationThresholds ¶
type NodeResourceUtilizationThresholds struct { UseDeviationThresholds bool Thresholds ResourceThresholds TargetThresholds ResourceThresholds NumberOfNodes int }
func (*NodeResourceUtilizationThresholds) DeepCopy ¶ added in v0.4.0
func (in *NodeResourceUtilizationThresholds) DeepCopy() *NodeResourceUtilizationThresholds
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourceUtilizationThresholds.
func (*NodeResourceUtilizationThresholds) DeepCopyInto ¶ added in v0.4.0
func (in *NodeResourceUtilizationThresholds) DeepCopyInto(out *NodeResourceUtilizationThresholds)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Percentage ¶
type Percentage float64
type PodLifeTime ¶ added in v0.20.0
func (*PodLifeTime) DeepCopy ¶ added in v0.20.0
func (in *PodLifeTime) DeepCopy() *PodLifeTime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLifeTime.
func (*PodLifeTime) DeepCopyInto ¶ added in v0.20.0
func (in *PodLifeTime) DeepCopyInto(out *PodLifeTime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodsHavingTooManyRestarts ¶ added in v0.18.0
func (*PodsHavingTooManyRestarts) DeepCopy ¶ added in v0.18.0
func (in *PodsHavingTooManyRestarts) DeepCopy() *PodsHavingTooManyRestarts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodsHavingTooManyRestarts.
func (*PodsHavingTooManyRestarts) DeepCopyInto ¶ added in v0.18.0
func (in *PodsHavingTooManyRestarts) DeepCopyInto(out *PodsHavingTooManyRestarts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoveDuplicates ¶ added in v0.18.0
type RemoveDuplicates struct {
ExcludeOwnerKinds []string
}
func (*RemoveDuplicates) DeepCopy ¶ added in v0.18.0
func (in *RemoveDuplicates) DeepCopy() *RemoveDuplicates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoveDuplicates.
func (*RemoveDuplicates) DeepCopyInto ¶ added in v0.18.0
func (in *RemoveDuplicates) DeepCopyInto(out *RemoveDuplicates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceThresholds ¶
type ResourceThresholds map[v1.ResourceName]Percentage
func (ResourceThresholds) DeepCopy ¶ added in v0.10.0
func (in ResourceThresholds) DeepCopy() ResourceThresholds
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceThresholds.
func (ResourceThresholds) DeepCopyInto ¶ added in v0.10.0
func (in ResourceThresholds) DeepCopyInto(out *ResourceThresholds)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StrategyList ¶
type StrategyList map[StrategyName]DeschedulerStrategy
func (StrategyList) DeepCopy ¶ added in v0.10.0
func (in StrategyList) DeepCopy() StrategyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategyList.
func (StrategyList) DeepCopyInto ¶ added in v0.10.0
func (in StrategyList) DeepCopyInto(out *StrategyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StrategyName ¶
type StrategyName string
type StrategyParameters ¶
type StrategyParameters struct { NodeResourceUtilizationThresholds *NodeResourceUtilizationThresholds NodeAffinityType []string PodsHavingTooManyRestarts *PodsHavingTooManyRestarts PodLifeTime *PodLifeTime RemoveDuplicates *RemoveDuplicates FailedPods *FailedPods IncludeSoftConstraints bool Namespaces *Namespaces ThresholdPriority *int32 ThresholdPriorityClassName string LabelSelector *metav1.LabelSelector NodeFit bool IncludePreferNoSchedule bool ExcludedTaints []string }
Besides Namespaces only one of its members may be specified TODO(jchaloup): move Namespaces ThresholdPriority and ThresholdPriorityClassName to individual strategies
once the policy version is bumped to v1alpha2
func (*StrategyParameters) DeepCopy ¶ added in v0.4.0
func (in *StrategyParameters) DeepCopy() *StrategyParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategyParameters.
func (*StrategyParameters) DeepCopyInto ¶ added in v0.4.0
func (in *StrategyParameters) DeepCopyInto(out *StrategyParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.