Commit Graph

22132 Commits (a2f2e1d4918effb4f0994333c7b88086674e4a5b)

Author SHA1 Message Date
Tim Allclair a2f2e1d491 Name change: s/timstclair/tallclair/ 2017-07-10 14:05:46 -07:00
Dr. Stefan Schimanski da3322c2d9 apimachinery: remove unneeded GetObjectKind() impls 2017-07-08 18:37:37 +02:00
Kubernetes Submit Queue a2e463f6d0 Merge pull request #48546 from deads2k/tpr-19-ripples
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

remove dead code

This removes the dead code cruft since we stopped serving TPRs.

ref #48152
2017-07-08 07:09:38 -07:00
Kubernetes Submit Queue d4881dd491 Merge pull request #48560 from nicksardo/gce-network-project
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

GCE: Use network project id for firewall/route mgmt and zone listing

- Introduces a new environment variable for plumbing the network project id which will be used for firewall and route management. fixes #48515
- onXPN is determined by metadata if config is not specified
- Split `if` conditions: fixes #48521
- Remove `getNetworkNameViaAPICall` which was used as a last resort for the `networkURL` (if empty) which was previously filled with the metadata network project & name.

**Release note**:
```release-note
NONE
```
2017-07-08 07:09:36 -07:00
Kubernetes Submit Queue af3dde34a6 Merge pull request #48497 from shiywang/move
Automatic merge from submit-queue (batch tested with PRs 48497, 48604, 48599, 48560, 48546)

Move pkg/apimachinery/test to apimachinery

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

for circular dependency reason, all the test file contain both `"k8s.io/apimachinery/pkg/apis/meta/v1"` and `"k8s.io/apimachinery/pkg/runtime"` is hard to move to a ideal location, so I create a separated test package for those files

I also bump the example package :https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/apiserver/pkg/apis/example here for apimachinery, @sttts told me it's ok if to bump file if only for test   EDIT: seems it's no need to bump, will update soon
```
NONE
```
2017-07-08 07:09:31 -07:00
Kubernetes Submit Queue 9fcb8b847e Merge pull request #48336 from FengyunPan/fix-delete-empty-monitors
Automatic merge from submit-queue

Fix deleting empty monitors

Fix #48094
When create-monitor of cloud-config is false, pool has not monitor
and can not delete empty monitor.

**Release note**:
```release-note
NONE
```
2017-07-08 06:02:45 -07:00
Kubernetes Submit Queue 4361b4d9be Merge pull request #46798 from nikhiljindal/servicesReaper
Automatic merge from submit-queue

Deleting kubectl.ServiceReaper since there is no special service deletion logic

Ref https://github.com/kubernetes/kubernetes/pull/46471 #42594

ServiceReaper does not have any special deletion logic so we dont need it. The generic deletion logic should be enough.
By removing this reaper, service deletion also gets the new wait logic from https://github.com/kubernetes/kubernetes/pull/46471

cc @kubernetes/sig-cli-misc
2017-07-08 05:16:33 -07:00
Kubernetes Submit Queue 954c356dc5 Merge pull request #48348 from FengyunPan/check-openstack-Opts
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

Check opts of cloud config file

Fix #48347
Check opts when register OpenStack CloudProvider rather than
returning error when use opts to create/use cloud resource.

**Release note**:
```release-note
NONE
```
2017-07-07 23:53:40 -07:00
Kubernetes Submit Queue 1edd4462e3 Merge pull request #48529 from mengqiy/kubectl_kubelet
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

eliminate kubectl dependency on kubelet

```
ConfigMirrorAnnotationKey    = v1.MirrorPodAnnotationKey
```
`k8s.io/kubernetes/pkg/kubelet/types.ConfigMirrorAnnotationKey` is defined as `k8s.io/api/core/v1.MirrorPodAnnotationKey`

partially addresses: kubernetes/community#598

```release-note
NONE
```

/assign @monopole @apelisse
2017-07-07 23:53:38 -07:00
Kubernetes Submit Queue 22550b62a6 Merge pull request #48514 from freehan/iptables-lock
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

expose error lock release failure from iptables util

ref: https://github.com/kubernetes/kubernetes/issues/48107
2017-07-07 23:53:36 -07:00
Kubernetes Submit Queue 6cd6d89d40 Merge pull request #48410 from xiangpengzhao/remove-empty-util-dir
Automatic merge from submit-queue (batch tested with PRs 47234, 48410, 48514, 48529, 48348)

Remove unused sub-pkgs in pkg/util

**What this PR does / why we need it**:
Remove no longer used sug-pkgs in pkg/util

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

**Special notes for your reviewer**:
/cc @deads2k 

**Release note**:

```release-note
NONE
```
2017-07-07 23:53:34 -07:00
Shiyang Wang da4a875ef8 Move pkg/apimachinery/test to apimachinery 2017-07-08 08:48:38 +08:00
Kubernetes Submit Queue 62ba00e4e7 Merge pull request #47123 from danwinship/networkpolicy-update
Automatic merge from submit-queue

Allow NetworkPolicy.spec updates

