Commit Graph

50984 Commits (a2f2e1d4918effb4f0994333c7b88086674e4a5b)

Author SHA1 Message Date
Andrew Rynhard 38c6e83033 Use Secrets for files that self-hosted pods depend on 2017-07-06 20:36:18 -07:00
Nick Sardo 62d13f1379 Use API that utilizes networkProjectId 2017-07-06 18:13:02 -07:00
Kubernetes Submit Queue a9bf44101b Merge pull request #48539 from dims/volunteer-openstack-provider
Automatic merge from submit-queue

Volunteer to help with OpenStack provider reviews

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

I'd like to help with keeping the OpenStack cloud provider up-to-date

**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-07-06 17:41:34 -07:00
Nick Sardo 06e328627c Use network project id for firewall/route mgmt and zone listing 2017-07-06 16:58:27 -07:00
Minhan Xia 68a2749b28 fix unit tests 2017-07-06 16:01:03 -07:00
Minhan Xia 46d3e83caf refactor updateEndpointMap and updateServiceMap results 2017-07-06 16:00:57 -07:00
Minhan Xia 25ac521f88 flush conntrack entry for udp service when # of backend changes from 0 to non-0 2017-07-06 15:12:44 -07:00
Kubernetes Submit Queue 7df2bce1ec Merge pull request #48269 from FengyunPan/add-gc-metric
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Update comment for garbagecollector

Update comment for garbagecollector, update not exist func.

**Release note**:
```release-note
NONE
```
2017-07-06 13:34:46 -07:00
Kubernetes Submit Queue 3863f39588 Merge pull request #48525 from FengyunPan/cleanup-metric
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Cleanup useless metrics.go for garbagecollector

The metrics of garbagecollector are already published with the
workqueue metrics, so metrics.go is useless, let's cleanup it.
See https://github.com/kubernetes/client-go/blob/master/util/workqueue/metrics.go.

**Release note**:

```release-note
NONE
```
2017-07-06 13:34:44 -07:00
Kubernetes Submit Queue 50c6211850 Merge pull request #48518 from smarterclayton/separate_cert_man
Automatic merge from submit-queue (batch tested with PRs 48518, 48525, 48269)

Move the kubelet certificate management code into a single package

Code is very similar and belongs together. Will allow future cert callers to potentially make this more generic, as well as to make it easier reuse code elsewhere.
2017-07-06 13:34:42 -07:00
Kubernetes Submit Queue 4e276d49b9 Merge pull request #46044 from pmichali/issue44848a
Automatic merge from submit-queue (batch tested with PRs 47435, 46044)

IPv6 support for getting node IP

As part of ChooseHostInterface(), it will call a function to try to get the
global IP for the host, by looking at all the system interfaces and select
the first IP that is not a loopback, link-local, or point-to-point IP.

This commit does the following:

- Allows IPv6 non-local IPs to be selected.
- IPv4 takes priority (checks all interfaces for IPv4 addresses and
  then checks all interfaces for IPv6), for backward compatibility.
- Adds UTs for code coverage (was no coverage of underlying function),
  increasing from 62% to 85%.
- Improved logging and reporting for error conditions.
- Minor renaming of functions and variables for readability.



**What this PR does / why we need it**:
This will be part of several PRs to add IPv6 support in apimachinery area for use by Kubernetes. It partially fixes the issue.

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

**Special notes for your reviewer**:
The intent is to break up the PR 45116 into multiple PRs to take on this change a piece at a time.

**Release note**:

```release-noteNONE
```
2017-07-06 12:43:42 -07:00
Kubernetes Submit Queue b00df7eb89 Merge pull request #47435 from luxas/kubeadm_new_selfhosting
Automatic merge from submit-queue (batch tested with PRs 47435, 46044)

