Commit Graph

377 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
deads2k 3ee458d246 remove tpr API access 2017-07-03 11:25:59 -04:00
Kubernetes Submit Queue e4af9dccb0 Merge pull request #46923 from dims/nuke-wrapper-go-flags
Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923)

Remove unnecessary wrapper flags

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

Drop KUBE_GOFLAGS, KUBE_GOGCFLAGS, KUBE_GOLDFLAGS references
from the build infrastructure

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-22 20:26:29 -07:00
Kubernetes Submit Queue dafe578377 Merge pull request #45984 from cblecker/hack-vet
Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923)

Move govet verify into rest of verify*-.sh scripts

**What this PR does / why we need it**:
Instead of having two govet scripts, consolidate them to into one and have both the Makefile and verify.sh scripts target the same script. This also will allow proper syntax highlighting and timing when the vet script is run as part of `make verify`.

**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/test-infra/issues/2725

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @fejta @rmmh
2017-06-22 20:26:21 -07:00
Kubernetes Submit Queue 4e1b608391 Merge pull request #45784 from xiangpengzhao/fix-integration-tips
Automatic merge from submit-queue

Give developer more help info when running integration tests without etcd found.

**What this PR does / why we need it**:
When running integration tests, if etcd version on env is lower than expected, developer will get info `You can use 'hack/install-etcd.sh' to install a copy in third_party/.` It would be better to have the same info if no etcd installed on env.

**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**:

**Release note**:

```release-note
NONE
```
2017-06-22 18:53:22 -07:00
Chao Xu bad65b4c95 Don't revert, necessary change to make helpers to include k8s.io/api
Don't revert, change boundingdirs in Makefile for deepcopy-gen

manually fix pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go because external policy types are moved now
2017-06-22 11:30:43 -07:00
Christoph Blecker 97783f9093
Run hack/verify-govet.sh as part of verify make target
This commit ensures that:
- go vet will be run as part of the make verify target
- the vet make-rule script won't be run directly, as generated_files won't be run in that case
- that go vet errors show up in the build log with a start time, finish time, and SUCCESS/FAILED message as part of the verify make rule script
2017-06-21 11:10:25 -07:00
mbohlool 222f6ae37f Add test from #47578 2017-06-21 10:56:00 -07:00
Kubernetes Submit Queue cc645a8c6f Merge pull request #46327 from supereagle/mark-network-plugin-dir-deprecated
Automatic merge from submit-queue (batch tested with PRs 46327, 47166)

mark --network-plugin-dir deprecated for kubelet

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

**Which issue this PR fixes** : fixes #43967

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-19 11:23:54 -07:00
Kubernetes Submit Queue c31893978b Merge pull request #45918 from juanvallejo/jvallejo/fix-kubectl-set-resources-local
Automatic merge from submit-queue

fix --local flag for kubectl commands

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

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

Fixes the `--local` flag for `kubectl set ...` sub-commands.
**As of the 1.7 release**, `PrinterForCommand` was updated to [use a mapper and typer for unstructured objects](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/factory_builder.go#L52), which further prevented the use of `--local` when there was no connection to an api server.


**before** (with no connection to a server)
```
$ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local
error: unable to connect to a server to handle "pods": Get https://10.13.137.149:8443/api: dial tcp 10.13.137.149:8443: getsockopt: connection refused
```

**after** (with no connection to a server)
```
$ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local
NAME              READY     STATUS    RESTARTS   AGE
mypod   0/1                 0          <unknown>
```

cc @smarterclayton @fabianofranz
2017-06-16 08:19:13 -07:00
Anthony Yeh 394c6a5980
CRD: Test delete both with and without cascading. 2017-06-14 22:36:45 -07:00
Kubernetes Submit Queue 8cbf3a33d4 Merge pull request #47542 from enisoc/tpr-watch
Automatic merge from submit-queue (batch tested with PRs 47492, 47542, 46800, 47545, 45764)

Fix TPR watches.

Fixes #47027

TPR watch has been broken since #44350.
2017-06-14 21:43:41 -07:00
Kubernetes Submit Queue 304106f0f7 Merge pull request #47099 from mengqiy/add_junit_for_cmd_tests
Automatic merge from submit-queue (batch tested with PRs 47204, 46808, 47432, 47400, 47099)

support junit in test-cmd

Output junit result for cmd tests.

Fixes #45196

There will be a followup PR to refactor the cmd test into functions as test cases there is not a lot changes in `hack/make-rules/test-cmd-util.sh`

```release-note
NONE
```
2017-06-14 17:14:08 -07:00
Anthony Yeh 17cbc5e014
Fix TPR watches. 2017-06-14 16:58:49 -07:00
ymqytw 1480f6c368 refactor cmd test case into functions for easier generating junit results 2017-06-13 14:09:06 -07:00
ymqytw 471327f95f output junit for cmd tests 2017-06-13 10:13:23 -07:00
juanvallejo d036686185
fix --local flag for `kubectl set` commands 2017-06-13 12:57:05 -04:00
Janet Kuo 03af5233bd Make kubectl apply add change-cause before patching 2017-06-12 23:49:42 -07:00
Janet Kuo 2b8f91e549 Update kubectl rollout to consume `.data` of DaemonSet history
Also update tset data to make sure DaemonSet template is replaced, not
merged, when rolling back.
2017-06-10 10:52:33 -07:00
Kubernetes Submit Queue 20bf5f2311 Merge pull request #47086 from enisoc/crd-namespace-cleanup
Automatic merge from submit-queue (batch tested with PRs 47024, 47050, 47086, 47081, 47013)

apiextensions-apiserver: Fix decoding of DeleteOptions.

Fixes #47072 by making apiextensions-apiserver capable of decoding unversioned DeleteOptions, rather than only handling Unstructured objects (i.e. Custom Resources).

This also closes #46736 and #37554 since the added regression test works for TPR as well.
2017-06-07 16:53:43 -07:00
Davanum Srinivas 823e26ddbf Remove unnecessary wrapper flags
Drop KUBE_GOFLAGS, KUBE_GOGCFLAGS, KUBE_GOLDFLAGS references
from the build infrastructure. There are some usages still
for KUBE_GOFLAGS, so we should print a deprecation message
until all those are fixed. If both KUBE_GOFLAGS and GOFLAGS
are just then we just bail out.
2017-06-07 12:31:01 -04:00
Mike Danese 64f77ebfb7 enable race detection on integration tests 2017-06-06 16:27:49 -07:00
Anthony Yeh 6044bea32b
Add test for TPR/CRD namespace cleanup. 2017-06-06 11:45:15 -07:00
Dr. Stefan Schimanski 33e50da9f4 Rename {kube- ->}apiextensions-{-> api}server 2017-06-06 12:06:31 +02:00
Kubernetes Submit Queue a552ee61a0 Merge pull request #46672 from smarterclayton/initializer_with_config
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Select initializers from the dynamic configuration

Continues #36721

kubernetes/features#209
2017-06-05 20:27:50 -07:00
Fabiano Franz 058f9b4f32 Add group alias names to discovery in registry 2017-06-05 20:18:12 -03:00
Clayton Coleman 034f06d7e4
Remove Initializers from federation 2017-06-05 19:12:36 -04:00
Janet Kuo edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
Clayton Coleman 4ce3907639
Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
Kubernetes Submit Queue 5bf5d45c2b Merge pull request #46192 from cblecker/verify-dockerized
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563)

Exclude dockerized verify patterns

**What this PR does / why we need it**:
Change some of the `make verify` logic to allow excluding based on a pattern. Add the `verify-*-dockerized.sh` pattern to the excluded list.

**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**:

**Release note**:

```release-note
NONE
```
2017-06-02 18:05:57 -07:00
supereagle dc9f0f9729 mark --network-plugin-dir deprecated for kubelet, and update related bootstrap scripts 2017-06-01 22:06:44 +08:00
Kubernetes Submit Queue 98e5496aa2 Merge pull request #46677 from enisoc/tpr-migrate-etcd
Automatic merge from submit-queue (batch tested with PRs 43505, 45168, 46439, 46677, 46623)

