Commit Graph

6532 Commits (ac015892e4e2ab641a7761ab79f8cf986e1fa266)

Author SHA1 Message Date
Kubernetes Submit Queue 420071d86e
Merge pull request #60636 from PhilipGough/keys-from-cm-patch
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow env from resource with keys & updated tests

**What this PR does / why we need it**:
This change allows users to pull environment from specific keys in secrets and configmaps using the `kubectl set env` command. User can provide a list of comma-separated keys with the `--keys` flag.

This can be useful when a number of applications want to share a configuration object but don't want to pollute a resource with unused environment

Improves test coverage of set env command

**Release note**:

```
Allow kubectl set env to specify which keys to import from a resource
```
2018-05-23 15:51:01 -07:00
Kubernetes Submit Queue e9c721b640
Merge pull request #64156 from andyxning/log_bad_format_git_version
Automatic merge from submit-queue (batch tested with PRs 59851, 64114, 63912, 64156, 64191). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

log bad format git version

**What this PR does / why we need it**:
This PR will log git version when its format is bad. This will be helpful for debug.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-23 09:06:20 -07:00
Nail Islamov 3b5afd8809
Use DeleteOptions.PropagationPolicy instead of OrphanDependents (deprecated) in kubectl 2018-05-23 16:59:53 +10:00
Kubernetes Submit Queue f9c8898116
Merge pull request #64034 from deads2k/cli-62-wait
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add kubectl wait

Adds a `kubectl wait --for=[delete|condition=condition-name] resource/string` command.  This allows generic waiting on well behaved conditions and for a resource or set of resources to be deleted.

This was requested for delete to do foreground deletion

WIP because I need to add test cases.


@kubernetes/sig-cli-maintainers this is using a separation of concerns made possible by the genericclioptions to make an easily unit testable command.
@smarterclayton 

```release-note
adds a kubectl wait command
```
2018-05-22 19:20:12 -07:00
Andy Xie 3e53e99aae log bad format git version 2018-05-22 23:49:50 +08:00
Kubernetes Submit Queue 007e936c6d
Merge pull request #63851 from WanLinghao/ctl_create_aggegated_rules
Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make kubectl could create clusterrole with aggregation rules

**What this PR does / why we need it**:
The clusterrole aggregation rule features are available since v1.9:
https://kubernetes.io/docs/admin/authorization/rbac/#aggregated-clusterroles
This patch makes kubectl could create clusterrole with aggregation rules.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-22 08:40:20 -07:00
David Eads 76794643c5 add wait 2018-05-22 08:47:42 -04:00
PhilipGough 027d15e58c
Allow env from resource with keys & updated tests 2018-05-22 09:04:45 +01:00
Kubernetes Submit Queue ad4b283ee9
Merge pull request #63151 from YonatanKiron/enable-local-cluster-port-range
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add optional flag of node port range

**What this PR does / why we need it**:
Add option of setting port range when using hack/local-up-cluster.sh
**Which issue(s) this PR fixes**
Inability to set port range flag

**Release note**:

```release-note
NONE
```
2018-05-21 20:45:32 -07:00
Kubernetes Submit Queue fe509498c4
Merge pull request #63402 from juanvallejo/jvallejo/move-printer-flags-to-genericclihelpers
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

move printer flags to genericclihelpers

**Release note**:
```release-note
NONE
```

Moves all pkg/kubectl/cmd#PrintFlags to pkg/kubectl/genericclioptions
~~Depends on https://github.com/kubernetes/kubernetes/pull/63340~~
~~Depends on https://github.com/kubernetes/kubernetes/pull/63808~~
~~Depends on https://github.com/kubernetes/kubernetes/pull/63928~~
Depends on https://github.com/kubernetes/kubernetes/pull/64107

~Opening now to catch CI failures~

cc @deads2k @soltysh
2018-05-21 17:05:38 -07:00
juanvallejo d1603c9560 move PrintOptions to genericclioptions 2018-05-21 14:59:41 -04:00
xuzhonghu 4be6328126 remove unused gc code 2018-05-21 20:22:37 +08:00
Yonatan Kiron 0b7b2de8c8 Add optional flag of node port range 2018-05-21 12:22:49 +03:00
WanLinghao 5e9e3afb2e kubectl: add aggregation rule support to clusterrole 2018-05-18 19:44:23 +08:00
Kubernetes Submit Queue a20964ac43
Merge pull request #63514 from juanvallejo/jvallejo/move-config-flags-genericclioptions
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

move config flags to pkg/kubectl/genericclioptions

**Release note**:
```release-note
NONE
```

Moves ConfigFlags to `pkg/kubectl/genericclioptions`
~~Depends on https://github.com/kubernetes/kubernetes/pull/63550~~

