1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Jan Chaloupka
991eddb691 Turn StrategyParameters.NodeResourceUtilizationThresholds field into a pointer
The field is intended to be omitempty when not set. Without a pointer the strategy
serialized into json string looks like:

```json
strategies:
  LowNodeUtilization:
    enabled: true
    params:
      nodeResourceUtilizationThresholds:
        numberOfNodes: 1
        targetThresholds:
          cpu: 50
          memory: 50
          pods: 20
        thresholds:
          cpu: 50
          memory: 50
          pods: 20
  RemoveDuplicates:
    enabled: true
    params:
      nodeResourceUtilizationThresholds: {}
  RemovePodsViolatingInterPodAntiAffinity:
    enabled: true
    params:
      nodeResourceUtilizationThresholds: {}
  RemovePodsViolatingNodeAffinity:
    enabled: true
    params:
      nodeAffinityType:
      - requiredDuringSchedulingIgnoredDuringExecution
      nodeResourceUtilizationThresholds: {}
  RemovePodsViolatingNodeTaints:
    enabled: true
    params:
      nodeResourceUtilizationThresholds: {}
```

It's preferred to have the following json string instead:
```
strategies:
  LowNodeUtilization:
    enabled: true
    params:
      nodeResourceUtilizationThresholds:
        numberOfNodes: 1
        targetThresholds:
          cpu: 50
          memory: 50
          pods: 20
        thresholds:
          cpu: 50
          memory: 50
          pods: 20
  RemoveDuplicates:
    enabled: true
  RemovePodsViolatingInterPodAntiAffinity:
    enabled: true
  RemovePodsViolatingNodeAffinity:
    enabled: true
    params:
      nodeAffinityType:
      - requiredDuringSchedulingIgnoredDuringExecution
  RemovePodsViolatingNodeTaints:
    enabled: true
```
2020-04-28 15:20:30 +02:00
Mike Dame
e7c42794a0 Add RemovePodsHavingTooManyRestarts strategy 2020-04-24 10:48:28 -04:00
Shubham Minglani
40bb490f4c add RemovePodsViolatingNodeAffinity strategy
This commit adds requiredDuringSchedulingIgnoredDuringExecution
for RemovePodsViolatingNodeAffinity strategy.

Also adds unit tests and documentation.
2018-02-19 16:20:59 +05:30
Avesh Agarwal
44752e5e83 Update code and hack dir for kube 1.9 rebase. 2018-01-09 12:41:01 -05:00
Avesh Agarwal
d634701250 Descheduler related modifications. 2017-09-15 14:13:27 -04:00
Avesh Agarwal
a6b75a2fd5 Fix compilation issue by importing time. 2017-08-06 16:02:13 -04:00
Avesh Agarwal
718efe69e1 Move ReschedulingInterval to rescheduler's configuration out of
rescheduler's policy.
2017-08-06 15:58:30 -04:00
Avesh Agarwal
6178d99993 Modify percentage type to float64 2017-08-04 14:05:14 -04:00
Avesh Agarwal
b2bfb0e24f Add number of nodes thershold to node utilization strategies. 2017-08-04 14:01:55 -04:00
Avesh Agarwal
79985395d5 Update rescheduler's implementation. 2017-08-04 11:55:20 -04:00
Avesh Agarwal
02382b61f7 Update rescheduler strategies types. 2017-08-04 09:59:40 -04:00
Avesh Agarwal
4be75d86f6 Implement resource utilization threhsolds types. 2017-08-03 19:39:52 -04:00
Avesh Agarwal
d721b649b7 Add rescheduler policy type. 2017-07-29 11:40:32 -04:00