Add TPR to CRD migration helper.

This is a helper for migrating TPR data to CustomResource. It's rather hacky because it requires crossing apiserver boundaries, but doing it this way keeps the mess contained to the TPR code, which is scheduled for deletion anyway.

It's also not completely hands-free because making it resilient enough to be completely automated is too involved to be worth it for an alpha-to-beta migration, and would require investing significant effort to fix up soon-to-be-deleted TPR code. Instead, this feature will be documented as a best-effort helper whose results should be verified by hand.

The intended benefit of this over a totally manual process is that it should be possible to copy TPR data into a CRD without having to tear everything down in the middle. The process would look like this:

1. Upgrade to k8s 1.7. Nothing happens to your TPRs.
1. Create CRD with group/version and resource names that match the TPR. Still nothing happens to your TPRs, as the CRD is hidden by the overlapping TPR.
1. Delete the TPR. The TPR data is converted to CustomResource data, and the CRD begins serving at the same REST path.

Note that the old TPR data is left behind by this process, so watchers should not receive DELETE events. This also means the user can revert to the pre-migration state by recreating the TPR definition.

Ref. https://github.com/kubernetes/kubernetes/issues/45728
2017-06-01 05:43:44 -07:00
Kubernetes Submit Queue c365829d01 Merge pull request #46487 from CaoShuFeng/LANG
Automatic merge from submit-queue (batch tested with PRs 46686, 45049, 46323, 45708, 46487)

set LANG to 'C' in Makefile

Now we support multi-languages:
https://github.com/kubernetes/kubernetes/tree/master/translations

But some tests support only English. This test fails when LANG is set to zh_CN.UTF-8:
https://github.com/kubernetes/kubernetes/blob/master/hack/make-rules/test-cmd-util.sh#L2838
The expected err string is translated to Chinese:
https://github.com/kubernetes/kubernetes/blob/master/translations/kubectl/zh_CN/LC_MESSAGES/k8s.po#L82

**Release note**:

```
NONE
```
2017-06-01 03:42:12 -07:00
Anthony Yeh ba59e14d44
Add TPR to CRD migration helper. 2017-05-31 19:07:38 -07:00
Christoph Blecker 079abb9ec9
Exclude dockerized verify patterns 2017-05-31 18:08:16 -07:00
Cao Shufeng 33cecc3499 Update deprecated flags for "make test-cmd" 2017-05-31 15:20:09 +08:00
Cao Shufeng 58c6200764 set LANG to 'C' for "make test-cmd"
Now we support multi-languages:
https://github.com/kubernetes/kubernetes/tree/master/translations

But some tests support only English. This test fails when LANG is set to zh_CN.UTF-8:
https://github.com/kubernetes/kubernetes/blob/master/hack/make-rules/test-cmd-util.sh#L2838
The expected err string is translated to Chinese:
https://github.com/kubernetes/kubernetes/blob/master/translations/kubectl/zh_CN/LC_MESSAGES/k8s.po#L82
2017-05-31 13:44:16 +08:00
xiangpengzhao 0cacf526b2 Suggest user to use 'hack/install-etcd.sh' when running integration tests without etcd found. 2017-05-31 11:39:34 +08:00
deads2k ce681fe47c move CRD from alpha to beta 2017-05-30 07:57:26 -04:00
Kubernetes Submit Queue 899b6c00ba Merge pull request #45809 from CaoShuFeng/non-resource-url-create-rolebinding
Automatic merge from submit-queue

support NonResourceURL for kubectl create clusterrole

