-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat(scheduler): loadaware support nodemetric #25
feat(scheduler): loadaware support nodemetric #25
Conversation
@@ -1,19 +1,3 @@ | |||
/* |
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 you delete this ?
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.
It is a misoperation, and all headers have been restored
pkg/util/pod/util.go
Outdated
@@ -682,6 +693,10 @@ func CanPodBePreempted(pod *v1.Pod) int { | |||
return -1 | |||
} | |||
|
|||
func GetPodMetaName(pod *v1.Pod) string { |
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.
several functions are doing the same thing, don't add a new one
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.
fixed, use podutil.GetPodKey
instead
@@ -263,6 +263,8 @@ type PodInfoMaintainer struct { | |||
|
|||
podsWithAffinity PodInfoSlice | |||
podsWithRequiredAntiAffinity PodInfoSlice | |||
|
|||
podsByMetaName map[string]*PodInfo |
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 is only used by LoadAware plugin ? I am thinking if we can create separate data structures for plugin specific metrics/info instead of putting all info together in one 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.
good point, as the maintenance operations of related pods have been delegated to NodeMetricInfo
2da6edf
to
3a57bd9
Compare
Split relevant code changes into two commits (vendor + feature), PTAL @NickrenREN |
3a57bd9
to
918f3c9
Compare
918f3c9
to
6f7c3cd
Compare
pkg/features/godel_features.go
Outdated
@@ -72,6 +72,12 @@ const ( | |||
// | |||
// Allows colocation | |||
EnableColocation featuregate.Feature = "EnableColocation" | |||
|
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.
load aware is a plugin, why do we need a feature gate for 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.
Removed the featuregate and enabled LoadAwareStore by default, ptal
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.
Thanks for this, we can merge this PR, and leave a TODO for you (as we discussed offline).
6f7c3cd
to
c7c7e08
Compare
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.
TODO: add a new config option to limit the plugin set we can customize by pod annotation
close #22