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

Add support for kubectl create quota command #19625

Closed
wants to merge 1 commit into from

Conversation

maazkhan
Copy link
Contributor

@maazkhan maazkhan commented Jan 13, 2016

Create a resource quota with the specified name.

Usage:
  kubectl create quota NAME [--hard=string] [flags]

Aliases:
  q

Examples:
  # Create a new resource quota named my-quota with specified hard limit
  $ kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10

This change is Reviewable

@k8s-bot
Copy link

k8s-bot commented Jan 14, 2016

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
@k8s-bot
Copy link

k8s-bot commented Jan 14, 2016

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.

@k8s-github-robot k8s-github-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 14, 2016
@derekwaynecarr
Copy link
Member

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]",
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@derekwaynecarr
Copy link
Member

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.

@derekwaynecarr
Copy link
Member

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)")
Copy link
Member

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.

@k8s-bot
Copy link

k8s-bot commented Jan 28, 2016

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
@k8s-bot
Copy link

k8s-bot commented Jan 28, 2016

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.

@bgrant0607
Copy link
Member

cc @kubernetes/kubectl

@k8s-github-robot
Copy link

PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 4, 2016
@k8s-bot
Copy link

k8s-bot commented Feb 4, 2016

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.

@derekwaynecarr
Copy link
Member

@maazkhan - is this something you plan to pick up again?

@maazkhan
Copy link
Contributor Author

maazkhan commented Mar 1, 2016

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

@k8s-bot
Copy link

k8s-bot commented May 10, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

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
@k8s-bot
Copy link

k8s-bot commented Jun 13, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

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.

@k8s-bot
Copy link

k8s-bot commented Jun 14, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

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.

@k8s-bot
Copy link

k8s-bot commented Jun 15, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

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

If this is no longer on your agenda, I may pick this up soon because I
would find it useful day to day

On Tuesday, June 14, 2016, Kubernetes Bot notifications@github.com wrote:

Can one of the admins verify that this patch is reasonable to test? If so,
please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update
configurations in
kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull
https://github.com/kubernetes/test-infra/tree/master/jenkins/job-configs/kubernetes-jenkins-pull
instead.)

This message may repeat a few times in short succession due to
jenkinsci/ghprb-plugin#292
jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#19625 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AF8dbOlGkncq45muOyTgF5w3ZLipW95iks5qL0lNgaJpZM4HEfSR
.

@k8s-bot
Copy link

k8s-bot commented Jun 15, 2016

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.

@maazkhan
Copy link
Contributor Author

@derekwaynecarr Please go ahead with it. Thanks!

@k8s-bot
Copy link

k8s-bot commented Jun 23, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

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.

@k8s-bot
Copy link

k8s-bot commented Jun 29, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

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.

@ncdc
Copy link
Member

ncdc commented Jun 30, 2016

@derekwaynecarr I've asked @sttts to take a look at continuing this

@sttts
Copy link
Contributor

sttts commented Jul 1, 2016

Followed up by #28351

@sttts sttts closed this Jul 1, 2016
k8s-github-robot pushed a commit that referenced this pull request Jul 27, 2016
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
```
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request May 5, 2018
UPSTREAM: 63339: kubelet: volume: do not create event on mount success

Origin-commit: 0fc25b024cc543115495fbbfafed5c99b3ef0713
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants