Commit Graph

2063 Commits (2d6c632de2f9ac15005c188913f779a81b392c81)

Author SHA1 Message Date
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
k8s-merge-robot f5e1e9a227 Merge pull request #24912 from bprashanth/petset_controller
Automatic merge from submit-queue

Petset controller

Took longer than I expected. Main parts of this pr are:
1. Identity generation based on petset spec (volumes are mapped per discussion in #18016)
2. Ensure that we create/delete pets in sequence
3. Ensuring that we create, wait for healthy, create; or delete, wait for terminationGrace, delete
4. Controller that watches apiserver and drives actual -> desired

PVCs are not deleted, yet.
2016-05-05 08:58:23 -07:00
Prashanth Balasubramanian 6bc3052551 PetSet alpha controller 2016-05-04 18:39:17 -07:00
Janet Kuo 181627e36c kubectl suggest for get (list, ps), and delete(rm) 2016-05-04 17:18:52 -07:00
k8s-merge-robot 53ea2cb444 Merge pull request #25074 from AdoHe/remove_container_args
Automatic merge from submit-queue

update kubectl apply help info

Please refer #22342 for more detail. @bgrant0607 ptal. Also I have open a PR to update docs on `kuberntes.github.io`
2016-05-04 14:44:14 -07:00
derekwaynecarr 25ed62c3ea Fix kubectl create secret/configmap to allow = values 2016-05-04 17:14:12 -04:00
k8s-merge-robot 93e3df8e55 Merge pull request #24789 from wojtek-t/use_proper_codec_in_client
Automatic merge from submit-queue

Use proper codec in client
2016-05-04 11:00:04 -07:00
k8s-merge-robot 1642083e60 Merge pull request #24645 from jlowdermilk/rolling-update
Automatic merge from submit-queue

kubectl rolling-update support for same image

Fixes #23497.

Enables `kubectl rolling-update --image` to the same image, adding a `--image-pull-policy` flag to remove ambiguity. This allows rolling-update to behave as an "update and/or restart" (https://github.com/kubernetes/kubernetes/issues/23497#issuecomment-212349730), or as a forced update when the same tag can mean multiple versions (e.g. `:latest`). cc @janetkuo @nikhiljindal
2016-05-04 07:24:22 -07:00
Wojciech Tyczynski 3aadafd411 Use NegotiatedSerializer in client 2016-05-04 10:57:36 +02:00
Marcin Wielgus 60f1339138 Small refactoring around drain - move drain logic to separate function. 2016-05-04 10:43:20 +02:00
AdoHe 036ac359d1 update kubectl apply help info 2016-05-03 22:50:24 -04:00
AdoHe ba69f0f367 mark container-port flag as deprecated 2016-05-03 20:36:42 -04:00
k8s-merge-robot c66250dd0d Merge pull request #24548 from pwittrock/kubectl
Automatic merge from submit-queue

Delete unused helpers
2016-05-03 11:26:25 -07:00
zhouhaibing089 09d4d5ed78 let type struct,array,slice also being considerred when sorting kubectl output 2016-05-02 23:17:18 +08:00
k8s-merge-robot f500194d92 Merge pull request #23673 from metral/multiple-resources
Automatic merge from submit-queue

allow kubectl subcmds to process multiple resources

~~autoscale, expose & patch~~ Many kubectl subcommands were limited to processing one resource at a time.

This PR allows those subcommands to process multiple resources.

This PR is in reference to https://github.com/kubernetes/kubernetes/pull/23116#issuecomment-202360784 by @deads2k
2016-05-02 07:09:44 -07:00
Michail Kargakis a25088fe15 kubectl: more sophisticated pod selection for logs and attach 2016-05-02 15:56:36 +02:00
Michail Kargakis dbc1e356d3 kubectl: remove dead factory code 2016-05-02 11:03:44 +02:00
Mike Metral 999c8e211e allow kubectl subcmds to process multiple resources
- use resource.Visit() to recursively process resources, as well as, aggregate
errors where possible
2016-05-01 20:27:37 -07:00
k8s-merge-robot b930d58fcb Merge pull request #24994 from pmorie/kubectl-configmap
Automatic merge from submit-queue

Fix `kubectl create configmap` help

Resurrection of #23290

cc @bgrant0607 @janetkuo @ncdc
2016-04-29 23:09:42 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Andy Goldstein 8858d20044 Fix `kubectl create configmap` help
Remove "generic" from the help text, as that was an inadvertent carry-over from `kubectl create
secret generic`.
2016-04-29 16:31:24 -04:00
k8s-merge-robot 2b7021add0 Merge pull request #17030 from csrwng/pf_cmd_streams
Automatic merge from submit-queue

Port-forward: use out and error streams instead of glog

Switches use of glog with command out and error streams
2016-04-29 09:27:47 -07:00
AdoHe 6958db9c16 fix config view output bug 2016-04-28 23:04:57 -04:00
Slava Semushin e83200d322 printLabelsMultilineWithIndent: add more customizable method. 2016-04-28 18:37:41 +02:00
Slava Semushin 72b4b54f28 kubectl describe: show multiple labels/annotations on multiple lines.
When there is more than one label/annotation, it's more readable to see
them on the different lines.
2016-04-28 18:37:41 +02:00
Michail Kargakis 29ff69fd83 kubectl: avoid panic with nil gvk
The decoder will return a nil gvk in case it errors out and getting
the version out of that gvk naturally will panic. Bail out as soon
as we can check that the error is non-nil. kubectl edit was the primary
victim.
2016-04-28 11:14:15 +02:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -07:00
k8s-merge-robot ae5065a2c2 Merge pull request #24365 from janetkuo/remove-t-for-tty
Automatic merge from submit-queue

Add flag -t as shorthand for --tty

`-t` was deprecated in #12813 (Aug. 2015, about 6+ months ago). 

Now remove `--template`'s shorthand `-t` and create a shorthand `-t` for `--tty` in `kubectl run`. 

@kubernetes/kubectl
2016-04-28 00:23:11 -07:00
Cesar Wong 55114efcb7 Port-forward: use out and error streams instead of glog 2016-04-27 13:26:54 -04:00
Marcin Wielgus 41dde20410 Make DrainOptions.getPodsForDeletion public to be reused in ClusterAutoscaler 2016-04-27 11:47:34 +02:00
k8s-merge-robot 373a3ece84 Merge pull request #24475 from k82/k8s-24411
Automatic merge from submit-queue

Clarify `kubectl get service` output.

Pull request for #24411 .
2016-04-26 13:45:09 -07:00
k8s-merge-robot 96586e7c60 Merge pull request #23958 from petervo/byte-args
Automatic merge from submit-queue

kubectl: Allow []byte config fields to be set by the cli

Allows []byte config fields such as 'certificate-authority-data' to be set using `kubectl config set` commands.
2016-04-26 10:23:07 -07:00
Jeff Lowdermilk 1baa473ef2 kubectl rolling-update support for same image 2016-04-25 09:20:15 -07:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
petervo 4f9d3ace5d kubectl: Allow []byte config fields to be set by the cli
Allows []byte config fields such as 'certificate-authority-data'
to be set using `kubectl config set` commands.
2016-04-22 15:53:24 -07:00
Klaus Ma b6d2c2b295 Clarify kubectl output. 2016-04-21 15:35:32 +08:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
Phillip Wittrock 1a3b133077 Delete unused helpers 2016-04-20 13:49:59 -07:00
k8s-merge-robot ebe4ce160e Merge pull request #24366 from janetkuo/kubectl-run-session-hint
Automatic merge from submit-queue

Fix session ended hint for kubectl run

Fixes #23602

Before:
```console
$ kubectl run -i --tty busybox --image=busybox 
Waiting for pod default/busybox-3797442026-mt8zk to be running, status is Pending, pod ready: false
Hit enter for command prompt
/ # 
/ # exit
Session ended, resume using ' busybox-3797442026-mt8zk -c busybox -i -t' command when the pod is running
                             ↑
                      (incomplete command)
```

After:
```console
Session ended, resume using 'kubectl attach busybox-3797442026-mt8zk -c busybox -i -t' command when the pod is running
```

@kubernetes/kubectl
2016-04-20 00:30:23 -07:00
Michail Kargakis cf7671d2c4 kubectl: use platform-agnostic helper in edit
https://github.com/kubernetes/kubernetes/issues/22371 still stands for
Windows clients since path.Base is not platform-agnostic[1].

Use filepath.Base instead[2].

[1] https://golang.org/src/path/path.go?s=4482:4511#L166
[2] https://golang.org/src/path/filepath/path.go?s=12257:12286#L409
2016-04-18 11:51:05 +02:00
k8s-merge-robot bfc953cd4b Merge pull request #23890 from pmorie/kubectl-describe-envs
Automatic merge from submit-queue

Correctly handle secret and configMap envs in kubectl describe

Fixes #23679 

cc @kubernetes/kubectl @jwforres
2016-04-16 17:08:58 -07:00
k8s-merge-robot fe6a7a2c7d Merge pull request #23689 from maclof/drain-replicaset-pods
Automatic merge from submit-queue

Drain pods created from ReplicaSets

Refer to my issue here: https://github.com/kubernetes/kubernetes/issues/23531
2016-04-16 00:37:41 -07:00
Janet Kuo fe4b16c8aa Fix session ended hint for kubectl run 2016-04-15 17:28:03 -07:00
Janet Kuo aa2ac9b1d1 -t shorthand for --tty instead of --template 2016-04-15 17:12:42 -07:00
k8s-merge-robot ed87db5040 Merge pull request #23437 from DirectXMan12/bug/cannot-edit-across-gv
Automatic merge from submit-queue

Make kubectl edit not convert GV on edits

Previously, kubectl edit was using a decoder to load in edits that
converted to the internal version.  It would then re-encode this
decoded value to produce a patch.  However, if you were editing
in the object in a GroupVersion that was not the internal version,
this would cause the kubectl edit command to attempt to produce
a patch which changed the GroupVersion, which would fail.

Now, we use a plain deserializer instead, so no conversion or
defaulting occurs when loading in the edited file.

Ref #23378
2016-04-15 16:32:17 -07:00
k8s-merge-robot 03f48e730e Merge pull request #22810 from amygdala/cassandra2
Automatic merge from submit-queue

phase 2 of cassandra example overhaul

Here's the next iteration in overhauling this example, towards https://github.com/kubernetes/kubernetes/issues/20961.  This removes the pod adoption part, but doesn't (yet) otherwise change any of the resources used.

It also includes some README cleanup, and removes some explicit specification of labels in the rc yaml.

This PR doesn't yet add any commentary on how we're using the seed provider (re: https://github.com/kubernetes/kubernetes/issues/20961#issuecomment-190405959 etc.).  Maybe we should add that.

Also: LMK if this PR should include any changes to the links out to the docs.

cc @bgrant0607 @johndmulhausen
2016-04-15 15:41:01 -07:00
Marc Lough fdf409861a Drain pods created from ReplicaSets 2016-04-15 08:51:40 +01:00
Amy Unruh 8846b313dc phase 2 of cassandra example overhaul 2016-04-14 21:55:23 -07:00
Daniel Smith bbe5299371 Merge pull request #23798 from nak3/bash-completion
Bash completion updates
2016-04-14 16:59:48 -07:00
Daniel Smith a42d7fa31c Merge pull request #23756 from smarterclayton/force_delete
Add a client flag to delete "--now" for grace period 0
2016-04-14 16:55:07 -07:00
Kenjiro Nakayama c9d34870ed Update bashcompletion codes for kubectl expose 2016-04-14 23:43:48 +09:00
Kenjiro Nakayama 84e3ee8ec4 Update bashcompletion codes for kubectl annotate 2016-04-14 23:40:34 +09:00
Kenjiro Nakayama 910b6bce33 Update bashcompletion codes for kubectl patch 2016-04-14 23:40:31 +09:00
Kenjiro Nakayama 5cc540fec1 Update bashcompletion codes for kubectl edit 2016-04-14 23:34:58 +09:00
k8s-merge-robot e121b562c5 Merge pull request #23262 from sttts/sttts-bash-completion-flag-equal
Automatic merge from submit-queue

Make kubectl bash-completion namespace and resource alias aware

![kubectl-completion](https://cloud.githubusercontent.com/assets/730123/13912456/94abf9a2-ef3d-11e5-9c8a-3df7058ea8f0.gif)

- filter resource listing by `--namespace` flag given before in the command line
```bash
$ kubectl get pod --namespace=kube-system <tab><tab>
kube-dns-v9-2wuzj   kube-dns-v9-llqxa
```
- add completion of `--namespace`
```bash
$ kubectl get pod --namespace=<tab><tab>
[*]         default      ingress      kube-system
```

- add support for plural nouns and aliases like `rc`
2016-04-14 04:26:40 -07:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
k8s-merge-robot acf9492cb1 Merge pull request #23660 from goltermann/vetclean
Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
2016-04-12 06:22:16 -07:00
Clayton Coleman ea3467f822 Add a client flag for --now delete
Is equivalent to --grace-period=0 but is more intuitive for end users.
2016-04-07 23:45:08 -04:00
Paul Morie 9069cbb086 Correctly handle secret and configMap envs in kubectl describe 2016-04-07 14:16:59 -04:00
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Janet Kuo 0335f1c2cd Revert "rolling update will check whether the image is distinct or not, however the image with tag latest should be excluded"
This reverts commit d27a30df29.
2016-04-04 18:36:02 -07:00
Dr. Stefan Schimanski 7e0bb885f1 Make kubectl bash completion namespace aware and add noun aliases
- add namespace filtering to bash completion
- add --namespace flag bash completion
- add bash completion noun aliases
- adapt to new cobra package structure
2016-04-03 16:25:56 +02:00
k8s-merge-robot f5c93c8ddc Merge pull request #23472 from wojtek-t/fix_object_meta_for
Automatic merge from submit-queue

Switch from api.ObjectMetaFor to meta.Accessor in most of places

Fix #23278

@smarterclayton @lavalamp
2016-04-02 02:33:40 -07:00
k8s-merge-robot c927790cc6 Merge pull request #22877 from fabianofranz/mark_filename_flags_for_completions
Automatic merge from submit-queue

Mark filename flags for completions

Adds filename bash completion to some flags that were missing.
2016-04-01 22:38:54 -07:00
k8s-merge-robot 3b65927050 Merge pull request #16451 from ncdc/exec-interop-testing
Automatic merge from submit-queue

Refactor streaming code to support interop testing

Refactor exec/attach/port forward client and server code to better
support interop testing of different client and server subprotocol
versions.

Fixes #16119
2016-04-01 17:11:26 -07:00
Fabiano Franz 9ddacfa25f Mark filename flags for completions 2016-04-01 16:14:36 -03:00
Andy Goldstein 4551ba6b53 Refactor exec code to support version skew testing
Refactor exec/attach client and server code to better support interoperability testing of different
client and server subprotocol versions.
2016-04-01 13:05:50 -04:00
k8s-merge-robot 07929972a3 Merge pull request #18835 from brendandburns/3rdparty
Automatic merge from submit-queue

Add support for 3rd party objects to kubectl

@deads2k @jlowdermilk

Instructions for playing around with this:

Run an apiserver with third party resources turned on (`--runtime-config=extensions/v1beta1=true,extensions/v1beta1/thirdpartyresources=true`)

Then you should be able to:

```
kubectl create -f rsrc.json
```

```json
{
  "metadata": {
    "name": "foo.company.com"
  },
  "apiVersion": "extensions/v1beta1",
  "kind": "ThirdPartyResource",
  "versions": [
    {
      "apiGroup": "group",
      "name": "v1"
    },
    {
      "apiGroup": "group",
      "name": "v2"
    }
  ]
}
```

Once that is done, you should be able to:

```
curl http://<server>/apis/company.com/v1/foos
```

```
curl -X POST -d @${HOME}/foo.json http://localhost:8080/apis/company.com/v1/namespaces/default/foos
```

```json
{
  "kind": "Foo",
  "apiVersion": "company.com/v1",
  "metadata": {
    "name": "baz"
  },
  "someField": "hello world",
  "otherField": 1
}
```

After this PR, you can do:

```
kubectl create -f foo.json
```

```
kubectl get foos
```

etc.
2016-03-31 18:09:56 -07:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Wojciech Tyczynski 2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
Janet Kuo c1596e6711 Update guestbook examples; replace RC concepts with Deployment 2016-03-30 14:16:52 -07:00
k8s-merge-robot f36c44be79 Merge pull request #23279 from kargakis/export-volume-describer
Automatic merge from submit-queue

kubectl: enhance podtemplate describer

@kubernetes/kubectl 

@smarterclayton for the dc decsriber
2016-03-30 12:53:52 -07:00
k8s-merge-robot 9b6e4aa9b4 Merge pull request #23116 from metral/recursive-visit
Automatic merge from submit-queue

allow kubectl cmds to process files recursively, when given a dir

This PR accomplishes two things:

1. It creates a `--recursive` flag for use with certain `kubectl` commands that _currently_ do not process files beyond their first level of children, as seen in the issue https://github.com/kubernetes/kubernetes/issues/19767
2. It enables the ability to use the `--recursive` flag in the `kubectl` commands that currently _only_ support processing a directory up to its first level of children.
2016-03-30 05:07:47 -07:00
k8s-merge-robot fb5181a596 Merge pull request #23500 from tam7t/tls-sni-routing
Auto commit by PR queue bot
2016-03-29 07:16:22 -07:00
Tommy Murphy 4d22c2fd6a IngressTLS: allow secretName to be blank for SNI routing 2016-03-28 21:25:54 -04:00
Dawn Chen c47f74a470 Merge pull request #23348 from pwittrock/docs
Update docs to reflect `kubectl run` creates deployments by default i…
2016-03-28 17:03:47 -07:00
Phillip Wittrock 4d2f3c1c17 Update docs to reflect `kubectl run` creates deployments by default instead of replicatino controllers. 2016-03-28 16:25:02 -07:00
Mike Metral 7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
k8s-merge-robot e01feae75a Merge pull request #23453 from luxas/kubectl_sa_shorthand
Auto commit by PR queue bot
2016-03-28 07:29:57 -07:00
k8s-merge-robot 9a5b4658cb Merge pull request #23516 from zhouhaibing089/imagecheck_fix
Auto commit by PR queue bot
2016-03-26 23:15:58 -07:00
zhouhaibing089 d27a30df29 rolling update will check whether the image is distinct or not, however the image with tag latest should be excluded 2016-03-26 10:56:52 +08:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Lucas Käldström 3507bf814f Add sa as a shorthand for serviceaccounts 2016-03-25 23:28:52 +02:00
Michail Kargakis 8477699055 kubectl: enhance podtemplate describer 2016-03-25 19:56:23 +01:00
k8s-merge-robot b8e390a0f3 Merge pull request #22824 from brendandburns/enable
Auto commit by PR queue bot
2016-03-24 22:26:39 -07:00
k8s-merge-robot 4e4ad61260 Merge pull request #23366 from goltermann/vet
Auto commit by PR queue bot
2016-03-24 21:50:56 -07:00
Solly Ross bc4143092c Make kubectl edit not convert GV on edits
Previously, kubectl edit was using a decoder to load in edits that
converted to the internal version.  It would then re-encode this
decoded value to produce a patch.  However, if you were editing
in the object in a GroupVersion that was not the internal version,
this would cause the kubectl edit command to attempt to produce
a patch which changed the GroupVersion, which would fail.

Now, we use a plain deserializer instead, so no conversion or
defaulting occurs when loading in the edited file.

Fixes #23378
2016-03-24 15:15:19 -04:00
k8s-merge-robot 76369c42be Merge pull request #22939 from resouer/util-sub-dir
Auto commit by PR queue bot
2016-03-23 03:34:33 -07:00
k8s-merge-robot 4af38b52b9 Merge pull request #22736 from resouer/fix-util-dev
Auto commit by PR queue bot
2016-03-22 19:54:58 -07:00
k8s-merge-robot 2f89867821 Merge pull request #23305 from janetkuo/update-kubectl-help
Auto commit by PR queue bot
2016-03-22 19:17:45 -07:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
Brendan Burns 87a1635c93 Machine generated stuff 2016-03-22 14:41:37 -07:00
k8s-merge-robot 9dfbcae449 Merge pull request #22634 from kargakis/kubectl-edit-error-log-fix
Auto commit by PR queue bot
2016-03-22 14:37:55 -07:00
Janet Kuo e93b855242 Update kubectl help for 1.2 resources 2016-03-22 14:14:35 -07:00
Clayton Coleman 0a274a85d1 Allow logs to be used with a preloaded pod. 2016-03-21 23:59:59 -04:00
Clayton Coleman 3a29e3971b Improve terminal reuse and attach
Currently attach and the editor do not share the same logic for saving
and restoring the terminal, and are not suitable for nesting (when the
caller wants to create something, attach, and then delete something when
the attach is over).  This commit moves the interrupt protection logic
to a util package and supports nesting interrupt handlers.
2016-03-21 23:59:58 -04:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Harry Zhang 7178fba251 Move crlf.go to sub pkg 2016-03-21 20:20:05 +08:00
harry bc422f077a Refactor bool_flag into sub pkg 2016-03-21 14:50:57 +08:00
k8s-merge-robot b56252e338 Merge pull request #23161 from thockin/drain-help-typo
Auto commit by PR queue bot
2016-03-19 22:44:54 -07:00
Tim Hockin 1e5ce735fc Fix typo in help for kubectl drain 2016-03-19 20:42:51 -07:00
AdoHe 57534eaec9 update expose command description to add deployment 2016-03-19 13:51:21 -04:00
Madhusudan.C.S 67b70d7c89 Add a Deployment example for kubectl expose. 2016-03-18 17:05:49 -07:00
Wojciech Tyczynski 89585237cd Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding. 2016-03-18 12:35:27 +01:00
k8s-merge-robot 4e67d9606c Merge pull request #23083 from janetkuo/rollout-undo-paused-check
Auto commit by PR queue bot
2016-03-17 06:28:39 -07:00
k8s-merge-robot 53c6b35b71 Merge pull request #23038 from wojtek-t/rename_raw_json_to_raw
Auto commit by PR queue bot
2016-03-17 04:05:43 -07:00
Janet Kuo 2bd30c7572 Stop the users from rolling back a paused deployment in kubectl rollout undo 2016-03-16 15:46:22 -07:00
k8s-merge-robot 41c85d1113 Merge pull request #22999 from smarterclayton/better_auth_error
Auto commit by PR queue bot
2016-03-16 09:59:20 -07:00
Wojciech Tyczynski 218d3e5923 Rename RawJSON to Raw in runtime.Unknown and add ContentType & ContentEncoding. 2016-03-16 16:43:58 +01:00
Clayton Coleman dccf114fdd Display a better error on unauthorized
Not being logged in is a common user error, and the message we display
can be more specific to an end user. Provide a friendly message with the
server message in parethesis (in case this is a more complex server
error).
2016-03-15 12:51:23 -04:00
Michail Kargakis 23343425b8 kubectl: print errors that wont be reloaded in the editor 2016-03-15 15:01:28 +01:00
Kris 4d404ded1a Moving adapters to their own packages 2016-03-14 14:22:34 -07:00
harry f19d59cf35 Move flag into sub pkg 2016-03-14 21:30:38 +08:00
Jordan Liggitt 5e68cec23c Test relative timestamps using UTC 2016-03-13 20:46:59 -04:00
Jordan Liggitt d008283942 Tolerate multiple registered versions in a single group 2016-03-12 12:49:41 -05:00
Brian Grant b7984b2fa7 Merge pull request #22862 from jlowdermilk/typo
fix typo in kubectl run help string
2016-03-11 12:26:48 -08:00
nikhiljindal 593b78f925 Deprecating --api-version flag 2016-03-11 10:12:44 -08:00
Jeff Lowdermilk 627615c870 fix typo in kubectl run help string 2016-03-11 10:11:14 -08:00
Brian Grant 5cc7790f45 Merge pull request #22853 from deads2k/parse-version
allow resource.version.group in kubectl
2016-03-11 10:11:00 -08:00
Brian Grant 1c50f1831c Merge pull request #22849 from soltysh/issue22836
Added api discovery to kubectl run, based on which we decide which generators to use
2016-03-11 09:04:12 -08:00
Maciej Szulik f27871e60d Added api discovery to kubectl run, based on which we decide which generators to use 2016-03-11 16:59:14 +01:00
deads2k 5bd161a9cc allow resource.version.group in kubectl 2016-03-11 10:21:50 -05:00
Brian Grant e5748a44d6 Merge pull request #22840 from liggitt/preferred-gvk
Prefer fetched version when determining HPA group version kind
2016-03-11 00:41:39 -08:00
Brian Grant 5bd45d26ac Merge pull request #22772 from AdoHe/kubectl_update_wide
update wide option output
2016-03-10 23:19:02 -08:00
AdoHe 9788101e11 update wide option output 2016-03-11 00:29:37 -05:00
Jordan Liggitt 560b02b3ec Prefer fetched version when determining HPA group version kind 2016-03-11 00:03:38 -05:00
Madhusudan.C.S dfc62b56cc Enable kubectl autoscale for replica sets.
Also add some tests for it.
2016-03-10 15:05:54 -08:00
k8s-merge-robot 5b00059fd2 Merge pull request #22762 from soltysh/job_run
Auto commit by PR queue bot
2016-03-10 13:22:29 -08:00
Maciej Szulik de83631768 Added job/v1 generator to kubectl run 2016-03-10 19:56:57 +01:00
Madhusudan.C.S db48dcf583 ReplicaSetSpec.Template shouldn't be a pointer.
PodTemplateSpec should be consistent for all the types in extensions/v1beta1.

See PR #19510.
2016-03-09 21:24:16 -08:00
k8s-merge-robot f046d6c83e Merge pull request #22420 from AdoHe/kubectl_swagger_cache
Auto commit by PR queue bot
2016-03-07 15:18:56 -08:00
k8s-merge-robot 492c5d68fb Merge pull request #21694 from aveshagarwal/master-sort-by-versioned
Auto commit by PR queue bot
2016-03-07 08:09:55 -08:00
Michail Kargakis 77097d9a20 kubectl: set maxUnavailable to 1 if both fenceposts resolve to zero
Due to rounding down for maxUnavailable, we may end up with rolling updates
that have zero surge and unavailable pods something that 1) is not allowed
as per validation, 2) blocks updates. If we end up in such a situation
set maxUnavailable to 1 on the theory that surge might not work due to
quota.
2016-03-07 13:03:41 +01:00
k8s-merge-robot 95ab1936ea Merge pull request #22559 from krousey/discbreak
Auto commit by PR queue bot
2016-03-06 12:47:07 -08:00
k8s-merge-robot f31647ec38 Merge pull request #22556 from sjenning/add-configmap-kubectl-usage
Auto commit by PR queue bot
2016-03-05 20:04:29 -08:00
Seth Jennings 4ca54b0c9c add configmap to kubectl subcommand list 2016-03-05 20:20:00 -06:00
k8s-merge-robot 2e03822386 Merge pull request #21335 from deads2k/make-rc-logs-work
Auto commit by PR queue bot
2016-03-05 09:37:24 -08:00
k8s-merge-robot b198c820cd Merge pull request #22402 from erictune/psp-simplify
Auto commit by PR queue bot
2016-03-05 07:55:19 -08:00
AdoHe 893e36c61d fix kubectl swagger cache bug 2016-03-04 18:59:40 -05:00
Kris dbde4fd798 Move the discovery client to its own package 2016-03-04 13:44:52 -08:00
Avesh Agarwal be06003e6b Fix kubectl sort-by metadata issue.
Internal types are not supposed to have json metadata (though in kubernetes
they do) as it is true with openshift types. That means sort-by must work
on versioned objects for sorting, otherwise it produces "error: metadata
is not found" error if it sorts internal types without json metadata.

This PR converts internal types objects to versioned objects and sort-by
sorts them correctly without medata error, and then it prints
corresponding internal objects in sorted order.
2016-03-04 16:14:45 -05:00
Abhi Shah b25a48d605 Revert "Move discovery client to its own package" 2016-03-04 09:24:54 -08:00
Abhi Shah 627edd2588 Merge pull request #22016 from krousey/discbreak
Move discovery client to its own package
2016-03-04 09:17:46 -08:00
Michail Kargakis b390087a99 kubectl: bring the rolling updater on par with the deployments
During a rolling update for Deployments, the total count of surge pods
is calculated by adding the desired number of pods (deployment.Spec.Replicas)
to maxSurge. During a kubectl rolling update, the total count of surge
pods is calculated by adding the original number of pods (oldRc.Spec.Replicas
via an annotation) to maxSurge. This commit changes this to use desired
replicas.
2016-03-04 18:07:09 +01:00
Jeff Lowdermilk afa7816c38 Merge pull request #22009 from aveshagarwal/master-create-urls-issue
Fix kubectl create to create to all resources in a url.
2016-03-03 15:21:35 -08:00
Jeff Lowdermilk 6682a6693c Merge pull request #22332 from nikhiljindal/rollingUpdate
Resetting maxUnavailable for kubectl rolling update to 0
2016-03-03 15:19:02 -08:00
Eric Tune 4d090bfb09 Rename PodSecurityPolicy fields
In podSecurityPolicy:
1. Rename .seLinuxContext to .seLinux
2. Rename .seLinux.type to .seLinux.rule
3. Rename .runAsUser.type to .runAsUser.rule
4. Rename .seLinux.SELinuxOptions

1,2,3 as suggested by thockin in #22159.
I added 3 for consistency with 2.
2016-03-03 11:49:48 -08:00
Jeff Lowdermilk 8c500a9c31 Merge pull request #22279 from soltysh/describer_none
Unifying empty/none/not set values in describer
2016-03-03 11:40:54 -08:00
deads2k f8f45df578 make kubectl logs work for replication controllers 2016-03-03 11:17:50 -05:00
k8s-merge-robot d81d823ca5 Merge pull request #22393 from eparis/blunderbuss
Auto commit by PR queue bot
2016-03-02 18:51:56 -08:00
Eric Paris 5e5a823294 Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
Janet Kuo d5953991d9 Fix kubectl edit: no such file 2016-03-02 16:05:08 -08:00
Avesh Agarwal ad6dfa0370 Fix kubectl create to create all resources in a url.
https://github.com/kubernetes/kubernetes/issues/18751 .
2016-03-02 18:08:24 -05:00
k8s-merge-robot 7f9ee58550 Merge pull request #22129 from pmorie/kubectl-describe-volumes
Auto commit by PR queue bot
2016-03-02 09:10:48 -08:00
k8s-merge-robot cc19c9fdfa Merge pull request #21671 from kargakis/add-exposed-ports-in-pod-desc
Auto commit by PR queue bot
2016-03-02 06:40:28 -08:00
Maciej Szulik 1b56d79f64 Unifying empty/none/not set values in describer 2016-03-02 13:57:39 +01:00
nikhiljindal cb8414e247 Resetting maxUnavailable for kubectl rolling update to 0 2016-03-01 18:44:59 -08:00
k8s-merge-robot 739285b146 Merge pull request #21265 from stevekuznetsov/skuznets/new-sa
Auto commit by PR queue bot
2016-03-01 01:14:06 -08:00
Kris f22664159e Move the discovery client to its own package 2016-02-29 15:37:21 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
k8s-merge-robot d1d036391a Merge pull request #22177 from AdoHe/update_commented_examples
Auto commit by PR queue bot
2016-02-29 09:18:57 -08:00
AdoHe 9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Michail Kargakis 530dbe4d01 kubectl: add container ports in pod description 2016-02-28 23:33:58 +01:00
k8s-merge-robot 13f6daf980 Merge pull request #22141 from AdoHe/kubectl_add_age_column
Auto commit by PR queue bot
2016-02-28 13:09:59 -08:00
k8s-merge-robot 5ecbf4ff4a Merge pull request #22138 from bgrant0607/bugfix1
Auto commit by PR queue bot
2016-02-28 02:00:40 -08:00
Brian Grant d0dd4f8a93 Restore expectation timeout to 5 minutes. Fix enqueueDeployment. Pass by reference.
Make names of ReplicaSets created by Deployment deterministic for idempotence.
Eliminate use of expectations in Deployment controller.
2016-02-28 07:33:07 +00:00
AdoHe c56c4c87f7 kubectl add AGE column to job, ingress and daemonset 2016-02-28 00:59:01 -05:00
k8s-merge-robot 6f8a951f87 Merge pull request #20446 from derekwaynecarr/quota_scopes
Auto commit by PR queue bot
2016-02-27 19:46:42 -08:00
k8s-merge-robot e089e841b1 Merge pull request #21593 from fabianofranz/split_bind_flags
Auto commit by PR queue bot
2016-02-27 16:10:19 -08:00
Paul Morie 7a6a4fab97 Add kubectl describe output for downward API volume 2016-02-27 15:40:13 -05:00
derekwaynecarr 01584bfabf Improve rendering of multiple quotas in namespace; show scopes 2016-02-26 20:34:15 -05:00
k8s-merge-robot 551d252497 Merge pull request #21864 from AdoHe/kubectl_job_desired
Auto commit by PR queue bot
2016-02-26 16:18:34 -08:00
Fabio Yeon 97bae1099b Merge pull request #21661 from AdoHe/describe_container_status_optional
make show status in describe.DescribeContainers optional
2016-02-26 15:48:46 -08:00
Fabio Yeon a4c9a7c4c0 Merge pull request #19988 from soltysh/annotate_cmd
Fix kubectl annotate and label to use versioned objects when operating
2016-02-26 15:38:26 -08:00
Fabio Yeon caf7b9eba7 Merge pull request #21688 from pmorie/kubectl-describe-pod-config
Add describe output for ConfigMap volumes
2016-02-26 13:16:49 -08:00
Fabio Yeon 3dab166da4 Merge pull request #21776 from erictune/job-sel-gen
Selector generation for batch/v1 Job
2016-02-26 11:58:21 -08:00
Steve Kuznetsov e5b696ee43 added 'kubectl create sa' to create serviceaccounts 2016-02-26 10:27:37 -05:00
Marcin Wielgus d174353ec9 Print annotations in HPA describe` 2016-02-26 12:04:19 +01:00
k8s-merge-robot 8c60068b36 Merge pull request #21794 from caesarxuchao/fix-19715
Auto commit by PR queue bot
2016-02-25 18:31:52 -08:00
Brian Grant 63feac0afc Merge pull request #21872 from kargakis/maxUavailability-fix
kubectl: preserve availability when maxUnavailability is not 100%
2016-02-25 09:35:37 -08:00
Eric Tune 875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
AdoHe aa6f07636b kubectl add job DESIRED column 2016-02-25 10:43:04 -05:00
deads2k 9c42d219bc allow disambiguation of resouces 2016-02-25 07:35:23 -05:00
deads2k 2b84d58b6d add a PriorityRESTMapper that can choose particular group/version of a resource 2016-02-25 07:35:23 -05:00
deads2k 94d683e89b fix ShortcutRESTMapper and prevent it from ever silently failing again 2016-02-25 07:35:22 -05:00
kargakis 9cc19102f3 kubectl: preserve availability when maxUnavailability is not 100% 2016-02-25 10:10:41 +01:00
Brian Grant 80614896db Merge pull request #21509 from madhusudancs/kubectl-get-list-deployments-daemonsets
Add DaemonSets and Deployments to valid resources list in kubectl.
2016-02-24 15:30:08 -08:00
Chao Xu 3efd3c62e6 Replace ineffective DeleteOptions with nil 2016-02-24 15:06:24 -08:00
Brian Grant 0b5edab208 Merge pull request #21857 from nikhiljindal/stopDeployment
fix deployment e2e flake: Update DeploymentReaper.Stop to use ObservedGeneration
2016-02-24 14:26:23 -08:00
Brian Grant 4add4ebacc Merge pull request #21445 from janetkuo/fix-rolling-update-nil
Fix rolling-update --image nil pointer dereference
2016-02-24 13:59:01 -08:00
Brian Grant b5c6341ec9 Merge pull request #21435 from janetkuo/use-intptr
Use IntPtr
2016-02-24 13:54:21 -08:00
nikhiljindal 2a538e317f Moving deployment deletion at the end 2016-02-24 13:00:45 -08:00
nikhiljindal 7e50fa6df0 Update DeploymentReaper.Stop to use ObservedGeneration to remove race condition 2016-02-24 00:09:44 -08:00
k8s-merge-robot 014f73c93f Merge pull request #21295 from AdoHe/kubectl_desired_column
Auto commit by PR queue bot
2016-02-24 00:05:41 -08:00
Janet Kuo e7356679bc Fix rolling-update --image nil pointer dereference 2016-02-23 15:07:53 -08:00
Piotr Szczesniak 3e023411f6 Added events to kubectl describe hpa 2016-02-23 20:44:51 +01:00
Madhusudan.C.S 781480d7fe Add DaemonSets and Deployments to valid resources list in kubectl. 2016-02-23 11:19:19 -08:00
Piotr Szczesniak 7f83e07465 Added support for HPA v1 in kubectl describe 2016-02-23 16:50:28 +01:00
AdoHe aa5c036a5c add DESIRED and CURRENT columns to rcs,ds,rs 2016-02-23 10:11:19 -05:00
k8s-merge-robot 725a8e8b36 Merge pull request #21369 from AdoHe/kubectl_change_column_titles
Auto commit by PR queue bot
2016-02-23 05:20:38 -08:00
k8s-merge-robot d3661414a1 Merge pull request #21273 from kargakis/rolling-updater-fix
Auto commit by PR queue bot
2016-02-23 04:50:59 -08:00
Paul Morie 4c61f2ce27 Add describe output for ConfigMap volumes 2016-02-22 12:26:05 -05:00
k8s-merge-robot 95354490c1 Merge pull request #21318 from kargakis/record-command-factory-method-tweak
Auto commit by PR queue bot
2016-02-22 08:11:57 -08:00
AdoHe 55823156d7 make show status in describe.DescribeContainers optional 2016-02-22 03:16:34 -05:00
k8s-merge-robot aee2eb3977 Merge pull request #21434 from erictune/job-ga
Auto commit by PR queue bot
2016-02-22 00:12:54 -08:00
k8s-merge-robot e34a23b289 Merge pull request #21351 from smarterclayton/optional_pod_status
Auto commit by PR queue bot
2016-02-21 04:10:19 -08:00
k8s-merge-robot 12383dfa0c Merge pull request #21341 from smarterclayton/liveness_describer
Auto commit by PR queue bot
2016-02-20 23:31:22 -08:00
k8s-merge-robot 330f484c17 Merge pull request #21174 from deads2k/make-patch-more-predictable
Auto commit by PR queue bot
2016-02-20 05:56:41 -08:00
Fabiano Franz 59ea2b1e59 Split factory#BindFlags 2016-02-19 20:41:16 -02:00
Maciej Szulik 9bfa27a5bf Fix kubectl annotate and label to use versioned objects when operating 2016-02-19 22:40:18 +01:00
Brian Grant d9635b5e3e Merge pull request #21572 from janetkuo/fix-flake-rollback-norevision
Retry Update in DeploymentReaper.Stop
2016-02-19 12:06:09 -08:00
Janet Kuo 3a3ebf68f0 Retry Update in DeploymentReaper.Stop 2016-02-19 11:31:41 -08:00
deads2k 11da9a7638 fix --record to not fail a successful patch 2016-02-19 14:28:23 -05:00
k8s-merge-robot 82c09f074b Merge pull request #20481 from kargakis/edit-fixes
Auto commit by PR queue bot
2016-02-19 10:55:16 -08:00
Eric Tune b4d454e9d5 Autogenerate. 2016-02-19 09:48:03 -08:00
Eric Tune bcdbd1c709 Fix Job Reaping
Ensure batch.Kind("Job") has a reaper, so that pods are not orphaned.
Check for orphaned pods in test-cmd.sh.
Also provide describer and scaler for batch.Kind("Job").
The scaler, reaper, and describer for extensions can
be reused for batch.
2016-02-19 09:22:05 -08:00
Eric Tune 175addf2a3 Implemented Batch client 2016-02-19 09:20:56 -08:00
Michail Kargakis 35fab99af7 kubectl: scale down based on ready during rolling updates 2016-02-19 15:42:04 +01:00
k8s-merge-robot 68a5641eb8 Merge pull request #20803 from aveshagarwal/master-sortby-indentation-issue
Auto commit by PR queue bot
2016-02-19 00:33:00 -08:00
k8s-merge-robot 5a3dec8dad Merge pull request #20777 from pmorie/kubectl-create-configmap
Auto commit by PR queue bot
2016-02-19 00:03:53 -08:00
k8s-merge-robot eb45154996 Merge pull request #21348 from caesarxuchao/generate-fake-for-1-2
Auto commit by PR queue bot
2016-02-18 23:02:05 -08:00
Paul Morie 51a9c2c9ba Add kubectl create configmap 2016-02-18 21:24:21 -05:00
k8s-merge-robot 5acdb92126 Merge pull request #21177 from laushinka/spelling-fixes
Auto commit by PR queue bot
2016-02-18 10:29:49 -08:00
k8s-merge-robot 17325ef6ef Merge pull request #20501 from piosz/hpa-ga
Auto commit by PR queue bot
2016-02-18 06:52:39 -08:00
Michail Kargakis f4658396eb kubectl: a couple of edit fixes
Fix some edit bugs:
* Reload the file in case of syntax errors
* Fix error format for validation errors
* Avoid hotlooping in case of no changes or empty saves
2016-02-18 11:43:07 +01:00
Clayton Coleman c198367958 Add a liveness and readiness describer to pods
Also shorten the Last Termination State label so the page is denser.
2016-02-17 20:07:05 -05:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Janet Kuo 1a5dd9f14f Use IntPtr 2016-02-17 15:08:50 -08:00
Michail Kargakis 55f402c5a6 kubectl: use the factory properly for recording commands 2016-02-17 12:16:19 +01:00
Clayton Coleman 778fb1798b Don't print reason or message if they are empty on pods
For running pods they are typically empty and convey no value. Don't
print images twice.
2016-02-16 23:26:59 -05:00
AdoHe 10feb3e6fd change CONTROLLER, ReplicaSet and Job column titles to NAME 2016-02-16 23:14:12 -05:00
Janet Kuo 92eb075a2b When reaping deployments, retry deployment Update 2016-02-16 15:12:38 -08:00
k8s-merge-robot dada47eb2f Merge pull request #21179 from smarterclayton/cant_replace_cluster_resource
Auto commit by PR queue bot
2016-02-16 04:45:43 -08:00
k8s-merge-robot 9dacc5b382 Merge pull request #21238 from AdoHe/kubectl_help_bug
Auto commit by PR queue bot
2016-02-15 19:16:39 -08:00
k8s-merge-robot 47acbd62ec Merge pull request #21099 from deads2k/extend-patch
Auto commit by PR queue bot
2016-02-15 14:49:02 -08:00
Piotr Szczesniak d2f11521cb Implemented Autoscaling client 2016-02-15 21:39:00 +01:00
k8s-merge-robot 1380a3e6a1 Merge pull request #20850 from deads2k/remove-resource-is-valid
Auto commit by PR queue bot
2016-02-15 11:27:19 -08:00
k8s-merge-robot 134d44cf2b Merge pull request #20409 from AdoHe/kubectl_ingress_labels
Auto commit by PR queue bot
2016-02-15 10:59:12 -08:00
deads2k 9901a386c3 remove ResourceIsValid 2016-02-15 07:49:48 -05:00
k8s-merge-robot 94b3c95e7a Merge pull request #20557 from AdoHe/kubectl_update_wide
Auto commit by PR queue bot
2016-02-15 00:18:37 -08:00
AdoHe 81103a07c2 fix --sort-by help bug 2016-02-14 22:31:13 -05:00
k8s-merge-robot ee33ed2cf5 Merge pull request #20981 from madhusudancs/labelselector-error-string-fix
Auto commit by PR queue bot
2016-02-14 03:14:46 -08:00
AdoHe f6b5eca11c kubectl print ingress add column labels 2016-02-14 04:28:44 -05:00
k8s-merge-robot d28ac1f88b Merge pull request #20948 from ghodss/versioned-apply
Auto commit by PR queue bot
2016-02-14 00:56:10 -08:00
AdoHe 53d4b15b87 move columns into wide option to make result more readable 2016-02-14 03:55:00 -05:00
k8s-merge-robot 3b4c0beb99 Merge pull request #20868 from mqliang/int-min-max
Auto commit by PR queue bot
2016-02-13 17:32:22 -08:00
k8s-merge-robot 53d9f9ecab Merge pull request #20814 from deads2k/restmapper-errors
Auto commit by PR queue bot
2016-02-13 15:53:22 -08:00
k8s-merge-robot 060f8f4db7 Merge pull request #20802 from aveshagarwal/master-allnamespaces-issue
Auto commit by PR queue bot
2016-02-13 15:25:15 -08:00