Commit Graph

47278 Commits (09747e6bee78fb8b71356309d6ede84142aee9eb)

Author SHA1 Message Date
Kubernetes Submit Queue ed539fb76f Merge pull request #39404 from adohe/refactor_edit
Automatic merge from submit-queue

add EditOptions to make edit reusable

FYI. Added `EditOptions` to decouple edit implementation from cobra command, thus make edit reusable. Once this get merged, we can refactor `create` commands to put them in their own package. @kubernetes/sig-cli-misc please give a quick review, and I would like to get this merged asap.
2017-04-24 16:20:39 -07:00
Guangya Liu 593336bd9d Improved code coverage for /pkg/kubelet/types 2017-04-25 06:25:21 +08:00
Jeremy Whitlock d15dba7e8b apiserver: add pkg/util/webhook tests
This commit adds tests for pkg/util/webhooks.  The purpose of this was
not only for better code coverage but also to alleviate the need for
consumers to write their own tests for core functionality.
2017-04-24 16:13:17 -06:00
Jonathan MacMillan 7e15b924e7 [Federation] Only attempt to log information about pods in federation/cluster/log-dump.sh if those pods exist. 2017-04-24 14:12:03 -07:00
Kubernetes Submit Queue 6236dfb594 Merge pull request #44859 from sttts/sttts-e2e-rs-nil
Automatic merge from submit-queue (batch tested with PRs 44788, 44859)

e2e: handle nil ReplicaSet in checkDeploymentRevision
2017-04-24 12:53:59 -07:00
Ricky Pai e21da839e5 extract content-generation concern from `ensureHostsFile`
add tests to assert the output of `ensureHostsFile`
2017-04-24 12:33:45 -07:00
Kubernetes Submit Queue a9454baba4 Merge pull request #44788 from enisoc/patch-numeric
Automatic merge from submit-queue

PATCH: Fix erroneous meaningful conflict for numeric values.

The wrong json package was used, resulting in patches being unmarshaled with numbers as float64 rather than int64. This in turn confused `HasConflicts()` which expects numeric types to match.

The end result was false positives of meaningful conflicts, such as:

```
there is a meaningful conflict (firstResourceVersion: "8517", currentResourceVersion: "8519"):
 diff1={"metadata":{"resourceVersion":"8519"},"spec":{"replicas":0},"status":"conditions":null,"fullyLabeledReplicas":null,"replicas":0}}
, diff2={"spec":{"replicas":0}}
```

This is branched from a discussion on https://github.com/kubernetes/kubernetes/pull/43469.

```release-note
Fix false positive "meaningful conflict" detection for strategic merge patch with integer values.
```
2017-04-24 12:11:29 -07:00
Jordan Liggitt 1305559abb
Stop treating in-cluster-config namespace as an override 2017-04-24 14:33:02 -04:00
Kubernetes Submit Queue 130a56ce59 Merge pull request #44863 from chuckbutler/node-port-documentation
Automatic merge from submit-queue

Document the NodePort workflow for kubernetes-worker

closes
https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/259

NodePort networking model has no daemon listening to lend a hand so any
NodePort services will need to be manually declared and exposed.


**What this PR does / why we need it**: Updates the documentation around using NodePort networking with the kubernetes-worker charm.


**Special notes for your reviewer**: This is a working fix for using NodePort style networking with kubernetes-workers in the juju ecosystem. Declaring a simple workload as type NodePort, then following the updated documentation will make it reachable via the open-world network connection.

**Release note**:

```release-note
Documented NodePort networking for CDK.
```
2017-04-24 11:22:46 -07:00
Kubernetes Submit Queue f0ce5bd8d8 Merge pull request #44672 from kargakis/update-deployment-completeness
Automatic merge from submit-queue (batch tested with PRs 43575, 44672)

Update deployment and daemonset completeness checks