cc @soltysh @deads2k
2018-05-16 17:40:30 -07:00
Kubernetes Submit Queue 7d9725e9d0
Merge pull request #61227 from apelisse/fix-diff
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

diff: Fix broken `Local()` logic

Local and Live functions where doing and returning the same thing,
giving empty results by default. Fix the local function by copying the
objects before fetching the live version.



**What this PR does / why we need it**: Diff prints empty output by default. Fixes it.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/issues/61145

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-16 13:21:47 -07:00
Antoine Pelisse f2b48a90df diff: Fix broken `Local()` logic
Local and Live functions where doing and returning the same thing,
giving empty results by default. Fix the local function by copying the
objects before fetching the live version.
2018-05-16 10:27:56 -07:00
juanvallejo 876629f690 move ConfigFlags to pkg/kubectl/genericclioptions 2018-05-16 11:31:48 -04:00
Kubernetes Submit Queue 5686fcfcf8
Merge pull request #62328 from serathius/monitoring-default-none
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate InfluxDB cluster monitoring

InfluxDB cluster monitoring addon will no longer be supported and will be removed in k8s 1.12.
Default monitoring solution will be changed to `standalone`.
Heapster will still be deployed for backward compatibility of `kubectl top`

```release-note
Stop using InfluxDB as default cluster monitoring
InfluxDB cluster monitoring is deprecated and will be removed in v1.12
```
cc @piosz
2018-05-16 07:07:05 -07:00
Lucas Käldström 792d028b14
Ignore golint failure for v1alpha2, as the failing code is autogenerated 2018-05-16 10:41:32 +01:00
Kubernetes Submit Queue de2f1faa55
Merge pull request #63782 from luxas/kubeadm_own_scheme
Automatic merge from submit-queue (batch tested with PRs 63272, 63782, 63715, 63811, 63803). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Stop installing kubeadm types in the generic, legacy scheme

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

Right now the kubeadm API types are (wrongly from a correctness perspective) installed in the "catch-all" and now legacy `pkg/api/legacyscheme`. Instead, we should use our own, kubeadm-specific `scheme` where our API types are registered. Doing this also cuts one dependency on the internal core API types.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of https://github.com/kubernetes/community/pull/2131

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @sttts @liztio
2018-05-15 05:08:10 -07:00
Kubernetes Submit Queue 141e4ee0ca
Merge pull request #63769 from liggitt/kubectl-taint-internal-object
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

print result object from kubectl taint correctly

fixes #63767 

```release-note
NONE
```
2018-05-14 14:35:24 -07:00
Kubernetes Submit Queue a1b54f3c99
Merge pull request #63100 from ravisantoshgudimetla/priority-beta-api
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create pkg/scheduling/apis/v1beta1 and move priorityClass to beta 

**What this PR does / why we need it**:
This is for creating pkg/apis/scheduling/v1beta1 so that priorityClasses could be moved to beta.

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

**Special notes for your reviewer**:
/cc @bsalamat @aveshagarwal 

**Release note**:

