kubernetes/pkg/kubectl/cmd/set
Kubernetes Submit Queue fac05d9c81 Merge pull request #36174 from JacobTanenbaum/v2resource_fixes
Automatic merge from submit-queue

V2resource fixes

when using kubectl set resources it resets all resource fields that are not being set.

for example
$ kubectl set resources deployments nginx --limits=cpu=100m

followed by

$ kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

you must specify an update to requests or limits or (in the form of --requests/--limits)

corrected to

you must specify an update to requests or limits (in the form of --requests/--limits)

Implemented both the dry run and local flags.

Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112

The original PR associated with these fixes where reverted due to causing a flake in hack/make-rules/test-cmd.sh, I gave the 'kubectl set resources' tests there own deployment and set the terminationGracePeriodSeconds to 0 and have run test-cmd.sh for hours without hitting the flake
2016-11-15 21:03:06 -08:00
..
BUILD move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
helper.go support patch list of primitives 2016-11-09 11:46:59 -08:00
set_image_test.go move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
set_image.go support patch list of primitives 2016-11-09 11:46:59 -08:00
set_resources.go Merge pull request #36174 from JacobTanenbaum/v2resource_fixes 2016-11-15 21:03:06 -08:00
set.go update default run function for sub-commands 2016-10-31 10:08:12 -04:00