Closed timetofaceit closed 2 months ago
Hi @timetofaceit
Please see duplicate issue here https://github.com/kubernetes-sigs/descheduler/issues/1268
As mentioned, you need to unset default value of strategies
in order for profiles to take over
deschedulerPolicy:
strategies:
/kind support
Going to close Issue, but please feel free to re-open if the mentioned solution does not work for you. Thanks!
/close
@a7i: Closing this issue.
Hi! @a7i
Yes, it works when you unset strategies
, but the problem is that there is no support for minReplicas
variable because I get this error:
I0429 08:30:02.818166 1 tlsconfig.go:240] "Starting DynamicServingCertificateController" E0429 08:30:02.819117 1 server.go:96] "descheduler server" err="failed decoding descheduler's policy config \"/policy-dir/policy.yaml\": strict decoding error: unknown field \"minReplicas\"" E0429 08:30:02.819145 1 run.go:74] "command failed" err="failed decoding descheduler's policy config \"/policy-dir/policy.yaml\": strict decoding error: unknown field \"minReplicas\""
Also topologySpreadConstraints
is also not supported, because this helm version - 0.29.0
just doesn't have this variable and uses old helm config... 😢
Another question is why to make code updates to master branch but don't create a new release version?
/reopen
Hi @timetofaceit can you please share your policy yaml so I can guide you on setting it up for v1alpha2?
minReplicas
is available, please see README.md
Example:
profiles:
- name: default
pluginConfig:
- name: "DefaultEvictor"
args:
minReplicas: 2
Hi! @a7i
Sure!
Yes I see that they are available, but I'm getting the same error that I mentioned previously. 😕
My helm chart values file config looks like this now:
deschedulerPolicyAPIVersion: descheduler/v1alpha2
deschedulerPolicy:
strategies: {}
profiles:
- name: Default
pluginConfig:
- name: DefaultEvictor
args:
evictLocalStoragePods: false
evictSystemCriticalPods: false
ignorePvcPods: false
evictFailedBarePods: false
nodeFit: true
minReplicas: 1
- name: RemoveDuplicates
args:
excludeOwnerKinds:
- ReplicaSet
- name: LowNodeUtilization
args:
thresholds:
cpu : 30
memory: 30
pods: 20
targetThresholds:
cpu : 80
memory: 80
pods: 50
- name: HighNodeUtilization
args:
thresholds:
cpu : 80
memory: 80
pods: 50
- name: RemovePodsViolatingInterPodAntiAffinity
- name: RemovePodsViolatingNodeAffinity
args:
nodeAffinityType:
- requiredDuringSchedulingIgnoredDuringExecution
- name: RemovePodsViolatingTopologySpreadConstraint
args:
topologyBalanceNodeFit: true
constraints:
- DoNotSchedule
- ScheduleAnyway
plugins:
balance:
enabled:
- RemoveDuplicates
- LowNodeUtilization
- HighNodeUtilization
- RemovePodsViolatingTopologySpreadConstraint
deschedule:
enabled:
- RemovePodsViolatingInterPodAntiAffinity
- RemovePodsViolatingNodeAffinity
oh right!
minReplicas
capability was added by me here: https://github.com/kubernetes-sigs/descheduler/pull/1257
This is not part of release v0.29 and is scheduled for release v0.30 (should be out soon).
Please use the README from this release branch: https://github.com/kubernetes-sigs/descheduler/tree/release-1.29
Ok, thanks for the info! 👍
Will close this now.
Hi!
I'm trying to install descheduler using Helm Chart v0.29.0 and set policy profiles in my K8s cluster, but for some reason none of these are working when pods are up... 😢
I see that helm is still installing descheduler with v1alpha1 policy and not accepting v1alpha2. 🤔
Can this be updated / fixed? 🙏