Release note:
```release-note
add --non-resource-url to kubectl create clusterrole
```
2017-05-26 16:47:06 -07:00
Cao Shufeng 93e50b167e support NonResourceURL for kubectl create clusterrole 2017-05-26 10:07:44 +08:00
Monis Khan a13f026fd0
Panic server on watch errors in test environment
This change makes it so that errors during watch decoding panic the
server if it is in a test environment.  This allows us to catch coder
errors related to storing incompatible types at the same location in
etcd.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-05-25 13:54:56 -04:00
Random-Liu 82f588b483 Fix cos image project to cos-cloud. 2017-05-23 15:12:03 -07:00
Anirudh 078f9566d9 PDB MaxUnavailable: kubectl changes 2017-05-23 07:18:44 -07:00
Kubernetes Submit Queue 644a544d62 Merge pull request #46062 from alexandercampbell/correct-deprecation-errors
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

kubectl: fix deprecation warning bug

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

Some kubectl commands were deprecated but would fail to print the
correct warning message when a flag was given before the command name.

	# Correctly prints the warning that "resize" is deprecated and
	# "scale" is now preferred.
	kubectl resize [...]

	# Should print the same warning but no warning is printed.
	kubectl --v=1 resize [...]

This was due to a fragile check on os.Args[1].

This commit implements a new function deprecatedCmd() that is used to
construct new "passthrough" commands which are marked as deprecated and
hidden.

Note that there is an existing "filters" system that may be preferable
to the system created in this commit. I'm not sure why the "filters"
array was not used for all deprecated commands in the first place.

**Release note**:

```release-note
NONE
```
2017-05-22 20:58:07 -07:00
Alexander Campbell 46cdb3966c test-cmd-util: fix deprecated commands test
Additionally, move the test down to ensure definition order matches run
order.
2017-05-22 13:39:51 -07:00
Alexander Campbell c9c8d61048 Merge branch 'master' into correct-deprecation-errors 2017-05-22 09:55:07 -07:00
deads2k 446e959bf7 make CRD apiservice controller 2017-05-22 08:54:14 -04:00
Kubernetes Submit Queue 8fe818b2a1 Merge pull request #45981 from fabianofranz/kubectl_plugins_v1_part1
Automatic merge from submit-queue (batch tested with PRs 46033, 46122, 46053, 46018, 45981)

Command tree and exported env in kubectl plugins

This is part of `kubectl` plugins V1:
- Adds support to several env vars passing context information to the plugin. Plugins can make use of them to connect to the REST API, access global flags, get the path of the plugin caller (so that `kubectl` can be invoked) and so on. Exported env vars include
  - `KUBECTL_PLUGINS_DESCRIPTOR_*`: the plugin descriptor fields
  - `KUBECTL_PLUGINS_GLOBAL_FLAG_*`: one for each global flag, useful to access namespace, context, etc
  - ~`KUBECTL_PLUGINS_REST_CLIENT_CONFIG_*`: one for most fields in `rest.Config` so that a REST client can be built.~
  - `KUBECTL_PLUGINS_CALLER`: path to `kubectl`
  - `KUBECTL_PLUGINS_CURRENT_NAMESPACE`: namespace in use
- Adds support for plugins as child of other plugins so that a tree of commands can be built (e.g. `kubectl myplugin list`, `kubectl myplugin add`, etc)

**Release note**:

```release-note
Added support to a hierarchy of kubectl plugins (a tree of plugins as children of other plugins).

Added exported env vars to kubectl plugins so that plugin developers have access to global flags, namespace, the plugin descriptor and the full path to the caller binary.
```
@kubernetes/sig-cli-pr-reviews
2017-05-19 23:29:32 -07:00
Kubernetes Submit Queue e2a9327999 Merge pull request #45707 from Crazykev/cri-experimental
Automatic merge from submit-queue (batch tested with PRs 45996, 46121, 45707, 46011, 45564)

Remove flag `experimental-cri` in e2e-node test

Signed-off-by: Crazykev <crazykev@zju.edu.cn>



**What this PR does / why we need it**: 
This patch remove deprecated flag in node e2e test script, cause kubelet already remove this. Leave this will make kubelet start failed.

**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**: /cc @feiskyer 

**Release note**:

```release-note
NONE
```
2017-05-19 18:57:34 -07:00
Fabiano Franz 18cb56bf78 kubectl plugins have access config, global flags and environment 2017-05-19 19:17:43 -03:00