maxUnavailable being taken into account for deployment completeness has caused a lot of confusion (https://github.com/kubernetes/kubernetes/issues/44395, https://github.com/kubernetes/kubernetes/issues/44657, https://github.com/kubernetes/kubernetes/issues/40496, others as well I am sure) so I am willing to just stop using it and require all of the new Pods for a Deployment to be available for the Deployment to be considered complete (hence both `rollout status` and ProgressDeadlineSeconds will not be successful in cases where a 1-pod Deployment never becomes successful because its Pod never transitions to ready).

@kubernetes/sig-apps-api-reviews thoughts?
```release-note
Deployments and DaemonSets are now considered complete once all of the new pods are up and running - affects `kubectl rollout status` (and ProgressDeadlineSeconds for Deployments)
```
Fixes https://github.com/kubernetes/kubernetes/issues/44395
2017-04-24 10:34:00 -07:00
Kubernetes Submit Queue 902d53d5e7 Merge pull request #43575 from dcbw/iptables-restore-lock
Automatic merge from submit-queue (batch tested with PRs 43575, 44672)

util/iptables: check for and use new iptables-restore 'wait' argument

iptables-restore did not previously perform any locking, meaning that
when callers (like kube-proxy) asked iptables-restore to write large
numbers of rules, the iptables-restore process might run in parallel
with other 'iptables' invocations in kubelet (hostports), docker,
and other software.  This causes errors like:

"CNI request failed with status 400: 'Failed to ensure that nat chain
POSTROUTING jumps to MASQUERADE: error checking rule: exit status 4:
iptables: Resource temporarily  unavailable."

or from Docker:

"Failed to allocate and map port 1095-1095: iptables failed:
iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 1095
-j DNAT --to-destination 10.1.0.2:1095 ! -i lbr0: iptables:
Resource temporarily unavailable.\n (exit status 4)"

iptables-restore "wait" functionality was added in iptables git
commit 999eaa241212d3952ddff39a99d0d55a74e3639e which
is not yet in a release.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1417234

@eparis @knobunc @kubernetes/rh-networking @kubernetes/sig-network-misc @freehan @thockin @brendandburns
2017-04-24 10:33:58 -07:00
Davanum Srinivas eb9ee75c28 Enable default signer implementation
The Kubernetes controller manager provides a default implementation
of a signer. We should enable it by passing the --cluster-signing-cert-file
and --cluster-signing-key-file parameters to the controller manager
with paths to your Certificate Authority’s keypair. Hoping this will
help pass the "Certificates API [It] should support building a client with a CSR"
e2e test when run against k8s started using local-up-cluster.sh
2017-04-24 13:20:52 -04:00
Matthew Wong 0dc99ef80f Validate etcd only when expecting to run etcd 2017-04-24 12:28:19 -04:00
Charles Butler 6c2fa2f05e Document the NodePort workflow for kubernetes-worker
closes
https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/259

NodePort networking model has no daemon listening to lend a hand so any
NodePort services will need to be manually declared and exposed.
2017-04-24 10:58:38 -05:00
Kubernetes Submit Queue becd626c8e Merge pull request #44849 from dims/remove-unused-method-verify-dns
Automatic merge from submit-queue

Remove unused function - verifyDNSPodIsRunning

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

In ea4a7e24ad, we removed the cluster
DNS verification check from the test, but neglected to remove the
method itself. Let's remove this as it is not used anywhere else.


**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-04-24 08:55:46 -07:00
Marcin Wielgus 1f561d16ff Bump Cluster Autoscaler to 0.5.2 2017-04-24 17:36:34 +02:00
Dr. Stefan Schimanski 6b066ee135 e2e: handle nil ReplicaSet in checkDeploymentRevision
deploymentutil.GetNewReplicaSet is allowed to return nil.
2017-04-24 17:33:44 +02:00
Kubernetes Submit Queue 260e213f26 Merge pull request #44845 from zhangxiaoyu-zidif/fix-configmap-test
Automatic merge from submit-queue

configmap.go: add one initialization symbol
2017-04-24 07:56:09 -07:00
Kubernetes Submit Queue 7e42d3848e Merge pull request #44492 from CaoShuFeng/namer
Automatic merge from submit-queue (batch tested with PRs 44837, 44779, 44492)

remove duplicate code from restful namer

The deleted codes have the same logic with function ObjectName.

**Release note**:

```release-note
```
2017-04-24 07:56:02 -07:00
Kubernetes Submit Queue c90faa8071 Merge pull request #44779 from enj/enj/r/etcd_default_name_copy
Automatic merge from submit-queue (batch tested with PRs 44837, 44779, 44492)

Default ObjectNameFunc for all REST Stores

All `Store`s in Kubernetes follow the same logic for determining the name of an object.  This change makes it so that `CompleteWithOptions` defaults the `ObjectNameFunc` if it is not specified.  Thus a user does not need to remember to use `ObjectMeta.Name`.  Using the wrong field as the name can lead to an object which has a name that bypasses normal object name validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>

cc @liggitt @soltysh for review

**Release note**:

```
NONE
```
2017-04-24 07:55:59 -07:00
Kubernetes Submit Queue 08c5e28904 Merge pull request #44837 from danielqsj/apiissue
Automatic merge from submit-queue

Fix Content-Type error of apis

**What this PR does / why we need it**:
Response's Content-type of `/apis` is `text/plain`, not `application/json`.

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

**Special notes for your reviewer**:
We could use `responsewriters.WriteObjectNegotiated()` to write Content-type correctly.

**Release note**:

```release-note
```
2017-04-24 07:14:33 -07:00
Marcin Wielgus 5082626cfc Print executed cmd in cluster autoscaler e2e tests 2017-04-24 16:12:47 +02:00
Kubernetes Submit Queue 57fdd75cb8 Merge pull request #43440 from CaoShuFeng/audit_port
Automatic merge from submit-queue

Update basic audit filter's comment message

**Release note**:

```NONE
```
2017-04-24 06:27:59 -07:00
Kubernetes Submit Queue b26d902070 Merge pull request #43517 from zjj2wry/007
Automatic merge from submit-queue

unit test for kubectl config set

**What this PR does / why we need it**:
unit test for kubectl config set

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

**Release note**:

```release-note
```
2017-04-24 06:27:52 -07:00
zhangxiaoyu-zidif b5c1aa5210 configmap.go: add one initialization symbol 2017-04-24 21:26:32 +08:00
Kubernetes Submit Queue 7a09f8605f Merge pull request #44850 from crassirostris/sd-logging-e2e-tolerance
Automatic merge from submit-queue

Lower limit for allowed losses in Stackdriver Logging tests
2017-04-24 05:39:47 -07:00
Kubernetes Submit Queue d59cf76a61 Merge pull request #41384 from xilabao/support-create-subresource
Automatic merge from submit-queue

support subresource when running kubectl create role

```
#kubect create role foo --verb=get,list,watch --resource=pods/status
the server doesn't have a resource type "pods/status"
```
2017-04-24 05:39:38 -07:00
Mik Vyatskov e7918897b4 Lower limit for allowed losses in Stackdriver Logging tests 2017-04-24 13:48:08 +02:00
Davanum Srinivas 553ba659dc Remove unused function - verifyDNSPodIsRunning
In ea4a7e24ad, we removed the cluster
DNS verification check from the test, but neglected to remove the
method itself. Let's remove this as it is not used anywhere else.
2017-04-24 07:34:14 -04:00
Mik Vyatskov 5456655a85 Increase timeout for Stackdriver Logging e2e tests 2017-04-24 13:26:23 +02:00
shijunqian 90802b2e3d Fix Content-Type error of apis 2017-04-24 16:12:00 +08:00
Kubernetes Submit Queue ac90c0e45c Merge pull request #44579 from mikedanese/cert-fix
Automatic merge from submit-queue

make certs used in roundtripper_test same as those used in proxy_test

This fixes an invalid cert error in 1.8. Gross copy paste but we will likely never have to do this again.

Part of https://github.com/kubernetes/kubernetes/issues/38228

https://github.com/kubernetes/kubernetes/blame/master/staging/src/k8s.io/apiserver/pkg/endpoints/proxy_test.go#L524-L570
2017-04-23 22:23:36 -07:00
shashidharatd 950db8e0a1 Handle review comments 2017-04-24 10:45:14 +05:30
Kubernetes Submit Queue 56ea95fa83 Merge pull request #44745 from justinsb/lb_recognize_16_unschedulable
Automatic merge from submit-queue

Exclude master from LoadBalancer / NodePort

The servicecontroller documents that the master is excluded from the
LoadBalancer / NodePort, but this is broken for clusters where we are
using taints for the master (as introduced in 1.6), instead of marking
the master as unschedulable.

This restores the desired documented behaviour, by excluding nodes that
are labeled as masters with the new 1.6 labels, even if they use the new
1.6 taints.

Fix #33884

```release-note
Exclude nodes labeled as master from LoadBalancer / NodePort; restores documented behaviour
```
2017-04-23 21:37:42 -07:00
NickrenREN e443277d58 Define const annotation variable once
Move annotation to package imported by both pkg/volume and pkg/volume/validation
2017-04-24 11:54:21 +08:00
Kubernetes Submit Queue ce2f0b1937 Merge pull request #44387 from jamiehannaford/fix-port-allocation
Automatic merge from submit-queue

Use provided VipPortID for OpenStack LB

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

When creating an OpenStack LoadBalancer, Kubernetes will search through the tenant trying to match the LB's VIP with a port. This is problematic because multiple ports may have the same fixed IP, therefore leading to routing inconsistencies. We should use the port ID provided by the LB's response body instead.

**Which issue this PR fixes**:

https://github.com/kubernetes/kubernetes/issues/43909

**Special notes for your reviewer**:

Since this involves non-deterministic testing, it'd be best if we can run this in a staging environment for a few days before merging (say until early next week).

**Release note**:
```release-note
Fixes issue during LB creation where ports where incorrectly assigned to a floating IP
```
2017-04-23 20:50:49 -07:00
Kubernetes Submit Queue 6b496bcb2e Merge pull request #44828 from dims/remove-unused-method-verify-dns
Automatic merge from submit-queue

Remove unused function - verifyDNSPodIsRunning

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

In ea4a7e24ad, we removed the cluster
DNS verification check from the test, but neglected to remove the
method itself.

**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-04-23 20:02:56 -07:00
xilabao 19217bc4a2 support subresource when running kubectl create role 2017-04-24 10:05:47 +08:00
Davanum Srinivas 9b586b0762 Remove unused function - verifyDNSPodIsRunning
In ea4a7e24ad, we removed the cluster
DNS verification check from the test, but neglected to remove the
method itself.
2017-04-23 20:53:34 -04:00
Rodrigo Campos 2eb1583e4b Remove unused chmod/chown abstractions
These abstractions have not been used since I first hacked into
kubernetes, so let's just remove them and add them back if it's needed
later.
2017-04-23 20:25:23 -03:00
Kubernetes Submit Queue 35159f9c45 Merge pull request #41763 from dhilipkumars/ImproveSrvCodeCov
Automatic merge from submit-queue

Improve Service controller's code coverage a little bit

**What this PR does / why we need it**:
Improves the code coverage for Service Controller
Before
```
go test --cover ./pkg/controller/service
ok      k8s.io/kubernetes/pkg/controller/service        0.101s  coverage: 23.4% of statements
```
After
```
go test --cover ./pkg/controller/service/
ok      k8s.io/kubernetes/pkg/controller/service        0.094s  coverage: 62.0% of statements
```

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

**Special notes for your reviewer**:

**Release note**: 

```release-note
NONE
```
2017-04-23 14:29:34 -07:00
Kubernetes Submit Queue e7ca665a0d Merge pull request #43896 from CaoShuFeng/list-meta
Automatic merge from submit-queue

Reorganize the output of "kubectl get -o json"

"resourceVersion" and "selfLink" are members of "metadata" rather than
the list. This change reorganize the struct to provide consistency with
other places.

Before this change:
```json
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
```
After this change:
```json
    "kind": "List",
    "metadata": {
        "resourceVersion": "",
        "selfLink": ""
    }
```

Reference:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go#L57



**Release note**:

```release-note
NONE
```
2017-04-23 10:14:41 -07:00
Kubernetes Submit Queue 1235365aa6 Merge pull request #44801 from klausenbusk/patch-1
Automatic merge from submit-queue

Remove redis-proxy example

The docker image is nowhere to be found, so lets remove it.
There have been a request for the Dockerfile here [1], but nobody
seems to care.


[1] https://github.com/kubernetes/kubernetes/issues/4914#issuecomment-77209779
----
**What this PR does / why we need it**:
This PR remove a k8s manifest which use a image which source is nowhere to be found.

```release-note
Remove redis-proxy.yaml sample, as the image is nowhere to be found.
```
2017-04-23 09:18:51 -07:00
Kubernetes Submit Queue 7875eb28bf Merge pull request #44150 from lukaszo/claim-time
Automatic merge from submit-queue

Skip pods marked for deletion

Fixes #44144
2017-04-23 09:18:44 -07:00
Kristian Klausen eb882a3d1a Remove redis-proxy example
The docker image is nowhere to be found, so lets remove it.
There have been a request for the Dockerfile here [1], but nobody
seems to care.

redis-proxy is replaced with redis-master in test-cmd-util.sh, to
ensure that the tests still works.
The redis-proxy pod in test/fixtures/doc-yaml/user-guide/multi-pod.yaml
is replaced with valid-pod from test/fixtures/doc-yaml/admin/limitrange/valid-pod.yaml,
so redis-proxy is removed every where.

[1] https://github.com/kubernetes/kubernetes/issues/4914#issuecomment-77209779
2017-04-23 16:59:23 +02:00
Shiyang Wang 34a114f6a9 Update to use Semantic.DeepEqual in regsitry 2017-04-23 14:52:05 +08:00
Kubernetes Submit Queue 28b47b5ebd Merge pull request #43703 from metachris/glusterfsReadmeUpdate
Automatic merge from submit-queue

Fixed typos and issues in examples/volumes/glusterfs/README.md

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

This PR updates the GlusterFS `README.md` to fix several typos, outdated documentation and examples that did not work anymore.

**Which issue this PR fixes** 

None

**Special notes for your reviewer**:

None

**Release note**:

`release-note-NONE`
2017-04-22 23:23:40 -07:00
nikhiljindal ee8379c5b3 Autogenerated bazel changes 2017-04-22 18:23:52 -07:00
nikhiljindal c82c1b05fd Updating tests 2017-04-22 18:23:51 -07:00
nikhiljindal df1288c3fa Using apimachinerymeta to manipulate finalizers to remove duplicate code 2017-04-22 18:23:51 -07:00