ValidateNetworkPolicyUpdate currently prohibits changes to `spec` in an existing NetworkPolicy. We were going to fix this for 1.7 but I forgot to submit this PR after the main PR merged. Too late for 1.7? @thockin @caseydavenport @cmluciano 

This only changes networking.NetworkPolicy validation at the moment... Should I change extensions.NetworkPolicy validation too?

Fixes #35911

We should add a test to the e2e NetworkPolicy test for this too if this is going to merge.

**Release note**:
```release-note
As part of the NetworkPolicy "v1" changes, it is also now
possible to update the spec field of an existing
NetworkPolicy. (Previously you had to delete and recreate a
NetworkPolicy if you wanted to change it.)
```
2017-07-07 17:45:41 -07:00
Kubernetes Submit Queue f0964b2063 Merge pull request #48524 from freehan/udp-service-flush
Automatic merge from submit-queue (batch tested with PRs 48374, 48524, 48519, 42548, 48615)

flush conntrack for udp service when # of backend changes from 0

fixes: #48370
2017-07-07 14:48:29 -07:00
deads2k 0801ded425 remove dead code 2017-07-07 09:12:29 -04:00
FengyunPan d2ebb60438 Check opts of cloud config file
Fix #48347
Check opts when register OpenStack CloudProvider rather than
returning error when use opts to create/use cloud resource.
2017-07-07 17:05:21 +08: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
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
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
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
Minhan Xia 8de419b19f expose lock release error from iptables util 2017-07-05 14:31:24 -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 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
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
deads2k 254e71bfc6 bulk delete of tpr packages 2017-07-05 11:02:23 -04:00
Kubernetes Submit Queue e5419a56db Merge pull request #47162 from FengyunPan/display-none
Automatic merge from submit-queue (batch tested with PRs 47162, 48444, 48445)

Fix output extra comma

/# kubectl get service
NAME                     CLUSTER-IP       EXTERNAL-IP               PORT(S)          AGE
nginx-service-test       10.200.6.109     _**,80.11.12.10**_              8000:31637/TCP   6s
**(output a extra comma)**
except: 
nginx-service-test       10.200.6.109     _**80.11.12.10**_              8000:31637/TCP   6s

/# cat lb.yaml 
apiVersion: v1 
kind: Service 
metadata: 
  name: nginx-service-lb3
spec: 
  ports: 
    - port: 8000
      targetPort: 80 
      protocol: TCP 
  type: LoadBalancer
  selector: 
    name: nginx
  externalIPs: 
    - 80.11.12.10
    - 1.2.3.6
/# kubectl create -f lb.yaml
2017-07-05 06:39:27 -07:00
Kubernetes Submit Queue c10cc3decd Merge pull request #48353 from deads2k/tpr-17-delete-01
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

remove tpr api access

xref https://github.com/kubernetes/kubernetes/issues/48152

TPR tentacles go pretty deep. This gets us started by removing API access and we'll move down from there.

@kubernetes/sig-api-machinery-misc 
@ironcladlou this should free up the GC implementation since TPRs will no longer be present and failing.

```release-note
Removing TPR api access per https://github.com/kubernetes/kubernetes/issues/48152
```
2017-07-05 05:49:30 -07:00
Kubernetes Submit Queue b12314e246 Merge pull request #48480 from liggitt/namespace-reconcile
Automatic merge from submit-queue (batch tested with PRs 48480, 48353)

Ensure namespace exists as part of RBAC reconciliation

reconciliation can race with the controller that creates the namespaces containing the bootstrap roles. if it loses, it gets a NotFound error trying to create the namespaced role/rolebinding.

Fixes https://github.com/kubernetes/kubeadm/issues/335

```release-note
RBAC role and role-binding reconciliation now ensures namespaces exist when reconciling on startup.
```
2017-07-05 05:49:28 -07:00
Kubernetes Submit Queue bce32b66cd Merge pull request #47217 from CaoShuFeng/trival_fix
Automatic merge from submit-queue

[trivial]fix function name in comment

**Release note**:

```
NONE
```
2017-07-05 03:21:30 -07:00
Kubernetes Submit Queue 62d3e8c25f Merge pull request #48473 from zhangxiaoyu-zidif/refactor-preemption
Automatic merge from submit-queue (batch tested with PRs 48473, 48341)

Refactor podListEqual()

**What this PR does / why we need it**:
To solve the problem:
 this is not correct if there are duplicate pods in the list.
 for example: podListEqual([a, a, b], [a, b, b]) will return true

**Special notes for your reviewer**:
 the original method is O(N^2), while current method is 3* O(N).
I think it is much better.

**Release note**:

```release-note
NONE
```
2017-07-05 03:09:23 -07:00
Kubernetes Submit Queue 54e7755775 Merge pull request #48383 from gyliu513/refactor-daemon
Automatic merge from submit-queue

Factored out simulate from nodeShouldRunDaemonPod.

Addressed comments from https://github.com/kubernetes/kubernetes/pull/48189#issuecomment-312223162



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

/sig apps
2017-07-05 01:53:04 -07:00
zhangxiaoyu-zidif e6c95e7a5c fix-review 2017-07-05 15:40:51 +08:00