Commit Graph

47543 Commits

Author SHA1 Message Date
Chao Xu
47b410f58b Remove redundent GetObjectKind() defined on top-level types
TypeMeta is embedded in all these types and TypeMeta has GetObjectKind()
method to implement the runtime.Object interface.
2017-05-04 10:31:58 -07:00
Kubernetes Submit Queue
f84b61b4b1 Merge pull request #45258 from caesarxuchao/control-api-visibility
Automatic merge from submit-queue (batch tested with PRs 44309, 45258)

Control visibility of client-go/pkg/api

k8s.io/client-go/pkg/api is going to disappear after https://github.com/kubernetes/kubernetes/issues/44065 is done. We need to add more dependencies on it.

Currently we still have a few visibility exceptions, we need to fix all of them.
2017-05-03 17:51:05 -07:00
Kubernetes Submit Queue
0be4bf37c2 Merge pull request #44309 from wanghaoran1988/debug_scheduler_flaky
Automatic merge from submit-queue (batch tested with PRs 44309, 45258)

Update debug info for  scheduler priorities flaky tests
2017-05-03 17:51:03 -07:00
Chao Xu
c984468678 control visibility client-go/pkg/api 2017-05-03 14:04:36 -07:00
Kubernetes Submit Queue
e537cec9b0 Merge pull request #45299 from yujuhong/cleanup-trivial
Automatic merge from submit-queue

More dockertools cleanup

This is part of #43234.
2017-05-03 13:57:49 -07:00
Kubernetes Submit Queue
fcd9b7f7ba Merge pull request #44295 from rootfs/azure-devicepath-nil
Automatic merge from submit-queue (batch tested with PRs 45283, 45289, 45248, 44295)

Azure disk: dealing with missing disk probe

**What this PR does / why we need it**:
While Azure disks are expected to attach to SCSI host 3 and above on general purpose instances, on certain Azure instances disks are under SCSI host 2. 

