@@ -367,41 +367,59 @@ See the Configuration section for more details
367367
368368#### Controller Configuration
369369
370- User can configure the ` PodMigrationJobControllerConfiguration ` through Koordinator Descheduler ConfigMap.
370+ User can configure the ` MigrationControllerArgs ` through Koordinator Descheduler ConfigMap.
371371
372372``` go
373- type PodMigrationJobControllerConfiguration struct {
374- // Paused indicates whether the PodMigrationJob Controller should to work or not.
375- Paused bool ` json:"paused,omitempty"`
376- // DryRun means only execute the entire migration logic except create Reservation or Delete Pod
377- // Default is false
378- DryRun bool ` json:"dryRun,omitempty"`
379-
380- // FlowControlQPS controls the number of arbitrations per second
381- FlowControlQPS string ` json:"flowControlQPS,omitempty"`
382- // FlowControlBurst is the maximum number of tokens
383- FlowControlBurst int32 ` json:"flowControlBurst,omitempty"`
384-
385- // MaxMigratingPerNode represents he maximum number of pods that can be migrating during migrate per node.
386- MaxMigratingPerNode *int32 ` json:"maxMigratingPerNode,omitempty"`
387-
388- // MaxMigratingPerNamespace represents he maximum number of pods that can be migrating during migrate per namespace.
389- MaxMigratingPerNamespace *int32 ` json:"maxMigratingPerNamespace,omitempty"`
390-
391- // MaxMigratingPerWorkload represents he maximum number of pods that can be migrating during migrate per workload.
392- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
393- MaxMigratingPerWorkload *intstr.IntOrString ` json:"maxMigratingPerWorkload,omitempty"`
394-
395- // MaxUnavailablePerWorkload represents he maximum number of pods that can be unavailable during migrate per workload.
396- // The unavailable state includes NotRunning/NotReady/Migrating/Evicting
397- // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
398- MaxUnavailablePerWorkload *intstr.IntOrString ` json:"maxUnavailablePerWorkload,omitempty"`
399-
400- // EvictionPolicy represents how to delete Pod, support "Delete" and "Eviction", default value is "Eviction"
401- EvictionPolicy string ` evictionPolicy,omitempty`
402- // DefaultDeleteOptions defines options when deleting migrated pods and preempted pods through the method specified by EvictionPolicy
403- DefaultDeleteOptions *metav1.DeleteOptions ` json:"defaultDeleteOptions,omitempty"`
373+ // MigrationControllerArgs holds arguments used to configure the MigrationController
374+ type MigrationControllerArgs struct {
375+ metav1.TypeMeta
376+
377+ // DryRun means only execute the entire migration logic except create Reservation or Delete Pod
378+ // Default is false
379+ DryRun bool ` json:"dryRun,omitempty"`
380+
381+ // EvictFailedBarePods allows pods without ownerReferences and in failed phase to be evicted.
382+ EvictFailedBarePods bool ` json:"evictFailedBarePods"`
383+
384+ // EvictLocalStoragePods allows pods using local storage to be evicted.
385+ EvictLocalStoragePods bool ` json:"evictLocalStoragePods"`
386+
387+ // EvictSystemCriticalPods allows eviction of pods of any priority (including Kubernetes system pods)
388+ EvictSystemCriticalPods bool ` json:"evictSystemCriticalPods"`
389+
390+ // IgnorePVCPods prevents pods with PVCs from being evicted.
391+ IgnorePvcPods bool ` json:"ignorePvcPods"`
392+
393+ // LabelSelector sets whether to apply label filtering when evicting.
394+ // Any pod matching the label selector is considered evictable.
395+ LabelSelector *metav1.LabelSelector ` json:"labelSelector,omitempty"`
396+
397+ // FlowControlQPS controls the number of arbitrations per second
398+ FlowControlQPS string ` json:"flowControlQPS,omitempty"`
399+ // FlowControlBurst is the maximum number of tokens
400+ FlowControlBurst int32 ` json:"flowControlBurst,omitempty"`
401+
402+ // MaxMigratingPerNode represents he maximum number of pods that can be migrating during migrate per node.
403+ MaxMigratingPerNode *int32 ` json:"maxMigratingPerNode,omitempty"`
404+
405+ // MaxMigratingPerNamespace represents he maximum number of pods that can be migrating during migrate per namespace.
406+ MaxMigratingPerNamespace *int32 ` json:"maxMigratingPerNamespace,omitempty"`
407+
408+ // MaxMigratingPerWorkload represents he maximum number of pods that can be migrating during migrate per workload.
409+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
410+ MaxMigratingPerWorkload *intstr.IntOrString ` json:"maxMigratingPerWorkload,omitempty"`
411+
412+ // MaxUnavailablePerWorkload represents he maximum number of pods that can be unavailable during migrate per workload.
413+ // The unavailable state includes NotRunning/NotReady/Migrating/Evicting
414+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
415+ MaxUnavailablePerWorkload *intstr.IntOrString ` json:"maxUnavailablePerWorkload,omitempty"`
416+
417+ // EvictionPolicy represents how to delete Pod, support "Delete" and "Eviction", default value is "Eviction"
418+ EvictionPolicy string ` json:"evictionPolicy,omitempty"`
419+ // DefaultDeleteOptions defines options when deleting migrated pods and preempted pods through the method specified by EvictionPolicy
420+ DefaultDeleteOptions *metav1.DeleteOptions ` json:"defaultDeleteOptions,omitempty"`
404421}
422+
405423```
406424
407425## Alternatives
@@ -412,3 +430,4 @@ type PodMigrationJobControllerConfiguration struct {
412430- 2022-07-11: Refactor proposal for review
413431- 2022-07-13: Update proposal based on review comments
414432- 2022-07-22: Update Spec
433+ - 2022-08-02: Update MigrationJob configuration
0 commit comments