kubeadm: Make self-hosting work and split it out to a phase

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

 - Removes the old self-hosting code
 - Puts the new self-hosting code in `phases/selfhosting`
   - The new code reads manifests from disk (static pods)...
   - ...mutates the PodSpec as necessary...
   - ...and posts the DaemonSet to the API Server...
   - ...and waits for it to come up
 - Uses DaemonSets for all control plane components
 - Creates a `kubeadm alpha phase selfhosting` command that can be invoked against any kubeadm-cluster after install.

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

fixes: https://github.com/kubernetes/kubeadm/issues/127
(large part of at least)

**Special notes for your reviewer**:

Please only review the fourth commit, based on https://github.com/kubernetes/kubernetes/pull/47345

**Release note**:

```release-note
kubeadm: Make self-hosting work by using DaemonSets and split it out to a phase that can be invoked via the CLI
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @jbeda
2017-07-06 12:43:39 -07:00
Clayton Coleman 01c9b6ce8f
Kubelet run() should accept partial KubeletDeps
This is used by integrators that want to perform partial overrides of
key interfaces. Refactors the run() method to fit the existing style and
preserve the existing behavior, but allow (for instance) client
bootstrap and cert refresh even when some dependencies are injected.
2017-07-06 15:06:25 -04:00
Kubernetes Submit Queue 756a814042 Merge pull request #43674 from shiywang/fixjsonpath
Automatic merge from submit-queue (batch tested with PRs 48538, 43674)

fix JSONPath parser will not filter strings containing parentheses

Fixes https://github.com/kubernetes/client-go/issues/158
@mtaufen  @daizuozhuo @caesarxuchao
2017-07-06 11:21:28 -07:00
Lucas Käldström 9f1c5a6f0f
kubeadm self-hosting: unit tests and bazel 2017-07-06 20:54:47 +03:00
Lucas Käldström d14478f27a
kubeadm: Make self-hosting work and split out to a phase 2017-07-06 20:54:15 +03:00
Kubernetes Submit Queue 14cd03aed6 Merge pull request #48538 from GheRivero/kubeadm_nodename
Automatic merge from submit-queue

Add node-name flag to `join` phase

**What this PR does / why we need it**: Allow to specify a node-name instead of relaying in `os.Hostname()`
This is useful where kubelet use the name given by the cloud-provider to
register the node.


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

**Special notes for your reviewer**:

**Release note**:
```release-note
Added new flag to `kubeadm join`: --node-name, that lets you specify the name of the Node object that's gonna be created
```
2017-07-06 10:52:41 -07:00
Kubernetes Submit Queue aef4010592 Merge pull request #46228 from jayunit100/scheduler_perf_owners
Automatic merge from submit-queue

Add ownership for the future of scheduler_perf and kubemark

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

The scheduler_perf project is cross-cutting with the other goals of the performance and scale initiatives, so, I've put together a list of interested parties who have been running, using, and contributing to it.

cc @kubernetes/sig-scheduling-pr-reviews @ravisantoshgudimetla @sjug
2017-07-06 10:02:21 -07:00
Kubernetes Submit Queue c75170ad8e Merge pull request #46848 from zjj2wry/err_message
Automatic merge from submit-queue

Fix some err message

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

**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-07-06 10:02:03 -07:00
Kubernetes Submit Queue f177389436 Merge pull request #48536 from CaoShuFeng/application/json
Automatic merge from submit-queue

Fix invalid Content-Type for 403 error

https://github.com/kubernetes/kubernetes/pull/47384 makes 403 errors return Status Object. However the Content-Type is still "text/plain"
This change fixes it.

Before this change:
kubectl get pods --as=tom
Error from server (Forbidden): {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"\" is forbidden: User \"tom\" cannot list pods in the namespace \"default\".","reason":"Forbidden","details":{"kind":"pods"},"code":403} (get pods)

After this change:
$ kubectl get pods --as=tom
Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".



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

**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-07-06 08:52:09 -07:00
Davanum Srinivas 927a4a0a68 Volunteer to help with OpenStack provider reviews
I'd like to help with keeping the OpenStack cloud provider up-to-date
2017-07-06 08:43:43 -04:00
Cao Shufeng 36e0a5ed14 Fix invalid Content-Type for 403 error
https://github.com/kubernetes/kubernetes/pull/47384 makes 403 errors
return Status Object. How the Content-Type is still "text/plain"
This change fix it.
2017-07-06 20:22:43 +08:00
Ghe Rivero 2e2a81578b Add node-name flag to `join` phase
Allow to specify a node-name instead of relaying in `os.Hostname()`
This is useful where kubelet use the name given by the cloud-provider to
register the node.

Partially fix: kubernetes/kubeadm#64
2017-07-06 13:58:14 +02:00
Kubernetes Submit Queue 20e629b1c6 Merge pull request #44394 from rthallisey/pre-existing-provider
Automatic merge from submit-queue

Launch kubemark with an existing Kubemark master

In order to expand the use of kubemark, allow developers to use kubemark with a pre-existing Kubernetes cluster.

Ref issue  #44393
2017-07-06 04:41:53 -07:00
Kubernetes Submit Queue 40825b26d1 Merge pull request #48492 from CaoShuFeng/CanonicalHeaderKey
Automatic merge from submit-queue

Fix Audit-ID header key

Now http header key "Audit-ID" doesn't have effect, because golang
automaticly transforms "Audit-ID" into "Audit-Id". This change use
http.Header.Get() function to canonicalize "Audit-ID" to "Audit-Id".


**Release note**:

```
NONE
```
2017-07-06 03:58:25 -07:00
Cao Shufeng f21bc7bb9a Fix Audit-ID header key
Now http header key "Audit-ID" doesn't have effect, because golang
automaticly transforms "Audit-ID" into "Audit-Id". This change use
http.Header.Get() function to canonicalize "Audit-ID" to "Audit-Id".
2017-07-06 15:29:00 +08:00
Kubernetes Submit Queue 9cfb0ae565 Merge pull request #48508 from mengqiy/fix_term
Automatic merge from submit-queue

fix cross build

Fix the issue introduced in #48299 which breaks cross-build (https://github.com/kubernetes/kubernetes/pull/48299#issuecomment-312846398).
move setsize.go and setsize_unsupported.go back to util/term for kubelet.
move unmark_windows.go as well.

```release-note
NONE
```
2017-07-06 00:08:49 -07:00
Kubernetes Submit Queue 9dd6a935fc Merge pull request #48501 from FengyunPan/enable-ServiceAffinity
Automatic merge from submit-queue

Enable Service Affinity for OpenStack cloudprovider

Fix issue: #48500
Kubernetes's OpenStack cloudprovider can't set persistence to "SOURCE_IP"

**Release note**:
```release-note
NONE
```
2017-07-05 20:45:26 -07:00
ymqytw b336691ca3 eliminate kubectl dependency on kubelet 2017-07-05 20:23:30 -07:00
FengyunPan 154ab548f9 Cleanup useless metrics.go for garbagecollector
The metrics of garbagecollector are already published with the
workqueue metrics, so metrics.go is useless, let's cleanup it.
See https://github.com/kubernetes/client-go/blob/master/util/workqueue/metrics.go.
2017-07-06 09:51:39 +08:00
FengyunPan 6ee05783c2 Enable Service Affinity for OpenStack cloudprovider.
Fix issue: #48500
Kubernetes's OpenStack cloudprovider can't set LB's persistence
to "SOURCE_IP".
2017-07-06 09:25:31 +08:00
Kubernetes Submit Queue d816555e44 Merge pull request #48121 from sakshamsharma/add-kms-dep
Automatic merge from submit-queue (batch tested with PRs 48292, 48121)

Add Google cloudkms dependency, add cloudkms service to GCE cloud provider

Required to introduce a Google KMS based envelope encryption, which shall allow encrypting secrets at rest using KEK-DEK scheme.

The above requires KMS API to create/delete KeyRings and CryptoKeys, and Encrypt/Decrypt data.

Should target release 1.8

@jcbsmpsn 

Update: It appears that Godep only allows dependencies which are in use. We may have to modify this PR to include some Google KMS code.

Progresses #48522
2017-07-05 17:41:40 -07:00
Kubernetes Submit Queue c0c3fe011c Merge pull request #48292 from mml/fnord
Automatic merge from submit-queue (batch tested with PRs 48292, 48121)

Return a slightly more verbose error when "go get" fails.
2017-07-05 17:41:38 -07:00
Kubernetes Submit Queue b39a0a7482 Merge pull request #48489 from xiangpengzhao/check-golint
Automatic merge from submit-queue (batch tested with PRs 48309, 48489)

Check if golint exists first in hack/verify-golint.sh

**What this PR does / why we need it**:
Check if golint exists first in hack/verify-golint.sh

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

**Special notes for your reviewer**:
nope.

**Release note**:

```release-note
NONE
```
2017-07-05 15:50:12 -07:00
Clayton Coleman b8e662fcea
Move the kubelet certificate management code into a single package
Code is very similar and belongs together.
2017-07-05 18:11:49 -04:00
Kubernetes Submit Queue afc67bdb6c Merge pull request #48309 from MrHohn/e2e-fix-ingress-tag
Automatic merge from submit-queue

[e2e-ingress] Get node tag from instance under GKE

**What this PR does / why we need it**: Making ingress CI green again.

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

**Special notes for your reviewer**:
/assign @nicksardo 

**Release note**:

```release-note
NONE
```
2017-07-05 15:10:16 -07:00
Minhan Xia 8de419b19f expose lock release error from iptables util 2017-07-05 14:31:24 -07:00
Matt Liggett 421166db0f Fix e2e_test.go 2017-07-05 14:24:25 -07:00
Kubernetes Submit Queue 145976f72a Merge pull request #48194 from k82cn/k8s_48173
Automatic merge from submit-queue (batch tested with PRs 47327, 48194)

Checked container spec when killing container.

**What this PR does / why we need it**:
Checked container spec when getting container, return error if failed.

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

**Release note**:
```release-note-none
```
2017-07-05 14:21:39 -07:00
Kubernetes Submit Queue 67da2da32f Merge pull request #47327 from xingzhou/remove-error
Automatic merge from submit-queue (batch tested with PRs 47327, 48194)

Remove useless error

While doing https://github.com/kubernetes/kubernetes/pull/44898, found an useless return error.

**Release note**:
```
None
```
2017-07-05 14:21:36 -07:00
Kubernetes Submit Queue 3f0141edd5 Merge pull request #48499 from zhangxiaoyu-zidif/fix-format-changelog-v.1.7.0-alpha.4
Automatic merge from submit-queue

fix style of yaml and text

**What this PR does / why we need it**:
The original format is very odd. So I try to fix it.

**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-07-05 13:28:21 -07:00
Kubernetes Submit Queue 8b58346517 Merge pull request #48502 from ironcladlou/memcachediscovery
Automatic merge from submit-queue (batch tested with PRs 47700, 48464, 48502)

Add a refreshing discovery client

Introduce a discovery client (implementing `CachedDiscoveryInterface`) which caches discovery information in memory and which can be actively refreshed by the user.

This implementation fetches from discovery upon refresh and could later be improved to maintain updates from a watch.

Extracted from https://github.com/kubernetes/kubernetes/pull/47665 and https://github.com/kubernetes/kubernetes/pull/46000 to help reduce the scope of https://github.com/kubernetes/kubernetes/pull/48065.

```release-note
NONE
```
2017-07-05 13:27:46 -07:00
Kubernetes Submit Queue d630c0b6b1 Merge pull request #48464 from wanghaoran1988/fix_err_type
Automatic merge from submit-queue (batch tested with PRs 47700, 48464, 48502)

fix error type

**What this PR does / why we need it**:
invalidToken should be errInvalideToken
**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**:
No
**Release note**:
```
None
```
2017-07-05 13:27:45 -07:00
Kubernetes Submit Queue 154bf490bb Merge pull request #47700 from JulienBalestra/rkt-systemd-unit-limitnofile
Automatic merge from submit-queue (batch tested with PRs 47700, 48464, 48502)

Provide a way to setup the limit NO files for rkt Pods

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

This PR allows to customize the Systemd unit files for rkt pods.
We start with the `systemd-unit-option.rkt.kubernetes.io/LimitNOFILE` to allows to run workloads like etcd, ES in kubernetes with rkt.

**Special notes for your reviewer**:

Once again, I followed @yifan-gu guidelines.
I made a basic check over the values given inside the `systemd-unit-option.rkt.kubernetes.io/LimitNOFILE` (integer and > 0).
If this check fails: I simply ignore the field.
The other implementation would be to fail the whole SetUpPod.

We discussed using a key like `rkt.kubernetes.io/systemd-unit-option/LimitNOFILE` but the validation only allows a single `/` in this field:
```The Deployment "tiller" is invalid: spec.template.annotations: Invalid value: "rkt.kubernetes.io/systemd-unit-option/LimitNOFILE": a qualified name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')```

