kubernetes/pkg/kubectl/cmd
Jacob Tanenbaum 901bbee2fd Add 'kubectl set limit'
Add a way to set resource limits/requests on running pods

Ref: https://github.com/kubernetes/kubernetes/issues/21648

I squashed the commits to make rebasing easier
Change log:

- fixed a typo that caused the command to be run with kubectl set set instead of the correct kubectl set limit

- added a ResourcesWithPodTemplates to pkg/kubectl/cmd/util/factory.go
     instead of hardcoding these resources move there description all in one place

- Fixing some of the flow control in kubectl set limit

- update the help info

- changed the name of ResourcesWithPodTemplates to ResourcesWithPodSpecs to more accuratly describe what it is doing
    and changed the variable names to lower case to conform to go's variable naming convention

- changing the name of the command from 'set limit' to 'set resources'

- Adding the new file pkg/kubectl/cmd/set/set_resources.go

- changes to the test cases to reflect the change from 'kubectl set limit' to 'kubectl set resources'

- comment removed

- adding the man page to the git repository attempting to fix Jenkins tests

- adding the user guide

- fixed a few typos

- typo in hack/cmd-test.sh

- implamenting suggestions for command help text

- adding the dry-run flag

- removing the "remove" option in favor of zeroing out request/limits in order to remove them

- changed limits/requests to requests/limit

- changing ResourcesWithPodSpec

- updated generated docs and removed whitespace

- change priint on success message from "resource limits/requests updated" to "resource requirements updated"

- minor rebasing issues - 'hack/test-cmd.sh' now passes

- cmdutil.PrintSuccess added another argument

- fixing mungedocs failure

- removed whitespace from hack/make-rules/test-cmd.sh and an erroneous entry from pkg/cloudprovider/providers/openstack/MAINTAINERS.md

- fixed typo in Short: field of the cobra command

- rebased

- Creating a new factory in the ResourcesWithPodSpecs() so that the testing will pass

- changing ResourcesWithPodSpecs, it doesn't need to be a method of factory
2016-10-14 08:35:32 -04:00
..
config Merge string flag into util flag 2016-10-11 23:28:59 -04:00
rollout update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
set Add 'kubectl set limit' 2016-10-14 08:35:32 -04:00
templates update kubectl help output for better organization 2016-08-20 08:03:39 +08:00
util Add 'kubectl set limit' 2016-10-14 08:35:32 -04:00
annotate_test.go Merge pull request #34199 from asalkeld/annotate-label 2016-10-07 23:58:54 -07:00
annotate.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
apiversions.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
apply_test.go Merge pull request #31235 from ping035627/ping035627-patch-0823-1 2016-09-26 18:02:49 -07:00
apply.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
attach_test.go remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
attach.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
autoscale.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
clusterinfo_dump_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
clusterinfo_dump.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
clusterinfo.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
cmd_test.go add fake factories for test 2016-10-13 20:57:14 +08:00
cmd.go Assign options.Err in "set image" 2016-10-14 11:17:03 +10:00
completion.go Merge pull request #32142 from juanvallejo/jvallejo_bugfix/remove-compinit-call-zsh-completions 2016-10-13 16:33:09 -07:00
convert.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_configmap_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
create_configmap.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_deployment_test.go Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
create_deployment.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_namespace_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
create_namespace.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_quota_test.go Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
create_quota.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_secret_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
create_secret.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_service_test.go Add "create service" sub-commands 2016-08-08 12:31:21 +10:00
create_service.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_serviceaccount_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
create_serviceaccount.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
create_test.go Make kubectl create use dynamic clients 2016-08-15 22:07:54 -07:00
create.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
delete_test.go remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
delete.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
describe_test.go change to stderr 2016-08-23 14:51:56 +08:00
describe.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
drain_test.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
drain.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
edit.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
exec_test.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
exec.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
explain.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
expose_test.go update PrintSuccess message when using --dry-run 2016-09-15 10:11:21 -04:00
expose.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
get_test.go remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
get.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
help.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
label_test.go Merge pull request #34199 from asalkeld/annotate-label 2016-10-07 23:58:54 -07:00
label.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
logs_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
logs.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
options.go update kubectl help output for better organization 2016-08-20 08:03:39 +08:00
patch_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
patch.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
portforward_test.go remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
portforward.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
proxy.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
replace_test.go Add namespace error checking if a resource is not found. 2016-09-14 06:51:36 -07:00
replace.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
rollingupdate_test.go Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
rollingupdate.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
run_test.go remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
run.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
scale.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
stop.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
taint_test.go Rectify kubectl error output 2016-08-20 15:58:10 +02:00
taint.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
top_node_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
top_node.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
top_pod_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
top_pod.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
top_test.go convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
top.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
version.go update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00