-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add v1alpha2 registry based conversion #1006
add v1alpha2 registry based conversion #1006
Conversation
if obj.MinPodLifetimeSeconds == nil { | ||
obj.MinPodLifetimeSeconds = nil | ||
if args.MinPodLifetimeSeconds == nil { | ||
args.MinPodLifetimeSeconds = utilpointer.Uint(3600) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am setting our first explicit default here.
I think we wont get any feedback from the community regarding defaults if we don't start setting them. Waiting for the community feedback to start setting won't work I think. We will need to start experimenting here. (Using values that are already on the readme seems safe enough, as I think most people are just using those anyways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I needed at least one parameter defaulted to something that is different to how golang initializes variables by default to have a unit test that actually tests something
e8b666b
to
ef1c223
Compare
Docs are missing (namely our readme). Should we already update all of it and encourage v1alpha2 usage? Keep both there? Separate the docs? |
@ingvagabund @damemi @a7i and anyone around, please have a look when you have some time :D |
pkg/descheduler/policyconfig.go
Outdated
if versionedPolicy.APIVersion == "descheduler/v1alpha1" { | ||
// Build profiles | ||
internalPolicy, err = V1alpha1ToInternal(client, versionedPolicy, registry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe I'm wrong but I thought with conversion funcs set up we should just be able to pass either one to decode and let the conversion functions handle it. seems odd that we still have that extra layer here. Either way, I think the V1Alpha1ToInternal
function should be in the api package, not here (if we do need it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we have most of the auto generated conversions working for v1alpha2 to api because they are very similar (with exception to the runtime.Objects/RawExtensions args, which made us do some custom code).
v1alpha1 and api are very different, and none of it can be auto-generated.
Also we have some very custom ways to set defaults, and specially, setting thresholdPriorities. Right now we depend on having a client passed around.
The other thing is strategyParamsToPluginArgs map, that lives in strategy_migration.go, and we cant import descheduler.go in v1alpha1, as descheduler.go imports v1alpha1.
So moving this function to v1alpha1 would require some serious moving around. I think it is easier to keep it in the policyconfig.go file since it is temporary, and also very custom with all the conversion from strategies to profiles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried making V1alpha1ToInternal just become a normal Convert_v1alpha1_DeschedulerPolicy_To_api_DeschedulerPolicy in v1alpha1/conversion.go, but gave up mid tryin it 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damemi @ingvagabund what do you think? And also, if we want to go forward with moving it around, do you have suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so, I tried moving things around to avoid import cycles. We still have V1Alpha1ToInternal func, I don't want to create another client inside a default Convert_v1alpha1_DeschedulerPolicy_To_api_DeschedulerPolicy
func (a func with that name is called by decodes) ... so better to have this as something that we call explicitly so we can pass registries+clients and stuff around
b0c0e53
to
9e97411
Compare
@damemi @ingvagabund this is ready for another round when you have some time |
pkg/api/v1alpha1/conversion.go
Outdated
if deschedulerPolicy.EvictFailedBarePods != nil { | ||
evictBarePods = *deschedulerPolicy.EvictFailedBarePods | ||
if evictBarePods { | ||
klog.V(1).InfoS("Warning: EvictFailedBarePods is set to True. This could cause eviction of pods without ownerReferences.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no keysAndValues
args so not structured logs.
klog.V(1).InfoS("Warning: EvictFailedBarePods is set to True. This could cause eviction of pods without ownerReferences.") | |
klog.V(1).Info("Warning: EvictFailedBarePods is set to True. This could cause eviction of pods without ownerReferences.") |
pkg/api/v1alpha1/conversion.go
Outdated
if deschedulerPolicy.EvictSystemCriticalPods != nil { | ||
evictSystemCriticalPods = *deschedulerPolicy.EvictSystemCriticalPods | ||
if evictSystemCriticalPods { | ||
klog.V(1).InfoS("Warning: EvictSystemCriticalPods is set to True. This could cause eviction of Kubernetes system pods.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
klog.V(1).InfoS("Warning: EvictSystemCriticalPods is set to True. This could cause eviction of Kubernetes system pods.") | |
klog.V(1).Info("Warning: EvictSystemCriticalPods is set to True. This could cause eviction of Kubernetes system pods.") |
/lgtm |
pluginbuilder.Register(removepodsviolatingnodetaints.PluginName, removepodsviolatingnodetaints.New, &removepodsviolatingnodetaints.RemovePodsViolatingNodeTaintsArgs{}, registry) | ||
pluginbuilder.Register(removepodsviolatingtopologyspreadconstraint.PluginName, removepodsviolatingtopologyspreadconstraint.New, &removepodsviolatingtopologyspreadconstraint.RemovePodsViolatingTopologySpreadConstraintArgs{}, registry) | ||
func RegisterDefaultPlugins(registry pluginregistry.Registry) { | ||
pluginregistry.Register(defaultevictor.PluginName, defaultevictor.New, &defaultevictor.DefaultEvictorArgs{}, defaultevictor.ValidateDefaultEvictorArgs, defaultevictor.SetDefaults_DefaultEvictorArgs, registry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about to rename all validating functions into ValidatePluginArgs
or similar, turn them into args methods and invoke the method always? In case the validation is not needed, the method stays empty. The same for renaming the defaulting functions into SetDefaults
or similar, turn them into args method and invoke it in the same fashion? This way one does not need to pass either of the functions when registering a plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes us go back to having switch cases in validateDeschedulerConfiguration and setDefaultsPluginConfig. Since we are dealing with runtime.Objects there is no way to invoke SetDefaults before checking the type of PluginArgInstance. Even if they are args methods, were are dealing with runtime.Objects, and you would not have access to its methods withough casting it first to the correct arg type. I personally prefer to keep this being registered just one time in the registry, and keeping validateDeschedulerConfiguration and setDefaultsPluginConfig simple, without having to verify types in policyconfig.go
if err := runtime.DecodeInto(decoder, policy, versionedPolicy); err != nil { | ||
return nil, fmt.Errorf("failed decoding descheduler's policy config %q: %v", policyConfigFile, err) | ||
if err.Error() == "converting (v1alpha2.DeschedulerPolicy) to (v1alpha1.DeschedulerPolicy): unknown conversion" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More preferable to return an error constant and compare for that. The error string can change in time and cause unexpected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by returning an error constant?
This error is returned from the runtime library. I can't make it return a constant. And since they are just using fmt.Errorf, error.Is won't work.
If I create a constant error and just compare the strings (the only thing that will be equal), I wouldn't be doing anything differently really
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that checking the error string isn't optimal, but I'm wondering if there is a way to reorganize this so that's not necessary.
It seems weird to me that v1alpha1->internal has to be handled differently than v1alpha2->internal, ie that they both can't be handled by the Decoder. I would expect a function like Convert_v1alpha1_DeschedulerPolicy_To_api_DeschedulerPolicy()
to call v1alpha1.V1alpha1ToInternal()
(to handle the necessary manual conversion), and rely on the automated tooling.
If that's not possible, maybe this section can be refactored to not rely on the exact output of the conversion error to determine the branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I responded this here: #1006 (comment)
v1alpha1 is too different from internal api, and we do too many custom stuff (like how we set thresholdPriorities).
If that's not possible, maybe this section can be refactored to not rely on the exact output of the conversion error to determine the branch
I can try that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if we can drop the way that we set threshold priorities (that requires a client to be passed around) , Convert_v1alpha1_DeschedulerPolicy_To_api_DeschedulerPolicy calling V1alpha1ToInternal would be possible. Can we do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, calling manually-written code is not necessarily the problem, but the arguments required by that code, and I guess we don't want to create clients at the the conversion level, or inject clients from the upper level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, yeah needing a client makes that a lot tougher. My gut tells me that we should look more into how we do that, but it feels like getting close to yak shaving to focus too much on it. So I'm fine with the manual conversion the way it is for now, but would still like to look into the error string check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. Let me see what I can do here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knelasevero were you able to take another look at this to see if we could avoid the error string literal check?
if not, could you add a comment briefly explaining it (w/ a link to this thread) and a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a TODO comment that points back to this discussion and also points to my commit in another branch trying to move things around. I could not make it work, but if someone manages to make that work I think that would be the direction to go:
TODO: eec534a
Commit in another branch: knelasevero@b25a44c
|
||
func setDefaultEvictor(profile api.Profile) api.Profile { | ||
if len(profile.Plugins.Evict.Enabled) == 0 { | ||
profile.Plugins.Evict.Enabled = append(profile.Plugins.Evict.Enabled, defaultevictor.PluginName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be set only when defaultevictor.PluginName
plugin config is not present. I.e. we start from a clean slate. In case the plugin is already there but not in the list of enabled plugins, it might get re-enabled unintentionally. E.g. a profile has a plugin configuration for both the default and some custom evictor plugin but the list of enabled evict plugins is intentionally empty (e.g. user forgot to extend it with the custom evictor plugin name). By extending the list now the default evictor plugin could get enabled without user knowing when the custom plugin is expected. Better to error and have a user set the right plugin.
Since we are unable to detect whether there's a pluginConfig for a custom evictor plugin, the checks performed here are quite limited. Yet, better to make sure we enable the default evictor plugin with the most restrictions we can find.
We can have a discussion whether we enable two or more evict
extension points simultaneously later. Let's only focus on the conversion at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Please have a look, I made some changes
@@ -14,14 +14,14 @@ See the License for the specific language governing permissions and | |||
limitations under the License. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why renaming the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember now 😅 I think because all other files have two words together and none of the other files have underscores.
|
||
// evictorImpl implements the Evictor interface so plugins | ||
// can evict a pod without importing a specific pod evictor | ||
type evictorImpl struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do evictorImpl
and other types need to be present under pkg/api/v1alpha1
if they are expected to be used solely by the framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved things here by Mike's request: #1006 (comment)
/*197*/ pluginInstance, err := registry[string(name)].PluginBuilder(pluginArgs, &handleImpl{})
These lines need it. And I can't import it from somewhere else since basically all other packages import v1alpha1 and this would generate a cycle. When this was back at policyconfig.go we could just use it.
In overall the conversions from v1alpha1 -> internal and v1alpha2 -> internal are implemented. The main functionality is here. We have been going forth and back during the reviews. Any more improvements and refactoring would produce another delay. Let's merge the PR as it is unless there are reasonable objections not to. So we can move forward implementing other parts on top of the conversion. While dealing with improvement in parallel. The conversion code itself is pretty orthogonal to the rest of the framework. The mechanics for validation and defaulting are in place. The conversion produces an internal representation which we can build on top of. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ingvagabund The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm /hold for @damemi to get a chance to 👍 |
pkg/api/conversion.go
Outdated
@@ -0,0 +1,17 @@ | |||
/* | |||
Copyright 2022 The Kubernetes Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hate to do this, but these need to be updated to 2023 now in each new file
lgmt, just need to update the copyright year on the new files and I had one question about the error handling check we were discussing before |
Addressed the copyright year bump and the TODO for the error handling code |
thanks @knelasevero |
/label tide/merge-method-squash |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [descheduler](https://togithub.com/kubernetes-sigs/descheduler) | minor | `0.26.1` -> `0.27.0` | --- ### Release Notes <details> <summary>kubernetes-sigs/descheduler</summary> ### [`v0.27.0`](https://togithub.com/kubernetes-sigs/descheduler/releases/tag/v0.27.0): Descheduler v0.27.0 [Compare Source](https://togithub.com/kubernetes-sigs/descheduler/compare/v0.26.1...v0.27.0) #### What's Changed - add v1alpha2 registry based conversion by [@​knelasevero](https://togithub.com/knelasevero) in [https://github.com/kubernetes-sigs/descheduler/pull/1006](https://togithub.com/kubernetes-sigs/descheduler/pull/1006) - support client connection configuration to provide QPS and burst by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1034](https://togithub.com/kubernetes-sigs/descheduler/pull/1034) - enable auto generation of the documents by [@​harshanarayana](https://togithub.com/harshanarayana) in [https://github.com/kubernetes-sigs/descheduler/pull/1048](https://togithub.com/kubernetes-sigs/descheduler/pull/1048) - Fix v1alpha1 conversion to use universal decoder by [@​gustavomfc](https://togithub.com/gustavomfc) in [https://github.com/kubernetes-sigs/descheduler/pull/1051](https://togithub.com/kubernetes-sigs/descheduler/pull/1051) - metrics: enable loop duration and strategy duration metrics by [@​harshanarayana](https://togithub.com/harshanarayana) in [https://github.com/kubernetes-sigs/descheduler/pull/1041](https://togithub.com/kubernetes-sigs/descheduler/pull/1041) - v1alpha2 docs by [@​knelasevero](https://togithub.com/knelasevero) in [https://github.com/kubernetes-sigs/descheduler/pull/1049](https://togithub.com/kubernetes-sigs/descheduler/pull/1049) - remove some logic useless by [@​lucming](https://togithub.com/lucming) in [https://github.com/kubernetes-sigs/descheduler/pull/1059](https://togithub.com/kubernetes-sigs/descheduler/pull/1059) - check pod number by [@​xiaoanyunfei](https://togithub.com/xiaoanyunfei) in [https://github.com/kubernetes-sigs/descheduler/pull/1057](https://togithub.com/kubernetes-sigs/descheduler/pull/1057) - Adding descheduler policy API Version option in helm templates by [@​gdasson](https://togithub.com/gdasson) in [https://github.com/kubernetes-sigs/descheduler/pull/1068](https://togithub.com/kubernetes-sigs/descheduler/pull/1068) - Fix typo in nodeutilization types by [@​JannikSt](https://togithub.com/JannikSt) in [https://github.com/kubernetes-sigs/descheduler/pull/1072](https://togithub.com/kubernetes-sigs/descheduler/pull/1072) - Add note to HighNodeUtilization readme for GKE users by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1075](https://togithub.com/kubernetes-sigs/descheduler/pull/1075) - expose security context from helm chart by [@​JaneLiuL](https://togithub.com/JaneLiuL) in [https://github.com/kubernetes-sigs/descheduler/pull/1066](https://togithub.com/kubernetes-sigs/descheduler/pull/1066) - remove e2e tests from helm github action by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/937](https://togithub.com/kubernetes-sigs/descheduler/pull/937) - Add k8s compatibility warnings to logs by [@​JaneLiuL](https://togithub.com/JaneLiuL) in [https://github.com/kubernetes-sigs/descheduler/pull/1063](https://togithub.com/kubernetes-sigs/descheduler/pull/1063) - docs: typo by [@​dangen-effy](https://togithub.com/dangen-effy) in [https://github.com/kubernetes-sigs/descheduler/pull/1090](https://togithub.com/kubernetes-sigs/descheduler/pull/1090) - Descheduling profile with PoC fake plugin by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1093](https://togithub.com/kubernetes-sigs/descheduler/pull/1093) - bump golangci for go 1.20 by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1101](https://togithub.com/kubernetes-sigs/descheduler/pull/1101) - dry-run cli flag to use uppercase by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1103](https://togithub.com/kubernetes-sigs/descheduler/pull/1103) - fix default value assignment of EvictLocalStoragePods by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1104](https://togithub.com/kubernetes-sigs/descheduler/pull/1104) - bump to k8s 1.27 rc0 by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1100](https://togithub.com/kubernetes-sigs/descheduler/pull/1100) - fix go doc for method IsPodWithPVC by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1105](https://togithub.com/kubernetes-sigs/descheduler/pull/1105) - Populate extension points automatically for deschedule, balance, filter and preEvictionFilter by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1097](https://togithub.com/kubernetes-sigs/descheduler/pull/1097) - Delete "io/ioutil" package. by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1111](https://togithub.com/kubernetes-sigs/descheduler/pull/1111) - Fix typo log message for cachedClient by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1112](https://togithub.com/kubernetes-sigs/descheduler/pull/1112) - bump to k8s 1.27 by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1115](https://togithub.com/kubernetes-sigs/descheduler/pull/1115) - update v0.26.1 references by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1109](https://togithub.com/kubernetes-sigs/descheduler/pull/1109) - Drop Evict extension point by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1120](https://togithub.com/kubernetes-sigs/descheduler/pull/1120) - Add json tags to internal api fields by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1122](https://togithub.com/kubernetes-sigs/descheduler/pull/1122) - Add knelasevero to approvers by [@​knelasevero](https://togithub.com/knelasevero) in [https://github.com/kubernetes-sigs/descheduler/pull/1130](https://togithub.com/kubernetes-sigs/descheduler/pull/1130) - Drop remaining mentions of evict extension point by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1127](https://togithub.com/kubernetes-sigs/descheduler/pull/1127) - Add note on documentation versions with links by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1132](https://togithub.com/kubernetes-sigs/descheduler/pull/1132) - Add missing quote to configmap by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1133](https://togithub.com/kubernetes-sigs/descheduler/pull/1133) - fix policy example configmap by [@​AllenZMC](https://togithub.com/AllenZMC) in [https://github.com/kubernetes-sigs/descheduler/pull/1135](https://togithub.com/kubernetes-sigs/descheduler/pull/1135) - Do some code cleans. by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1129](https://togithub.com/kubernetes-sigs/descheduler/pull/1129) #### New Contributors - [@​Bobonium](https://togithub.com/Bobonium) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/995](https://togithub.com/kubernetes-sigs/descheduler/pull/995) - [@​harshanarayana](https://togithub.com/harshanarayana) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1048](https://togithub.com/kubernetes-sigs/descheduler/pull/1048) - [@​gustavomfc](https://togithub.com/gustavomfc) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1051](https://togithub.com/kubernetes-sigs/descheduler/pull/1051) - [@​lucming](https://togithub.com/lucming) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1059](https://togithub.com/kubernetes-sigs/descheduler/pull/1059) - [@​gdasson](https://togithub.com/gdasson) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1068](https://togithub.com/kubernetes-sigs/descheduler/pull/1068) - [@​JannikSt](https://togithub.com/JannikSt) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1072](https://togithub.com/kubernetes-sigs/descheduler/pull/1072) - [@​dangen-effy](https://togithub.com/dangen-effy) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1090](https://togithub.com/kubernetes-sigs/descheduler/pull/1090) - [@​yanggangtony](https://togithub.com/yanggangtony) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1103](https://togithub.com/kubernetes-sigs/descheduler/pull/1103) - [@​AllenZMC](https://togithub.com/AllenZMC) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1135](https://togithub.com/kubernetes-sigs/descheduler/pull/1135) **Full Changelog**: kubernetes-sigs/descheduler@v0.26.0...v0.27.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS41IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: lumiere-bot <98047013+lumiere-bot[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [descheduler](https://togithub.com/kubernetes-sigs/descheduler) | minor | `0.26.x` -> `0.27.x` | --- ### Release Notes <details> <summary>kubernetes-sigs/descheduler</summary> ### [`v0.27.0`](https://togithub.com/kubernetes-sigs/descheduler/releases/tag/v0.27.0): Descheduler v0.27.0 [Compare Source](https://togithub.com/kubernetes-sigs/descheduler/compare/v0.26.1...v0.27.0) #### What's Changed - add v1alpha2 registry based conversion by [@​knelasevero](https://togithub.com/knelasevero) in [https://github.com/kubernetes-sigs/descheduler/pull/1006](https://togithub.com/kubernetes-sigs/descheduler/pull/1006) - support client connection configuration to provide QPS and burst by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1034](https://togithub.com/kubernetes-sigs/descheduler/pull/1034) - enable auto generation of the documents by [@​harshanarayana](https://togithub.com/harshanarayana) in [https://github.com/kubernetes-sigs/descheduler/pull/1048](https://togithub.com/kubernetes-sigs/descheduler/pull/1048) - Fix v1alpha1 conversion to use universal decoder by [@​gustavomfc](https://togithub.com/gustavomfc) in [https://github.com/kubernetes-sigs/descheduler/pull/1051](https://togithub.com/kubernetes-sigs/descheduler/pull/1051) - metrics: enable loop duration and strategy duration metrics by [@​harshanarayana](https://togithub.com/harshanarayana) in [https://github.com/kubernetes-sigs/descheduler/pull/1041](https://togithub.com/kubernetes-sigs/descheduler/pull/1041) - v1alpha2 docs by [@​knelasevero](https://togithub.com/knelasevero) in [https://github.com/kubernetes-sigs/descheduler/pull/1049](https://togithub.com/kubernetes-sigs/descheduler/pull/1049) - remove some logic useless by [@​lucming](https://togithub.com/lucming) in [https://github.com/kubernetes-sigs/descheduler/pull/1059](https://togithub.com/kubernetes-sigs/descheduler/pull/1059) - check pod number by [@​xiaoanyunfei](https://togithub.com/xiaoanyunfei) in [https://github.com/kubernetes-sigs/descheduler/pull/1057](https://togithub.com/kubernetes-sigs/descheduler/pull/1057) - Adding descheduler policy API Version option in helm templates by [@​gdasson](https://togithub.com/gdasson) in [https://github.com/kubernetes-sigs/descheduler/pull/1068](https://togithub.com/kubernetes-sigs/descheduler/pull/1068) - Fix typo in nodeutilization types by [@​JannikSt](https://togithub.com/JannikSt) in [https://github.com/kubernetes-sigs/descheduler/pull/1072](https://togithub.com/kubernetes-sigs/descheduler/pull/1072) - Add note to HighNodeUtilization readme for GKE users by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1075](https://togithub.com/kubernetes-sigs/descheduler/pull/1075) - expose security context from helm chart by [@​JaneLiuL](https://togithub.com/JaneLiuL) in [https://github.com/kubernetes-sigs/descheduler/pull/1066](https://togithub.com/kubernetes-sigs/descheduler/pull/1066) - remove e2e tests from helm github action by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/937](https://togithub.com/kubernetes-sigs/descheduler/pull/937) - Add k8s compatibility warnings to logs by [@​JaneLiuL](https://togithub.com/JaneLiuL) in [https://github.com/kubernetes-sigs/descheduler/pull/1063](https://togithub.com/kubernetes-sigs/descheduler/pull/1063) - docs: typo by [@​dangen-effy](https://togithub.com/dangen-effy) in [https://github.com/kubernetes-sigs/descheduler/pull/1090](https://togithub.com/kubernetes-sigs/descheduler/pull/1090) - Descheduling profile with PoC fake plugin by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1093](https://togithub.com/kubernetes-sigs/descheduler/pull/1093) - bump golangci for go 1.20 by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1101](https://togithub.com/kubernetes-sigs/descheduler/pull/1101) - dry-run cli flag to use uppercase by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1103](https://togithub.com/kubernetes-sigs/descheduler/pull/1103) - fix default value assignment of EvictLocalStoragePods by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1104](https://togithub.com/kubernetes-sigs/descheduler/pull/1104) - bump to k8s 1.27 rc0 by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1100](https://togithub.com/kubernetes-sigs/descheduler/pull/1100) - fix go doc for method IsPodWithPVC by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1105](https://togithub.com/kubernetes-sigs/descheduler/pull/1105) - Populate extension points automatically for deschedule, balance, filter and preEvictionFilter by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1097](https://togithub.com/kubernetes-sigs/descheduler/pull/1097) - Delete "io/ioutil" package. by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1111](https://togithub.com/kubernetes-sigs/descheduler/pull/1111) - Fix typo log message for cachedClient by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1112](https://togithub.com/kubernetes-sigs/descheduler/pull/1112) - bump to k8s 1.27 by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1115](https://togithub.com/kubernetes-sigs/descheduler/pull/1115) - update v0.26.1 references by [@​a7i](https://togithub.com/a7i) in [https://github.com/kubernetes-sigs/descheduler/pull/1109](https://togithub.com/kubernetes-sigs/descheduler/pull/1109) - Drop Evict extension point by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1120](https://togithub.com/kubernetes-sigs/descheduler/pull/1120) - Add json tags to internal api fields by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1122](https://togithub.com/kubernetes-sigs/descheduler/pull/1122) - Add knelasevero to approvers by [@​knelasevero](https://togithub.com/knelasevero) in [https://github.com/kubernetes-sigs/descheduler/pull/1130](https://togithub.com/kubernetes-sigs/descheduler/pull/1130) - Drop remaining mentions of evict extension point by [@​ingvagabund](https://togithub.com/ingvagabund) in [https://github.com/kubernetes-sigs/descheduler/pull/1127](https://togithub.com/kubernetes-sigs/descheduler/pull/1127) - Add note on documentation versions with links by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1132](https://togithub.com/kubernetes-sigs/descheduler/pull/1132) - Add missing quote to configmap by [@​damemi](https://togithub.com/damemi) in [https://github.com/kubernetes-sigs/descheduler/pull/1133](https://togithub.com/kubernetes-sigs/descheduler/pull/1133) - fix policy example configmap by [@​AllenZMC](https://togithub.com/AllenZMC) in [https://github.com/kubernetes-sigs/descheduler/pull/1135](https://togithub.com/kubernetes-sigs/descheduler/pull/1135) - Do some code cleans. by [@​yanggangtony](https://togithub.com/yanggangtony) in [https://github.com/kubernetes-sigs/descheduler/pull/1129](https://togithub.com/kubernetes-sigs/descheduler/pull/1129) #### New Contributors - [@​Bobonium](https://togithub.com/Bobonium) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/995](https://togithub.com/kubernetes-sigs/descheduler/pull/995) - [@​harshanarayana](https://togithub.com/harshanarayana) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1048](https://togithub.com/kubernetes-sigs/descheduler/pull/1048) - [@​gustavomfc](https://togithub.com/gustavomfc) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1051](https://togithub.com/kubernetes-sigs/descheduler/pull/1051) - [@​lucming](https://togithub.com/lucming) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1059](https://togithub.com/kubernetes-sigs/descheduler/pull/1059) - [@​gdasson](https://togithub.com/gdasson) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1068](https://togithub.com/kubernetes-sigs/descheduler/pull/1068) - [@​JannikSt](https://togithub.com/JannikSt) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1072](https://togithub.com/kubernetes-sigs/descheduler/pull/1072) - [@​dangen-effy](https://togithub.com/dangen-effy) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1090](https://togithub.com/kubernetes-sigs/descheduler/pull/1090) - [@​yanggangtony](https://togithub.com/yanggangtony) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1103](https://togithub.com/kubernetes-sigs/descheduler/pull/1103) - [@​AllenZMC](https://togithub.com/AllenZMC) made their first contribution in [https://github.com/kubernetes-sigs/descheduler/pull/1135](https://togithub.com/kubernetes-sigs/descheduler/pull/1135) **Full Changelog**: kubernetes-sigs/descheduler@v0.26.0...v0.27.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/teutonet/teutonet-helm-charts). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS40IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Replaces #974
I am adding a single commit since I had the other PR (#974) as reference. Please let me know if somthing is not clear.In any case the conversion is way simpler now that we can use the registry to also register: validators, defaulters and argtypes.
I also changed the main loop to also consider that plugins can be of multiple types (one plugin with both types for example).
I changed the name of the pluginbuilder package to pluginregistry since we can hold more stuff into it.
Hope we can merge this soon to go to the other steps next! 🚀