**Release note**:

```release-note 
NONE
```
2017-07-05 13:27:43 -07:00
Zihong Zheng 532a9d78ad [e2e-ingress] Get node tags from instance under GKE 2017-07-05 13:07:38 -07:00
ymqytw ce561b2044 fix cross build for windows 2017-07-05 12:42:41 -07:00
Kubernetes Submit Queue 96d8ab725b Merge pull request #48498 from deads2k/tpr-18-delete-02
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

bulk delete of tpr packages

related to https://github.com/kubernetes/kubernetes/issues/48152

Bulk delete of the TPR code.  I made the minimal changes outside the delete to try to keep it easy to review.
2017-07-05 12:37:42 -07:00
Kubernetes Submit Queue 1108738200 Merge pull request #48033 from smarterclayton/generic_printer
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

Refactor and simplify generic printer for unknown objects

The first two commits are part of other PRs

@kubernetes/sig-cli-pr-reviews part of the general refactoring for server side print
2017-07-05 12:37:33 -07:00
Kubernetes Submit Queue e14d9a7ffd Merge pull request #48091 from rpothier/kubenet-ipv6
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

Allow Kubenet with ipv6

When running kubenet with IPv6, there is a panic as there
is IPv4 specific code the Event function.
With this change, Event will support IPv4 and IPv6