This fix searches all LUNs but excludes those used by Azure sys disks, based on udev rules [here](https://raw.githubusercontent.com/Azure/WALinuxAgent/master/config/66-azure-storage.rules)

**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-05-03 12:08:00 -07:00
Kubernetes Submit Queue
99af041604 Merge pull request #45248 from ixdy/docker-bundle-rule
Automatic merge from submit-queue (batch tested with PRs 45283, 45289, 45248, 44295)

Use docker_bundle rule from new rules_docker repo

**What this PR does / why we need it**: switched to using the new `docker_bundle` rule from `rules_docker` instead of my patched `docker_build` rule. This also brings in some fixes for the docker rules that were missing from my fork.

Additionally, I switched out the `git_repository` rules for `http_archive` rules, since that seems to be recommended by the bazel docs (and might be faster). 

Lastly, I updated the `pkg_tar` rules to use my patch, which doesn't prepend `./` to files inside the tarballs.
This one should likely be merged upstream in the near future.

I think this is the last of the changes necessary to have `bazel run //:ci-artifacts` working properly to support using bazel for e2e in CI.

**Release note**:

```release-note
NONE
```
2017-05-03 12:07:58 -07:00
Kubernetes Submit Queue
8be8f90413 Merge pull request #45289 from ktsakalozos/bug/fixbadrebase
Automatic merge from submit-queue (batch tested with PRs 45283, 45289, 45248, 44295)

Remove offending code due to bad rebase

**What this PR does / why we need it**: Fix bug introduced by bad rebasing

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

```
NONE
```
2017-05-03 12:07:56 -07:00
Kubernetes Submit Queue
99f2cadc5e Merge pull request #45283 from chuckbutler/namespace-proof-fix
Automatic merge from submit-queue

Fixed permissions on namespace actions

closes


**What this PR does / why we need it**: the newly introduced namespace-* actions are failing proof. Setting them as +x resolves proof errors emitting from `charm proof`

**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/juju-solutions/bundle-canonical-kubernetes/issues/273

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-03 11:32:47 -07:00
Yu-Ju Hong
51188e6f70 Update bazel files 2017-05-03 11:22:06 -07:00
Yu-Ju Hong
607bdd574d Move docker keyring lookup test to pkg/credentailprovider
Also remove unused image tests in docker_test.go
2017-05-03 11:22:06 -07:00
Yu-Ju Hong
5644587e07 More dockertools cleanup
Move some constants/functions to dockershim and remove unused tests.
2017-05-03 11:22:06 -07:00
Kubernetes Submit Queue
80f26fa8a8 Merge pull request #44523 from caesarxuchao/remove-client-go-api-scheme
Automatic merge from submit-queue

Remove imports of k8s.io/client-go/pkg/api

k8s.io/client-go/pkg/api will be eliminated by #44784, so we need to remove all imports of it.

This PR is large, but mostly simple changes, like:
* using constants defined in the v1 package instead of those in the internal package 
* using k8s.io/client-go/kubernetes/scheme.Codecs/Schemes instead of those in k8s.io/client-go/pkg/api
* using `v1.SchemeGroupVersion` instead of `api.Registry.GroupOrDie(api.GroupName).GroupVersion` in tests
* importing `k8s.io/kubernetes/pkg/api` instead of `k8s.io/client-go/pkg/api` if possible

With this PR https://github.com/kubernetes/kubernetes/pull/45159, the only remaining imports of `k8s.io/client-go/pkg/api` are from k8s.io/metrics.
``` bash
$ git grep "\"k8s.io/client-go/pkg/api\"" | grep -v "staging/src/k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/install/install.go:25:	"k8s.io/client-go/pkg/api"
Binary file staging/src/k8s.io/metrics/pkg/apis/custom_metrics/types.generated.go matches
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/types.go:22:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/apis/metrics/install/install.go:26:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/apis/metrics/types.go:21:	"k8s.io/client-go/pkg/api"
Binary file staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1/zz_generated.conversion.go matches
Binary file staging/src/k8s.io/metrics/pkg/apis/metrics/zz_generated.deepcopy.go matches
staging/src/k8s.io/metrics/pkg/client/clientset_generated/clientset/fake/clientset_generated.go:24:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/client/custom_metrics/client.go:26:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/client/custom_metrics/fake/fake_client.go:24:	"k8s.io/client-go/pkg/api"
```
2017-05-03 10:46:34 -07:00
Huamin Chen
f14a0744e6 Azure disk: dealing with missing disk probe
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-05-03 17:33:17 +00:00
Jeff Grafton
e231d4280b Replace git_repository with http_archive and use ixdy's fork of bazel tools for pkg_tar 2017-05-03 10:13:06 -07:00
Kubernetes Submit Queue
c320218d7b Merge pull request #45282 from feiskyer/gc-fix
Automatic merge from submit-queue

Fix flake in sandbox garbage collection

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

Sorry for introducing a flakiness in #43053: the creation time is not set in `makeGCSandbox`, which caused the garbage collection removes sandboxes randomly if there are more than one dead sandboxes belonging to same pod.

This PR fixes the flakiness in sandbox garbage collection.

**Which issue this PR fixes** 

Fixes #45281 #45274.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```


cc/ @Random-Liu @shashidharatd @kubernetes/sig-node-bugs
2017-05-03 09:38:47 -07:00
Kubernetes Submit Queue
4ff9234eec Merge pull request #44908 from suyogbarve/proxybug
Automatic merge from submit-queue

allow kubectl proxy to handle specified reject methods and default to…

What this PR does / why we need it:
"kubect proxy" command had a bug and was not supporting feature to reject http methods
--reject-methods='POST,PUT,PATCH'
this was due to missing filter for RejectMethods in kubectl/cmd/proxy.go
This PR adds the desired flag, however to retain the current behaviour of "kubectl proxy" the Default Rejected methods are changed from 'POST,PUT,PATCH' to '^$' i.e. none.

Issue not created and no existing issue found
2017-05-03 08:55:18 -07:00
Konstantinos Tsakalozos
7cf2b0b263 Remove offending code due to bad rebase 2017-05-03 18:29:51 +03:00
Charles Butler
d1d11a9c55 Fixed permissions on namespace actions
the newly introduced namespace-* actions are failing proof. Setting them
as +x resolves proof errors emitting from `charm proof`

closes
https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/273
2017-05-03 08:41:48 -05:00
Pengfei Ni
f4cb35846e Fix flake in sandbox garbage collection 2017-05-03 21:05:24 +08:00
Kubernetes Submit Queue
df8551acd2 Merge pull request #45115 from deads2k/tpr-07-types
Automatic merge from submit-queue (batch tested with PRs 45272, 45115)

initial types for TPRs

This pull starts creating the types described by https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md .  In the initial pull different names were suggested.  I've started this pull with `CustomResource.apiextensions.k8s.io`.

The structure begins as a separate API server to facilitate rapid prototyping and experimentation, but the end result will be added to the end of the `kube-apiserver` chain as described in https://github.com/kubernetes/community/blob/master/sig-api-machinery/api-extensions-position-statement.md .

Because it is separate to start (not included in any default server), I don't think we need a perfect name, but I'd like to be close.

@kubernetes/sig-api-machinery-misc @enisoc @smarterclayton @erictune
2017-05-03 05:36:59 -07:00
Kubernetes Submit Queue
d21fa462aa Merge pull request #45272 from sttts/sttts-unsafe-guess-kindtoresource
Automatic merge from submit-queue (batch tested with PRs 45272, 45115)

apimachinery: make explicit that meta.KindToResource is only a guess

All non-test code using `KindToResource` is suspicious and should be fixed with a real RESTMapper.
2017-05-03 05:36:57 -07:00
Kubernetes Submit Queue
868da1e08b Merge pull request #45265 from nikhiljindal/fixService
Automatic merge from submit-queue

Add wait for federated service deletion

Fixes the flaky kubectl tests https://github.com/kubernetes/kubernetes/pull/44987#issuecomment-298790335, https://github.com/kubernetes/kubernetes/issues/45264

service deletion is not instantaneous in federation.

The fix is same as https://github.com/kubernetes/kubernetes/pull/42674.
We need the fix now for services since we recently fixed federation service controller so that it runs successfully now.

cc @shashidharatd
2017-05-03 01:52:50 -07:00
Kubernetes Submit Queue
451b7ca7f7 Merge pull request #43053 from feiskyer/sandbox_gc
Automatic merge from submit-queue (batch tested with PRs 45005, 43053)

kubelet: fix sandbox garbage collection

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

Currently, kuberuntime garbage collection can't distinguish just-created sandboxes from failed sandboxes. Especially when the time from sandbox creation to ready is longer than GC's minAge. In such cases, those sandboxes may be garbage collected early before they are ready.

This PR removes `sandboxMinGCAge` and only garbage collect sandboxes when 

* they are containing no containers at all
* and not the latest sandbox if it is belonging to an existing pod.

**Which issue this PR fixes** 

Fixes #42856.

**Release note**:

```release-note
NONE
```

cc @yujuhong @Random-Liu
2017-05-03 01:07:07 -07:00
Kubernetes Submit Queue
d2a31cf321 Merge pull request #45005 from FengyunPan/fix-e2e-federation
Automatic merge from submit-queue (batch tested with PRs 45005, 43053)

[Federation]Fix e2e_federation: pass clusterIngress out

None
2017-05-03 01:07:05 -07:00
Dr. Stefan Schimanski
b0b711119b apimachinery: rename meta.{ -> UnsafeGuess}KindToResource 2017-05-03 09:49:02 +02:00
Dr. Stefan Schimanski
20df61009d Get rid of meta.KindToResource in rollingupdate 2017-05-03 09:49:02 +02:00
Kubernetes Submit Queue
2371a70b7a Merge pull request #45166 from feiskyer/namespace-network
Automatic merge from submit-queue (batch tested with PRs 45013, 45166)

CRI: remove PodSandboxStatus.Linux.Namespaces.Network

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

PodSandboxStatus.Linux.Namespaces.Network is not used, so this PR removes it from CRI.

**Which issue this PR fixes**

Closes: #44972

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove PodSandboxStatus.Linux.Namespaces.Network from CRI.
```

/assign @Random-Liu @yujuhong
2017-05-02 23:46:03 -07:00
Pengfei Ni
1c593bd62c Update test for sandbox gc 2017-05-03 14:29:16 +08:00
Pengfei Ni
691f0482fb Fix sandbox garbage collection.
Sandboxes are garbage collected only when they are containing no containers at
all and not the latest sandbox if it is belonging to an existing pod.
2017-05-03 14:29:16 +08:00
Kubernetes Submit Queue
960ff51d07 Merge pull request #45013 from NickrenREN/cinder-example
Automatic merge from submit-queue

Add cinder volume examples

I can not find cinder examples,add in packages examples/volume and examples/persistent-volume-provisioning


**Release note**:
```release-note
NONE
```
2017-05-02 23:06:42 -07:00
Kubernetes Submit Queue
0a87487bda Merge pull request #38161 from chentao1596/correct-description-kubelet-get-pod-from-path
Automatic merge from submit-queue

kubelet/get-pods-from-path: correct description of implemention

**What this PR does / why we need it**:
    I find this description does not follow the current implementation, it should be describe like this according to my understanding of the source code.
2017-05-02 22:24:51 -07:00
nikhiljindal
a88f28772a Add wait for federated service deletion 2017-05-02 22:12:03 -07:00
Kubernetes Submit Queue
3fe19c324c Merge pull request #45246 from psiwczak/master
Automatic merge from submit-queue (batch tested with PRs 45219, 45246)

Fixed misspelled http URL in the cluster-dns example

**What this PR does / why we need it**:
Fixes wrong  http URL in the examples/cluster-dns. 

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

**Release note**:
none
2017-05-02 22:08:03 -07:00
Kubernetes Submit Queue
19423e62af Merge pull request #45219 from CaoShuFeng/golint
Automatic merge from submit-queue

Fix golint verify error

I don't know why CI pass the hack/verify-golint.sh test.
But in my environment I get this:

> staging/src/k8s.io/client-go/util/workqueue/queue_test.go is in package workqueue_test, not workqueue
Errors from golint:
test/integration/apiserver/apiserver_test.go:102:13: should omit type string from declaration of var cascDel; it will be inferred from the right-hand side
Please fix the above errors. You can test via "golint" and commit the result.
!!! Error in hack/verify-golint.sh:98
  Error in hack/verify-golint.sh:98. 'false' exited with status 1
Call stack:
  1: hack/verify-golint.sh:98 main(...)
Exiting with status 1

This change fix this err in my environment.
**Release note**:

```NONE
```
2017-05-02 21:41:01 -07:00
Kubernetes Submit Queue
3badd5f325 Merge pull request #44949 from zhangxiaoyu-zidif/update-link-changelog
Automatic merge from submit-queue

CHANGELOG.md: update outdated link

I am not sure that if the file was generated automatically. 
But I find some links were outdated. 
Release note:

NONE
2017-05-02 20:56:08 -07:00
Kubernetes Submit Queue
2a87baba6c Merge pull request #45199 from yujuhong/clean-up-dockertools
Automatic merge from submit-queue

Clean up code in dockertools

Move functions and sub packages to dockershim.
Part of #43234.
2017-05-02 20:55:59 -07:00
Chao Xu
d978f22e04 remove references to client-go/pkg/api 2017-05-02 17:16:06 -07:00
Kubernetes Submit Queue
fc51574bb4 Merge pull request #44913 from zhangxiaoyu-zidif/cleancode-util-for-err
Automatic merge from submit-queue

cleancode:util.go

cleancode, the modification point make code clean and light
2017-05-02 17:03:26 -07:00
Jeff Grafton
45a6455ac7 Use new docker_bundle rule instead of ixdy's custom docker_build rule 2017-05-02 16:30:24 -07:00
Kubernetes Submit Queue
36590b0621 Merge pull request #45243 from mikedanese/skip-integration
Automatic merge from submit-queue (batch tested with PRs 45120, 45243)

skip integration test when run make bazel-test

we should opt for a seperate target for integration tests. This is breaking @deads2k who is trying to add an integration test in staging.
2017-05-02 16:05:49 -07:00
Kubernetes Submit Queue
46971d6d21 Merge pull request #45120 from ixdy/bazel-push-build
Automatic merge from submit-queue

Also upload debs to bin/$OS/$ARCH

**What this PR does / why we need it**: the bazel-built debs are used by the kubeadm e2e tests, so upload them too.

https://github.com/kubernetes/kubernetes/pull/44591#issuecomment-298084453

/assign @pipejakob 
/cc @mikedanese @spxtr 

**Release note**:

```release-note
NONE
```
2017-05-02 15:40:35 -07:00
Kubernetes Submit Queue
cf6c279f13 Merge pull request #45242 from spiffxp/skip-metrics-procfs-test
Automatic merge from submit-queue (batch tested with PRs 45125, 45242)

skip procfs-dependent metrics test if not on linux

**What this PR does / why we need it**: #40774 removed build tags on integration tests, which uncovered the fact that a test in `test/integration/metrics` relies on `procfs`. This PR follows the convention used in `pkg/util/procfs` to gate the test on `runtime.GOOS`

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

/cc @kubernetes/sig-testing-pr-reviews
2017-05-02 15:08:56 -07:00
Kubernetes Submit Queue
52a18e9791 Merge pull request #45125 from spiffxp/update-labels-yaml
Automatic merge from submit-queue (batch tested with PRs 45125, 45242)

Update labels.yaml with sig labels

**What this PR does / why we need it**: Updates labels.yaml to reflect the state of labels in this repo.  Consumed by https://github.com/kubernetes/test-infra/blob/master/mungegithub/mungers/check-labels.go to ensure these labels continue to exist.

**Release note**:
```release-note
NONE
```
2017-05-02 15:08:54 -07:00
Piotr Siwczak
2dffd46635 Fixed typo in the dns name 2017-05-02 14:40:24 -07:00
Mike Danese
01b736c4d9 skip integration test when run make bazel-test
we should opt for a seperate target for integration tests.
2017-05-02 14:12:00 -07:00
Kubernetes Submit Queue
0b469f4cb5 Merge pull request #45230 from dims/single-ca-cert
Automatic merge from submit-queue (batch tested with PRs 45239, 45230)

Create a single CA for both client and server certs

**What this PR does / why we need it**:
The following test:
"Certificates API [It] should support building a client with a CSR"

fails with local-up-cluster, but works in the existing CI jobs. This
is because the other CI jobs use a single CA cert while local-up-cluster
can use 2 different sets of CA(s). We need a way to mimic the other
CI jobs (or alternatively change everything to have separate CA's). Just
updating local-up-cluster with a flag seems to be the easy route.

**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-05-02 14:11:53 -07:00
Kubernetes Submit Queue
f3b0ad25c3 Merge pull request #45239 from ixdy/bazel-cloud-controller-manager-docker
Automatic merge from submit-queue (batch tested with PRs 45239, 45230)

Update bazel build to dockerize cloud-controller-manager

**What this PR does / why we need it**: followup to #45154. Also added a comment so that hopefully this sort of followup isn't needed again. :)

**Release note**:

```release-note
NONE
```

/assign @mikedanese @luxas
2017-05-02 14:11:51 -07:00
Aaron Crickenberger
276704ee22 skip procfs-dependent metrics test if not on linux 2017-05-02 13:34:20 -07:00
Kubernetes Submit Queue
7f2011c160 Merge pull request #45225 from FengyunPan/update-event-type
Automatic merge from submit-queue (batch tested with PRs 40544, 44338, 45225)

[Federation]Update event type

Use EventTypeWarning instead of EventTypeNormal when get failure
Left behind after pr #40296
2017-05-02 13:03:59 -07:00