```release-note
The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`
```
2018-05-14 14:35:21 -07:00
Jordan Liggitt 746bca241f
print result object from kubectl taint correctly 2018-05-14 14:21:52 -04:00
Lucas Käldström 80a31d7a5a
Stop installing kubeadm types in the generic, legacy scheme 2018-05-14 18:11:30 +01:00
ravisantoshgudimetla f20bd00ab2 Generated 2018-05-12 02:01:09 -04:00
ravisantoshgudimetla 1db5990013 Move scheduling api to beta 2018-05-12 02:01:04 -04:00
David Eads d8924bc1c9 move old dynamic client to deprecated-client 2018-05-11 08:00:46 -04:00
Kubernetes Submit Queue 817d822ce9
Merge pull request #63628 from dougm/local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 63703, 63628). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use absolute path for KUBECTL default in local up cluster

This avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.



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

Avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.

**Release note**:

```release-note
NONE
```
2018-05-11 04:32:09 -07:00
Kubernetes Submit Queue 27803825e3
Merge pull request #63669 from deads2k/cli-55-restmappersnip
Automatic merge from submit-queue (batch tested with PRs 63669, 63511, 63561, 63289). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 move resource builder to generic options

This pull snips the last kube/kube links from the resource builder and moves it to the genericclioptions to be built out into flags from there.

@kubernetes/sig-cli-maintainers 

```release-note
NONE
```
2018-05-10 14:25:10 -07:00
Kubernetes Submit Queue 8ce536df1a
Merge pull request #62665 from liztio/kubeadm-e2e
Automatic merge from submit-queue (batch tested with PRs 62665, 62194, 63616, 63672, 63450). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Kubeadm e2e

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

Provides in-tree E2E tests for the Kubeadm subproject

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes [kubeadm#456](https://github.com/kubernetes/kubeadm/issues/456)

**Special notes for your reviewer**:

The weird way tests are executed mirrors `e2e_node`. A future pull request will add a frontend for these tests to kubetest, which will abstract away much of this detail.

**Release note**:
```release-note
NONE
```
2018-05-10 12:56:12 -07:00
David Eads 16d6a6c52f move resource builder to generic options 2018-05-10 14:15:12 -04:00
liz 4ba3218336
Basic E2E tests for kubeadm
Run with `go run test/e2e_kubeadm/runner/local/run_local.go -build -test-flags="--kubeconfig=$KUBECONFIG"`
2018-05-10 12:54:25 -04:00
Doug MacEachern 2dd3fbda0b Use absolute path for KUBECTL default in local up cluster
This avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.
2018-05-09 16:25:59 -07:00
David Eads ad87219b2c category expansion can only come from the server 2018-05-09 15:05:58 -04:00
David Eads c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
Jeff Grafton b9efd1f467 workspace mirror: add trailing newline to urls list 2018-05-07 16:52:20 -07:00
Kubernetes Submit Queue 678152bc00
Merge pull request #63412 from praseodym/go1.10.2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update to go1.10.2

**What this PR does / why we need it**:
Update to use go1.10.2 which [includes some compiler and linker fixes](https://golang.org/doc/devel/release.html#go1.10.minor).

**Special notes for your reviewer**:
[Docker image `golang:1.10.2` should be available soon](https://github.com/docker-library/official-images/pull/4317).

**Release note**:
```release-note
Update to use go1.10.2
```
2018-05-04 18:59:52 -07:00
Kubernetes Submit Queue 31511f9e24
Merge pull request #63383 from liggitt/lease-reconciler
Automatic merge from submit-queue (batch tested with PRs 63315, 63383, 63318, 63439). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Re-enable lease reconciler, fix shutdown race

Fixes #63378
Fixes #57617

* Fixes the openapi script to wait for the apiserver on shutdown (like all the other scripts do)
* Fixes the apiserver shutdown to not hang forever if the kubernetes service reconciler cannot persist to etcd
* Readds https://github.com/kubernetes/kubernetes/pull/58474 to make the default the lease reconciler

```release-note
kube-apiserver: the default `--endpoint-reconciler-type` is now `lease`. The `master-count` endpoint reconciler type is deprecated and will be removed in 1.13.
```
2018-05-04 12:41:09 -07:00
Kubernetes Submit Queue 1929e0d86d
Merge pull request #63298 from dims/kubelet-remove-unused-code
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet - Remove unused code

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

Looks like we have a bunch of unused methods. Let's clean them up

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-04 04:20:06 -07:00
Mark Janssen ac731ed2e5 Update to go1.10.2 2018-05-04 00:39:21 +02:00
Jordan Liggitt 30f2962ede
Make openapi spec generation wait for the apiserver on shutdown 2018-05-02 22:44:48 -04:00
Kubernetes Submit Queue b5f61ac129
Merge pull request #62657 from matthyx/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter

This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation.
https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
```release-note
Use /usr/bin/env in all script shebangs to increase portability.
```
2018-05-02 19:44:32 -07:00
Kubernetes Submit Queue 03eb9f687f
Merge pull request #62060 from WanLinghao/namespace_miss_fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix namespace miss bug

**What this PR does / why we need it**:
This  patch fixes  the namespace miss problems.
I am not sure if this is the correct way it should be fixed.
Just offer a solution.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62059

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-02 18:04:06 -07:00
WanLinghao a2c029f6c3 1.fix kubectl get * --all-namespaces
namespace miss error
	2.also add a test case
	modified:   pkg/kubectl/cmd/get/get.go
	modified:   hack/make-rules/test-cmd-util.sh
2018-05-02 11:27:22 +08:00
Kubernetes Submit Queue 8f571a0e9d
Merge pull request #63308 from liggitt/cronjob-set-test
Automatic merge from submit-queue (batch tested with PRs 63335, 63308). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add set image test for sparse API group resource

Ensures set image works correctly on resources that do not exist in the preferred version of their API group

Tests scenario noticed in review of https://github.com/kubernetes/kubernetes/pull/63206#discussion_r185008596

```release-note
NONE
```
2018-05-01 19:31:08 -07:00
Davanum Srinivas 4bacd77321 Remove unused code 2018-04-30 14:57:26 -04:00
Maciej Szulik b7d4f15965
Remove Factory from more Run commands 2018-04-30 19:58:54 +02:00
Jordan Liggitt 5e24289f89
Add set image test for sparse API group resource 2018-04-30 13:28:46 -04:00
liz a80b5454af
Generated artefacts 2018-04-30 10:00:13 -04:00