Skip to content
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

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

binacs
Copy link
Member

@binacs binacs commented Feb 25, 2024

close #22

@binacs binacs requested a review from NickrenREN as a code owner February 25, 2024 13:37
@@ -1,19 +1,3 @@
/*
Copy link
Collaborator

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 ?

Copy link
Member Author

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

@@ -682,6 +693,10 @@ func CanPodBePreempted(pod *v1.Pod) int {
return -1
}

func GetPodMetaName(pod *v1.Pod) string {
Copy link
Collaborator

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

Copy link
Member Author

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
Copy link
Collaborator

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

Copy link
Member Author

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

@binacs binacs force-pushed the dev/binacs/support-load-aware branch from 2da6edf to 3a57bd9 Compare March 1, 2024 13:35
@binacs
Copy link
Member Author

binacs commented Mar 1, 2024

Split relevant code changes into two commits (vendor + feature), PTAL @NickrenREN

@binacs binacs force-pushed the dev/binacs/support-load-aware branch from 3a57bd9 to 918f3c9 Compare March 1, 2024 13:43
@binacs binacs force-pushed the dev/binacs/support-load-aware branch from 918f3c9 to 6f7c3cd Compare March 23, 2024 08:14
@binacs binacs requested a review from XinyiSong as a code owner March 23, 2024 08:14
@@ -72,6 +72,12 @@ const (
//
// Allows colocation
EnableColocation featuregate.Feature = "EnableColocation"

Copy link
Collaborator

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 ?

Copy link
Member Author

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

Copy link
Collaborator

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).

@binacs binacs force-pushed the dev/binacs/support-load-aware branch from 6f7c3cd to c7c7e08 Compare April 7, 2024 12:39
Copy link
Collaborator

@NickrenREN NickrenREN left a 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

@NickrenREN NickrenREN merged commit 67f0b1a into kubewharf:main Apr 8, 2024
5 checks passed
@binacs binacs deleted the dev/binacs/support-load-aware branch April 9, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add real time data (load) plugins
2 participants