-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Listing existing algorithm providers in scheduler #6967
Conversation
Updated 2015.04.21. Confirmed, not a bug. @lavalamp , Hi, I might have found a bug in kubernetes.
This suggests either or both of the following:
According to my understanding, I think it is due to both of the above reasons. Am I right? If so, I would like file a new issue and try to fix this. |
@HaiyangDING regarding your question to @lavalamp, any parameters displayed in |
@@ -61,6 +61,11 @@ const ( | |||
DefaultProvider = "DefaultProvider" | |||
) | |||
|
|||
var ( | |||
AlgorithmProviders = "" | |||
providerCounter = 1 |
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.
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, definitely cannot do it this way. :)
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.
Hi @mikedanese and @lavalamp
Thanks for all the advice. I have learned much:) And I need a little more time to fix all the changes you have proposed.
Aside from improving this PR, your suggestions also help me deepen my understanding of both go programming and kubernetes design. I cannot start working on it until Monday so new patch would need a little more time to be submitted. Many thanks to you again. Have a nice weekend! |
8a0f6c8
to
de157bc
Compare
New patch submitted thanks to your suggestions, please have a look. |
LGTM besides nit. |
@@ -300,3 +301,12 @@ func validatePriorityOrDie(priority schedulerapi.PriorityPolicy) { | |||
} | |||
} | |||
} | |||
|
|||
// This function is called when listing all availabe algortihm providers in `kube-scheduler --help` |
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.
Replace 'This function' with 'ListAlgorithmProviders' to conform with the godoc spec. From http://blog.golang.org/godoc-documenting-go-code a 'comment is a complete sentence that begins with the name of the element it describes'.
List the available algorithm providers with 'kube-scheduler --help' under field `algorithm_provider`
PTAL. @mikedanese @lavalamp |
LGTM |
Listing existing algorithm providers in scheduler
This PR implements issue #6612
Allow 'kube-scheduler --help' to show available algorithm providers under field '--algorithm_provider'. All available providers are listed and separated by ' | '.
If implemented a custom algorithm provider (MyProvider), --algorithm_provider would be like: