Commit Graph

269 Commits

Author SHA1 Message Date
Angus Salkeld
17a711d8fd Add new command "kubectl set selector" 2016-12-21 12:30:56 +01:00
deads2k
9b507e8603 prevent negotation on connections that dont' require it 2016-12-16 16:26:55 -05:00
deads2k
50f6733800 make kubectl factory rings 2016-12-15 15:18:16 -05:00
Jordan Liggitt
12806be2bf
Fix tests using internal types for generic printing 2016-12-09 16:26:05 -05:00
Michal Fojtik
737b32772e add ResolveImage function to CLI factory 2016-12-09 12:41:38 +01:00
deads2k
b658552947 remove validation dependency on version negotiation 2016-12-07 13:23:20 -05:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Michail Kargakis
065b652961 kubectl: add create pdb subcommand 2016-12-02 18:42:25 +01:00
Kubernetes Submit Queue
74066816b6 Merge pull request #37098 from deads2k/cli-12-create-cbinding
Automatic merge from submit-queue

add create clusterrolebinding command

Adds `kubectl create clusterrolebinding`.

@kubernetes/sig-cli
2016-12-02 08:44:58 -08:00
Kubernetes Submit Queue
bbd447f555 Merge pull request #34789 from AdoHe/external_service
Automatic merge from submit-queue

create service add create ExternalName service implementation

@kubernetes/kubectl create service add ExternalName support, refer #34731 for more detail.

```release-note
kubectl create service externalname
```
2016-12-02 07:29:06 -08:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu
96cd71d8f6 kubectl 2016-11-23 15:53:09 -08:00
deads2k
e300f01a1b add create clusterrolebinding command 2016-11-21 08:50:06 -05:00
deads2k
66e5c38d67 remove TPR registration, ease validation requirements 2016-11-16 14:04:35 -05:00
AdoHe
d66bcbfa61 create service add create ExternalName service implementation 2016-11-16 04:47:10 -05:00
Maciej Szulik
0b5ef16008 Support ScheduledJob name 2016-11-07 10:14:12 +01:00
Maciej Szulik
41d88d30dd Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
Dr. Stefan Schimanski
14ce6f6065 Add caching for discovery info 2016-11-04 21:17:12 +01:00
deads2k
61673c4b39 make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
deads2k
7fe9bd4c30 make kubectl delete generic 2016-11-04 07:50:31 -04:00
Madhusudan.C.S
1712a190cb [Federation][(Un)join-00] Implement federation/cluster resource generator. 2016-11-01 00:58:54 -07:00
Michal Fojtik
0faa27e62d Use PATCH when pausing/resuming objects and CalculatePatches to get the patch 2016-10-31 13:13:59 +01:00
Kubernetes Submit Queue
5f8dc216d1 Merge pull request #35427 from fabianofranz/issues_35426
Automatic merge from submit-queue

kubectl commands must not use the factory out of Run

Fixes https://github.com/kubernetes/kubernetes/issues/35426

@smarterclayton PTAL
2016-10-30 03:17:59 -07:00
Chao Xu
850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Janet Kuo
10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Fabiano Franz
60fc7b87be kubectl commands must not use the factory out of Run 2016-10-27 15:38:22 -02:00
Kubernetes Submit Queue
2de1f5c07e Merge pull request #34407 from brendandburns/kubectl-schema
Automatic merge from submit-queue

Add validation that detects repeated keys in the labels and annotations maps

Fixes #2965  (a nearly 2 year old feature request!)

@kubernetes/kubectl 

@eparis
2016-10-19 14:01:00 -07:00
deads2k
ea1eefa7ff glog non-fatal, usually unimportant error instead of fmt 2016-10-18 07:58:20 -04:00
Kubernetes Submit Queue
db80dd3339 Merge pull request #34854 from deads2k/cli-02-restmaper
Automatic merge from submit-queue

attempt to use discovery RESTMapper and fallback if we can't

Updates `kubectl` to always attempt discovery regardless of server version.  This is needed to extension servers.
2016-10-15 13:46:40 -07:00
deads2k
abf2c43ad7 attempt to use discovery RESTMapper and fallback if we can't 2016-10-14 16:06:31 -04:00
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
Brendan Burns
d9d06f6680 Add some checking for the presence of the same key twice. 2016-10-13 21:58:44 -07:00
AdoHe
593d8e0d7c refactor Factory make it interface 2016-10-13 20:57:14 +08:00
Ilya Dmitrichenko
abc0a98d25
Replace references to http://releases.k8s.io/HEAD/docs/user-guide/ 2016-10-02 11:44:40 +01:00
Kubernetes Submit Queue
b95fa62fe1 Merge pull request #31163 from juanvallejo/jvallejo_filter-resources-before-printing
Automatic merge from submit-queue

add resource filter handling before printing

**Release note**:
```release-note
release-note-none
```

Resources are currently filtered (in order to prevent printing) at print
time in their HumanReadablePrinter handlers. This design makes it not
possible to filter objects when they are printed using any other
printer, such as YAML, JSON, or the NamePrinter.

This patch removes any filters previously added at the printer level for
pods and adds a way to define resource-specific filters before they are
sent to a printer handler. A woking filter handler for pods has also been
implemented.

Filters affect resources being printed through the HumanReadablePrinter,
YAML, JSON, and `--template` printers.

cc @smarterclayton
2016-09-23 10:45:57 -07:00
juanvallejo
7000e2cf4f
add resource handling before printing
Resources are currently filtered (in order to prevent printing) at print
time in their HumanReadablePrinter handlers. This design makes it not
possible to filter objects when they are printed using any other
printer, such as YAML, JSON, or the NamePrinter.

This patch removes any filters previously added at the printer level for
pods and adds a way to define resource-specific filters before they are
sent to a printer handler. A woking filter handler for pods has also
been
implemented.

Filters affect resources being printed through the HumanReadablePrinter,
YAML, JSON, and `--template` printers.
2016-09-21 10:03:59 -04:00
deads2k
e9c1b87b80 move extensions registry packages 2016-09-21 09:14:38 -04:00
Kubernetes Submit Queue
313ef63993 Merge pull request #32680 from sttts/sttts-gracefully-kubectl-without-version
Automatic merge from submit-queue

Behave gracefully in kubectl if /version returns 404

Fixes https://github.com/kubernetes/kubernetes/issues/32679. 

It's only about caching the swagger spec here. So it's safe to fall back to non-caching mode and continue.
2016-09-21 04:59:16 -07:00
Clayton Coleman
07f079216e
Make clientcmd defaulting a function of ConfigOverrides and LoadingRules
This commit moves away from using a global variable for default
configuration checking, and instead exposes a method on LoadingRules to
determine whether a particular restclient.Config should be considered
"default". This allows kubectl to provide its own defaults (the same
as before, KUBERNETES_MASTER and the static localhost:8080 values) while
allowing other clients to avoid defining them.

In-cluster config defaulting is now easier to read.
2016-09-21 01:28:06 -04:00
Kubernetes Submit Queue
c97246247a Merge pull request #30199 from dims/re-add-roadmap-extend-all
Automatic merge from submit-queue

Extend all to more resources

Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-20 01:49:45 -07:00
Kubernetes Submit Queue
8d0518d4d2 Merge pull request #32897 from deads2k/api-07-remove-dead-mapper
Automatic merge from submit-queue

remove dead mapper

Removing a write-only field I found looking at the registration code.
2016-09-19 23:12:06 -07:00
Davanum Srinivas
e1373cf516 Extend all to more resources
Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-19 13:01:59 -04:00
deads2k
4aa61ddcb2 remove dead mapper 2016-09-19 09:57:19 -04:00
deads2k
862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
deads2k
771915c6c4 make shortcut expanding restmapper handle all 2016-09-15 11:03:51 -04:00
deads2k
4359c79f53 add FirstHitRESTMapper for adding thirdparty resources 2016-09-15 10:26:39 -04:00
deads2k
500cddc5c3 use discovery restmapper for kubectl 2016-09-15 10:26:39 -04:00
Dr. Stefan Schimanski
54f5a9b423 Disable swagger spec caching without /version 2016-09-14 18:44:46 +02:00
deads2k
519c13745f convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00