Commit Graph

3213 Commits (05c046f6d339dfbc986d5966ac3a28f0e29f2d81)

Author SHA1 Message Date
Kubernetes Submit Queue 1df2363093 Merge pull request #42999 from shiywang/fix-return0
Automatic merge from submit-queue (batch tested with PRs 43450, 42999, 43968)

fix kubectl config return 0 on error

Fixes https://github.com/kubernetes/kubernetes/issues/42852
cc @kubernetes/sig-cli-bugs
@ymqytw ptal
2017-04-03 09:48:23 -07:00
Kubernetes Submit Queue 2d646e0c29 Merge pull request #43450 from zjj2wry/003
Automatic merge from submit-queue (batch tested with PRs 43450, 42999, 43968)

unit test for kubectl config set-context

**What this PR does / why we need it**:
unit test for create context

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
think you 

**Release note**:

```release-note
NONE
```
2017-04-03 09:48:21 -07:00
ymqytw 8d14b19cd7 check error 2017-03-30 17:47:18 -07:00
Kubernetes Submit Queue 9ba2a401bb Merge pull request #43207 from xilabao/add-can-i-example
Automatic merge from submit-queue

add can-i example

use * can check if the admin user or not.
2017-03-30 08:42:17 -07:00
xilabao 1833602bf8 add can-i example 2017-03-30 09:39:03 +08:00
Kubernetes Submit Queue 8fc0c708d1 Merge pull request #43509 from xilabao/remove-duplicate-in-create-rolebinding
Automatic merge from submit-queue (batch tested with PRs 42617, 43247, 43509, 43644, 43820)

ignore duplicate resource in create rolebinding
2017-03-29 16:05:23 -07:00
Kubernetes Submit Queue c0497fc278 Merge pull request #43518 from zjj2wry/008
Automatic merge from submit-queue

unit test for kubectl config unset

**What this PR does / why we need it**:
unit test for kubectl config unset

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
think you 

**Release note**:

```release-note
```
2017-03-28 13:51:54 -07:00
Alejandro Escobar a5e6dcb434 addressing issue #39427 adding a flag --output to allow for either json or yaml.
updating with PR changes requested.

latest changes to having short for human readable only, and error cases moved a bit to the end.

rebase fixes

latest pr. changes.

small change moving return nil out of switch.

updated the nil check for the error in the humanreadable case.

more optimization in humanreadable code.

pushed up current test changes, this is purely temporary

finished writing tests

updated test and function names.

changed output extensions from .sh to output.

updated version, version struct now just called Version and not VersionObj.

made a few changes to testing.

fixed testing issues, created better test and cleanup

go format change.
2017-03-28 10:07:53 -07:00
Kubernetes Submit Queue f14618a56b Merge pull request #43622 from deads2k/cli-10-category
Automatic merge from submit-queue (batch tested with PRs 42087, 43383, 43622)

move category expansion out of restmapper

RESTMapping isn't related to CategoryExpansion (the bit that expands "all" into items to be RESTMapped).  This provides that separation and simplifies the RESTMapper interface.

@kubernetes/sig-cli-pr-reviews
2017-03-27 16:08:20 -07:00
deads2k 8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
Kubernetes Submit Queue 9c62733b1f Merge pull request #43044 from ncdc/NewPrefixWriter
Automatic merge from submit-queue (batch tested with PRs 42900, 43044, 42896, 43308, 43621)

Convert PrefixWriter to an interface

Convert PrefixWriter to an interface to allow other packages to create instances. This is needed for downstream projects such as OpenShift.

cc @sttts @smarterclayton @oulinbao @deads2k @liggitt @kargakis @soltysh @kubernetes/sig-cli-pr-reviews
2017-03-27 08:32:25 -07:00
Kubernetes Submit Queue b9e3742779 Merge pull request #43303 from shiywang/fix1
Automatic merge from submit-queue

add cronjob resource name for get -h

Fixes https://github.com/kubernetes/kubernetes/issues/43293
@gyliu513 @ymqytw ptal
2017-03-26 14:20:48 -07:00
Kubernetes Submit Queue 6a529f700a Merge pull request #42948 from CaoShuFeng/fromLiteralStrings
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

[cli] fix Generator's error messages

Invalid variables are used when format error messages. This change
fixes them.

**Release note**:

```NONE
```
2017-03-25 17:17:28 -07:00
Kubernetes Submit Queue 31b6a18264 Merge pull request #42818 from liggitt/proxy-msg
Automatic merge from submit-queue (batch tested with PRs 42672, 42770, 42818, 42820, 40849)

Switch clusterinfo to print recommended proxy endpoints
2017-03-25 14:27:25 -07:00
zhengjiajin ee23bb1b3c unit test for kubectl config set-context 2017-03-25 17:46:22 +08:00
zhengjiajin 611c90c65d unit test for kubectl config unset 2017-03-25 17:44:57 +08:00
shiywang 4a3dad1da6 add cronjob resource name for get -h 2017-03-25 17:42:02 +08:00
Kubernetes Submit Queue 20b01be016 Merge pull request #41813 from shiywang/timeout_options
Automatic merge from submit-queue (batch tested with PRs 43642, 43170, 41813, 42170, 41581)

Be able to specify the timeout to wait for pod for kubectl logs/attach

Fixes https://github.com/kubernetes/kubernetes/issues/41786
current flag is `get-pod-timeout`, we can have a discussion if you have better one, default unit is seconds, above 0

@soltysh @kargakis ptal, thanks
@kubernetes/sig-cli-feature-requests
2017-03-24 19:04:26 -07:00
Kubernetes Submit Queue 0e17e5bd9c Merge pull request #38882 from fraenkel/configmap_env_file
Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)

create configmap from-env-file

Allow ConfigMaps to be created from Docker based env files.

See proposal https://github.com/kubernetes/community/issues/165

**Release-note:**
```release-note
1. create configmap has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
2. create secret has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
```
2017-03-24 12:33:25 -07:00
Kubernetes Submit Queue 0d53679efc Merge pull request #41139 from juanvallejo/jvallejo/set-cluster-api-value
Automatic merge from submit-queue

config set cluster api value

Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1420280

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

This patch sets a specified api version if one is given while setting cluster values in kubeconfig

cc @AdoHe  @pweil-
2017-03-24 12:10:55 -07:00
xilabao d2069ab46b ignore duplicate resource in create rolebinding 2017-03-22 17:35:04 +08:00
Jordan Liggitt 939ca532aa
generated files 2017-03-20 23:57:38 -04:00
Jordan Liggitt 0e2f1b535d
Ensure empty serialized slices are zero-length, not null 2017-03-20 23:56:39 -04:00
Anthony Yeh fa23729a6d kubectl: Use v1.5-compatible ownership logic when listing dependents.
In particular, we should not assume ControllerRefs are necessarily set.
However, we can still use ControllerRefs that do exist to avoid
interfering with controllers that do use it.
2017-03-16 12:28:38 -07:00
Anthony Yeh 725ec0cc5e kubectl: Check for Deployment overlap annotation in reaper.
This effectively reverts the client-side changes in
cec3899b96.
We have to maintain the old behavior on the client side to support
version skew when talking to old servers that set the annotation.

However, the new server-side behavior is still to NOT set the
annotation.
2017-03-16 12:28:28 -07:00
shiywang 917a0b6f1b fix kubectl config return 0 on error 2017-03-16 08:34:51 +08:00
shiywang 52e4be2578 Be able to specify the timeout to wait for pod for kubectl logs/attach 2017-03-14 23:00:31 +08:00
Andy Goldstein 433fc606c6 Convert PrefixWriter to an interface
Convert PrefixWriter to an interface to allow other packages to create
instances. This is needed for downstream projects such as OpenShift.
2017-03-14 10:31:13 -04:00
Guangya Liu ab94015ee8 `kubectl taint` update for `NoExecute`. 2017-03-14 18:24:40 +08:00
Cao Shufeng b2f530d756 [cli] fix Generator's error messages
Invalid variables are used when format error messages. This change
fixes them.
2017-03-11 02:09:52 -05:00
Kubernetes Submit Queue 9590f694c8 Merge pull request #41830 from irfanurrehman/fed-rbac-1
Automatic merge from submit-queue

[Federation] Kubefed Init should use the right RBAC API version clientset

**What this PR does / why we need it**:
Implements the need as described in https://github.com/kubernetes/kubernetes/issues/41263
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubernetes/issues/41263

**Special notes for your reviewer**:
@madhusudancs @shashidharatd @marun 
cc @kubernetes/sig-federation-bugs

**Release note**:

```
NONE
```
2017-03-10 15:56:47 -08:00
Maciej Szulik 597a359c38 Error out when cronjob generator not specified, but cronjobs are not available 2017-03-10 12:08:01 +01:00
Maciej Szulik aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01:00
Maciej Szulik 1049dad0a4 Switch generators to use versioned objects 2017-03-10 12:08:01 +01:00
Łukasz Oleś b32afe1720 kubectl: respect DaemonSet strategy parameters for rollout status
It handles "after-merge" comments from #41116
2017-03-09 20:02:52 +01:00
Jordan Liggitt 9262c57ba8
Switch clusterinfo to print recommended proxy endpoints 2017-03-09 13:07:02 -05:00
Michael Fraenkel f2815156b0 create secret from-env-file 2017-03-08 07:58:01 -08:00
Michael Fraenkel 7eb49628c6 create configmap from-env-file 2017-03-08 07:58:01 -08:00
Kubernetes Submit Queue d306acca86 Merge pull request #42175 from enisoc/controller-ref-dep
Automatic merge from submit-queue

Deployment: Fully Respect ControllerRef

**What this PR does / why we need it**:

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Deployment into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Deployment does not fight with other controllers over control of Pods and ReplicaSets.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Deployment now fully respects ControllerRef to avoid fighting over Pods and ReplicaSets. At the time of upgrade, **you must not have Deployments with selectors that overlap**, or else [ownership of ReplicaSets may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading).
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-07 20:44:36 -08:00
xilabao a01cf0e66b add "use" to validResourceVerbs 2017-03-07 00:42:24 -06:00
Anthony Yeh 8c4bcb38fb Deployment: Filter by ControllerRef in Reaper.
We don't want to delete ReplicaSets we don't own.
2017-03-06 15:12:08 -08:00
Anthony Yeh cec3899b96 Deployment: Remove Overlap and SelectorUpdate annotations.
These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
2017-03-06 15:12:08 -08:00
Kubernetes Submit Queue 90a4eda96b Merge pull request #41809 from kargakis/rollout-status-fix
Automatic merge from submit-queue

kubectl: respect deployment strategy parameters for rollout status

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

`rollout status` now respects the strategy parameters for a RollingUpdate Deployment. This means that it will exit as soon as minimum availability is reached for a rollout (note that if you allow maximum availability, `rollout status` will succeed as soon as the new pods are created)

@janetkuo @AdoHe ptal
2017-03-04 19:35:21 -08:00
Kubernetes Submit Queue db4fbf5958 Merge pull request #42369 from smarterclayton/get_warning
Automatic merge from submit-queue

Output of `kubectl get` is inconsistent for pods

Builds on top of fixes from #42283, only the last two commits are new. Reverts behavior of #39042 which was inconsistent and confusing.

Fixes #15853
2017-03-03 23:12:38 -08:00
Kubernetes Submit Queue b33d0fb394 Merge pull request #42391 from liggitt/patch-output
Automatic merge from submit-queue (batch tested with PRs 42443, 38924, 42367, 42391, 42310)

Fix 'not patched' kubectl error

fixes #42384
2017-03-03 18:08:44 -08:00
Kubernetes Submit Queue f7c07a121d Merge pull request #42285 from liggitt/get-watch
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

Fix error printing objects from kubectl get -w

Fixes #42276
2017-03-03 16:44:45 -08:00
Irfan Ur Rehman 2ad49a642b [Federation][Kubefed] Add some faked methods on kubectl fake test API factory for kubefeds consumption 2017-03-03 19:39:26 +05:30
Michail Kargakis d20ac8766e kubectl: respect deployment strategy parameters for rollout status 2017-03-03 14:12:08 +01:00
Clayton Coleman 34e4337e57
Don't print the "filtered" message on generic output
Unify the various output displays and make them simpler. Don't write to
glog, but only output the info when `-v 2` to stderr.
2017-03-02 15:58:25 -05:00
Clayton Coleman 4e7c10a520
Don't bypass filter on generic output
It is inconsistent and confusing (filtering is orthogonal from output)
and we don't want to regress behavior from 1.5.
2017-03-02 15:58:22 -05:00