kubernetes-sigs / descheduler

Descheduler for Kubernetes
https://sigs.k8s.io/descheduler
Apache License 2.0
4.23k stars 645 forks source link

`unknown field nodeAffinityType` error with v0.30.0 #1420

Closed headyj closed 3 weeks ago

headyj commented 1 month ago

What version of descheduler are you using?

descheduler version: v0.30.0

Does this issue reproduce with the latest release?

Actually It only occurs with latest release

Which descheduler CLI options are you using?

default command sent by the cronjob: https://github.com/kubernetes-sigs/descheduler/blob/master/charts/descheduler/templates/cronjob.yaml#L79-L89

Please provide a copy of your descheduler policy config file

default policy

What k8s version are you using (kubectl version)?

v1.29 (EKS)

What did you do?

Running the cronjob is not working since v0.30.0 with almost default chart values:

fullnameOverride: descheduler
cronJobApiVersion: batch/v1
schedule: "10 3 * * *"
suspend: false

What did you expect to see?

The job should be executed without error

What did you see instead?

It returns the following error:

descheduler-28615870-wl9vc E0529 03:20:38.162660       1 run.go:74] "command failed" err="failed decoding descheduler's policy config \"/policy-dir/policy.yaml\": strict decoding error: unknown field \"nodeAffinityType\""
vytautaskelmelissislt commented 4 weeks ago

Revert to v0.29.0 and everything will work like in charms.

a7i commented 3 weeks ago

I believe this was addressed in this PR: https://github.com/kubernetes-sigs/descheduler/pull/1412

I will work on cutting a patch release v0.30.1

a7i commented 3 weeks ago

Meanwhile you can try specifying your own policy as highlighted here

a7i commented 3 weeks ago

https://github.com/kubernetes-sigs/descheduler/pull/1425

a7i commented 3 weeks ago

v0.30.1 is out, let me know how it goes.

I tested and verified default profile works ✔️

headyj commented 3 weeks ago

Thank you @a7i , I tested v0.30.1 and the cronjob is working now!

a7i commented 3 weeks ago

thank you for reporting this!

/close

k8s-ci-robot commented 3 weeks ago

@a7i: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/descheduler/issues/1420#issuecomment-2149798807): >thank you for reporting this! > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.