**What this PR does / why we need it**:
This PR allows kubenet to use IPv6. Currently there is a panic in kubenet_linux.go
as there is IPv4 specific code.

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

**Special notes for your reviewer**:

**Release note**:

```release-note-NONE
```
2017-07-05 12:37:31 -07:00
Kubernetes Submit Queue e16b59aa0a Merge pull request #45467 from ddysher/kubectl-describe-controllerRef
Automatic merge from submit-queue

Fix kubectl describe for pods with controllerRef

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

kubectl describe doesn't take controllerRef into consideration, resulting confusing result. e.g. if we have two replicaset with the same selector, one with 1 replica and the other 2 replicase, then both replicaset will show 3 running pods.

```sh
$ kubectl describe rs replicaset-2
Name:           replicaset-2      
Namespace:      default
Selector:       environment=prod
Labels:         environment=prod
Annotations:    <none>
Replicas:       2 current / 2 desired
Pods Status:    3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:       environment=prod
  Containers:
   created-from-replicaset:
    Image:              nginx
    Port:               
    Environment:        <none>
    Mounts:             <none>
  Volumes:              <none>
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                    -------------   --------        ------                  -------
  5m            5m              1       replicaset-controller                   Normal          SuccessfulCreate        Created pod: replicaset-2-39szb
  5m            5m              1       replicaset-controller                   Normal          SuccessfulCreate        Created pod: replicaset-2-470jr
```


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

xref #24946

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix kubectl describe for pods with controllerRef 
```
2017-07-05 12:25:49 -07:00