-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 support for kubectl create quota command #19625
Conversation
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
1 similar comment
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
I will review this initially |
// NewCmdCreateQuota is a macro command to create a new quota | ||
func NewCmdCreateQuota(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "quota NAME [--hard=key1=value1,key2=value2] [--dry-run=bool]", |
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.
--hard
is marked as a required flag below. We should remove the [brackets]
around --hard
, correct?
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.
+1
I am evaluating how a quota can associate a resource to a particular workload-type (terminating vs always-running) and qos (best-effort vs burstable/guaranteed). Once I understand how that will look, I will review this PR, but please hold until that time. ETA is early next week. |
For your awareness, see: #19761 I do not anticipate what is presented here conflicting with what is shown. Will do a deeper dive of this PR on Monday. |
cmdutil.AddApplyAnnotationFlags(cmd) | ||
cmdutil.AddValidateFlags(cmd) | ||
cmdutil.AddGeneratorFlags(cmd, cmdutil.ResourceQuotaV1GeneratorName) | ||
cmd.Flags().String("hard", "", "Specify multiple key/value pair to insert in resourcequota (i.e. --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10)") |
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.
A comma-delimited set of resource=quantity pairs that define a hard limit.
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
1 similar comment
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
cc @kubernetes/kubectl |
PR needs rebase |
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
@maazkhan - is this something you plan to pick up again? |
@derekwaynecarr Sorry have been occupied with some other priority tasks at this point. I am not planning to pick this up for another 3-4 weeks. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
3 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
If this is no longer on your agenda, I may pick this up soon because I On Tuesday, June 14, 2016, Kubernetes Bot notifications@github.com wrote:
|
GCE e2e build/test failed for commit 21f1fc3. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
@derekwaynecarr Please go ahead with it. Thanks! |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@derekwaynecarr I've asked @sttts to take a look at continuing this |
Followed up by #28351 |
Automatic merge from submit-queue Add support for kubectl create quota command Follow-up of #19625 ``` Create a resourcequota with the specified name, hard limits and optional scopes Usage: kubectl create quota NAME [--hard=key1=value1,key2=value2] [--scopes=Scope1,Scope2] [--dry-run=bool] [flags] Aliases: quota, q Examples: // Create a new resourcequota named my-quota $ kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10 // Create a new resourcequota named best-effort $ kubectl create quota best-effort --hard=pods=100 --scopes=BestEffort ```
UPSTREAM: 63339: kubelet: volume: do not create event on mount success Origin-commit: 0fc25b024cc543115495fbbfafed5c99b3ef0713
This change is