Commit Graph

47113 Commits (3e05c8f87ffa2f908faf6b3ccd5d1859b771417f)

Author SHA1 Message Date
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
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
Łukasz Oleś b9611b95f4 Skip pods and replica sets marked for deletion
Fixes #44144
2017-04-23 00:29:48 +02:00
Łukasz Oleś bbedf9e71e Add unit tests for ClaimPods 2017-04-23 00:29:45 +02:00
Kubernetes Submit Queue c289286647 Merge pull request #42612 from CaoShuFeng/create_role_trival
Automatic merge from submit-queue

add "bind" to validResourceVerbs in "create role" cli 

"bind" and "impersonate" are also a legal verbs according this:
https://github.com/kubernetes/kubernetes.github.io/pull/2771/files
**Release note**:

```NONE
```
2017-04-22 12:18:00 -07:00
dhilipkumars fadb275a9a Improve Service controller code coverage a little bit 2017-04-22 22:25:46 +05:30
Michail Kargakis f1e8356265
Deployments complete only when all desired pods are available
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-22 17:18:10 +02:00
Michail Kargakis 0a59f6c487
Revert respecting maxUnavailable for DaemonSets
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-22 17:18:09 +02:00
Michail Kargakis 1923cc60c9
Revert "kubectl: respect deployment strategy parameters for rollout status"
This reverts commit d20ac8766e.
2017-04-22 17:18:06 +02:00
Kubernetes Submit Queue e0ba40b67c Merge pull request #39716 from zhouhaibing089/etcd-health-check
Automatic merge from submit-queue

etcd component status check should include credentials

- [x] Add TLS credentials into `pkg/genericapiserver.Backend`.
- [x] Add TLS credentials into `pkg/registry/core/componentstatus.Server`.
- [x] `pkg/probe/http.httpProber` should accept the TLS credentials.

Now it is working.

```console
$ kubectl get cs
NAME                 STATUS    MESSAGE              ERROR
scheduler            Healthy   ok
controller-manager   Healthy   ok
etcd-0               Healthy   {"health": "true"}
```

Fixes https://github.com/kubernetes/kubernetes/issues/27343.
2017-04-22 07:30:30 -07:00
FengyunPan 3856b5d76c Check errors before logging providers
The logProviders() should check errors firstly, and do not log
providers when providers is null.
2017-04-22 16:55:32 +08:00
Kubernetes Submit Queue a121d1c674 Merge pull request #44404 from bsalamat/config_fix
Automatic merge from submit-queue

Scheduler configurator looks for a specific key in ConfigMap.Data

**What this PR does / why we need it**: Changes scheduler configurator to look for a specific key in ConfigMap.Data instead of the old logic which expected only one entry to exist in the map. The key is a constant whose value is "policy.cfg".

**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
```
2017-04-21 19:50:08 -07:00
Kubernetes Submit Queue 12c6b0c23b Merge pull request #44547 from ketkulka/icmp-reject
Automatic merge from submit-queue

Reject Rules for ExternalIP and svc port if no ep

- Install ICMP Reject Rules for externalIP and svc port
  if no endpoints are present
- Includes Unit Test case
- Fixes #44516 



**What this PR does / why we need it**:
Explained in issue #44516 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
`Fixes #44516`

**Special notes for your reviewer**:
Similar to #43415 
Feedback welcome. Will be happy to improve the patch. 
Unit Test done and passing. 

**Release note**:

```release-note
```
2017-04-21 18:58:38 -07:00
Kubernetes Submit Queue 20dd848e7c Merge pull request #44204 from FengyunPan/optimize-code
Automatic merge from submit-queue

Optimize getProxyMode() to get proxy mode

1. getProxyMode() does not need nodeGetter args after remove
   proxy-mode annotation.
2. we should get error when the version of iptables less than
   MinVersion.
2017-04-21 18:11:07 -07:00
Anthony Yeh 1ab6a33db4
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}}
```
2017-04-21 17:24:07 -07:00
Kubernetes Submit Queue 12adc0e8d3 Merge pull request #44780 from chuckbutler/vsphere-hostname-patch
Automatic merge from submit-queue (batch tested with PRs 42486, 44780)

Hostname patch for vsphere provider limitations with juju

**What this PR does / why we need it**:
The Juju VSphere provider doesn't set a unique hostname which causes issues when scaling worker-pools and they all have the hostname `ubuntuguest`. Instead we assign the JUJU_UNIT_NAME to that hostname to prevent the collision which allows the master to sort out that there are multiple units and not one attempting re-registration.

**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/237

**Special notes for your reviewer**:
The charm-pre-exec runs before it installs the charm software so the validation can happen quickly. Check hostname output, as well as kubectl get no post deployment.


```release-note
Resolves juju vsphere hostname bug showing only a single node in a scaled node-pool.
```
2017-04-21 17:13:57 -07:00
Ketan Kulkarni ac7c026ee7 Reject Rules for ExternalIP and svc port if no ep
- Install ICMP Reject Rules for externalIP and svc port
  if no endpoints are present
- Includes Unit Test case
- Fixes #44516
2017-04-21 16:48:24 -07:00
Kubernetes Submit Queue f11f72ece8 Merge pull request #42486 from jcbsmpsn/certificate-manager-bootstrap
Automatic merge from submit-queue

Add bootstrap support to certificate manager.

Adds configuration options to certificate manager for using bootstrap cert/key
pairs to handle the scenario where new nodes are initialized using a generic
cert/key pair. Bootstrap cert/key pairs are quickly rotated, independent of
duration remaining, so that each kubelet has a unique cert/key pair.
2017-04-21 16:37:44 -07:00
Kubernetes Submit Queue 808982c702 Merge pull request #44733 from enisoc/changelog
Automatic merge from submit-queue

Clean up CHANGELOG.md

There was extra stuff inside the `release-note` block for #42147 that messed up the formatting for CHANGELOG.md. I edited the PR to fix it, but the CHANGELOG.md had already been pushed.
2017-04-21 15:40:05 -07:00
Kubernetes Submit Queue 072c127b47 Merge pull request #44627 from dmmcquay/kubeadm_add_validation_error_code
Automatic merge from submit-queue

kubeadm: add api validation exit code

**What this PR does / why we need it**: This will help with automation and provide more meaningful exit code for api validation. 

WIP to add more meaningful exit codes https://github.com/kubernetes/kubeadm/issues/61

This is a continuation from https://github.com/kubernetes/kubernetes/pull/42825 since it had to be closed.

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

**Release note**:
```release-note
NONE
```
2017-04-21 15:39:56 -07:00
Kubernetes Submit Queue fa750c02be Merge pull request #44570 from liggitt/namespace-icc
Automatic merge from submit-queue

Explicit namespace from kubeconfig should override in-cluster config

Fixes #43662 

If an explicitly specified namespace is read from a kubeconfig file, we should not fall back to in-cluster config

```release-note
kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback.
```
2017-04-21 14:45:23 -07:00
Anthony Yeh 5d0b6dac4d
Clean up CHANGELOG.md 2017-04-21 14:25:53 -07:00
Charles Butler 32acffc7c6 Hostname patch for vsphere provider limitations with juju
This patch sets the hostname to a unique identifier (the juju unit name)
during pre-deployment of the charm. This may not be a FQDN resolveable
hostname but will prevent hostname collision.
2017-04-21 16:25:23 -05:00
Kubernetes Submit Queue 3317957a33 Merge pull request #44730 from kow3ns/fix-44229
Automatic merge from submit-queue (batch tested with PRs 44625, 43594, 44756, 44730)

Check for terminating Pod prior to launching successor in StatefulSet

Modifies sync loop for StatefulSet controller to check if a Pod is terminating before launching its successor. Fixes #44229. Should be cherry picked into 1.6 branch.

**Which issue this PR fixes**
fixes #44229 

```release-note
NONE
```
2017-04-21 13:49:06 -07:00
Kubernetes Submit Queue 2af498a056 Merge pull request #44756 from wojtek-t/faster_kube_proxy_2
Automatic merge from submit-queue (batch tested with PRs 44625, 43594, 44756, 44730)

Don't rebuild service map in iptables kube-proxy all the time

A sibling PR to https://github.com/kubernetes/kubernetes/pull/44494 (doing pretty much the same for services that we did for endpoints).
2017-04-21 13:49:03 -07:00
Kubernetes Submit Queue 20b2f2e065 Merge pull request #43594 from mikedanese/csr-e2e
Automatic merge from submit-queue (batch tested with PRs 44625, 43594, 44756, 44730)

e2e test client creation using the certificates API

@liggitt
2017-04-21 13:49:01 -07:00
Kubernetes Submit Queue a061d072ac Merge pull request #44625 from liggitt/token-controller
Automatic merge from submit-queue (batch tested with PRs 44625, 43594, 44756, 44730)

Retry secret reference addition on conflict

* Tolerates leading or trailing etcd reads when fetching liveServiceAccount - fixes #25416
* Tolerates conflicts when updating the service account with the secret reference (does RetryOnConflict before deleting token and completely restarting the flow) - fixes #44054
2017-04-21 13:48:59 -07:00
Kubernetes Submit Queue 136396c811 Merge pull request #44751 from nikhiljindal/fixBuild
Automatic merge from submit-queue

Fixing build break for federation

https://github.com/kubernetes/kubernetes/pull/44555#issuecomment-296069884 is the culprit PR.
This reverts one line from that PR.

Our build is broken: https://k8s-testgrid.appspot.com/cluster-federation#build

cc @kubernetes/sig-federation-pr-reviews
2017-04-21 12:52:52 -07:00
Monis Khan ed35deb69d
Default ObjectNameFunc for all REST Stores
All Stores 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>
2017-04-21 15:47:25 -04:00
Kubernetes Submit Queue 7297403c69 Merge pull request #44761 from wojtek-t/better_logs_in_scale_tests
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Remove spammy logs in tests

Ref #44707
2017-04-21 11:52:11 -07:00
Kubernetes Submit Queue ee86c18d92 Merge pull request #44623 from p0lyn0mial/split_out_admission_options
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Split out AdmissionOptions

**What this PR does / why we need it**: The changes in this PR split out AdmissionOptions from ServerRunOptions. In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

**Release note**:

NONE
2017-04-21 11:52:09 -07:00
Kubernetes Submit Queue b19589df31 Merge pull request #44642 from supereagle/fix-comment-error
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

fix comment error for network plugin

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-21 11:52:07 -07:00
Kubernetes Submit Queue af57b82bfc Merge pull request #40784 from adamreese/fix/clientcache-threadsafe
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

make kubectl clientcache thread safe

**What this PR does / why we need it**:
Prevent panics when accessing kubectl client cache concurrently.

**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/helm/issues/1879
2017-04-21 11:52:05 -07:00
Kubernetes Submit Queue 0acb7210ac Merge pull request #42202 from squeed/update-cni
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Update CNI plugin to newest version; support ConfigLists

**What this PR does / why we need it**: Updates the CNI network plugin to use the newest version of CNI. This brings with it plugin chaining and support for multiple versions.

**Special notes for your reviewer**: This libcni change is backwards-compatible - older plugins will work without any changes needed.

**Release note**:
```release-note
This adds support for CNI ConfigLists, which permit plugin chaining.
```
2017-04-21 11:52:02 -07:00
Kubernetes Submit Queue f613e66ad6 Merge pull request #44543 from xilabao/fix-warning-in-auth
Automatic merge from submit-queue

remove warning infomation when using '*'

```
#kubectl auth can-i "*" "*"
Warning: the server doesn't have a resource type '*'
yes
```
2017-04-21 10:12:56 -07:00
Kubernetes Submit Queue 5899cfa444 Merge pull request #44633 from enj/enj/t/etcd_storage_path_test
Automatic merge from submit-queue

Add TestEtcdStoragePath integration test

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

`TestEtcdStoragePath` prevents the accidental movement of objects stored in etcd.  It creates a stub of each object and then checks the expected location in etcd.  Inadvertent `GroupVersionKind` changes are prevented.

cc @liggitt @soltysh for review.

cc @ncdc because I know you love this 😄 

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

**Release note**:

```
NONE
```
2017-04-21 10:12:45 -07:00
Kubernetes Submit Queue 936137d22b Merge pull request #44076 from liggitt/impersonation-groupify
Automatic merge from submit-queue

Include system:authenticated group when impersonating

Fixes #43227

An authorized impersonation request solely for a specific username previously resulted in a `user.Info` that did not include either the `system:authenticated` or `system:unauthenticated` groups. That meant that permissions intended to be granted to all users, like discovery, would be denied the impersonated user.

This allows `kubectl get pods --as=<username>` to work as expected

```release-note
API requests using impersonation now include the `system:authenticated` group in the impersonated user automatically.
```
2017-04-21 09:22:35 -07:00
Kubernetes Submit Queue 25ec2607dd Merge pull request #44763 from ncdc/fix-replication-controller-log-ptr-check
Automatic merge from submit-queue

More RC/RS controller logging updates

We were comparing the address of the old and new RC.spec.replicas and we
have to compare the values. This only affects logging.

Update RS controller to match RC controller to log when spec.replicas
changes, not status.replicas.

@kargakis @janetkuo @sttts @liggitt
2017-04-21 09:22:27 -07:00
Kenneth Owens 7d22e64284 StatefulSet should not launch Pod i, if a Pod in the sequence [0,i) has its
DeletionTimestamp set. Fixes 44229.
Rename isTerminated to isTerminating
Adds a test case for at the unit level to prevent regression
2017-04-21 08:38:21 -07:00
Kubernetes Submit Queue c4bc7c1166 Merge pull request #44636 from yvespp/master
Automatic merge from submit-queue

client-go PortForwarder: don't log an error if net.Listen fails

**What this PR does / why we need it**:
If ipv6 is disabled the client-go PortForwarder logs an error:
```
E0406 17:26:06.983609   29625 portforward.go:209] Unable to create listener: Error listen tcp6 [::1]:30143: socket: address family not supported by protocol
```
This pull request removes this error log. Reasons:
* Tunnel creation might still succeed on ipv4 and the error just confuses the user (see https://github.com/kubernetes/helm/issues/2223).
* If the tunnel can't be created the error gets also loggen in `listenOnPort`.
* runtime.HandleError should only be used on errors "_when a non-user facing piece of code cannot return an error"_ which isn't the case here.

**Which issue this PR fixes**
Fixes https://github.com/kubernetes/helm/issues/2223
2017-04-21 08:34:17 -07:00
Kubernetes Submit Queue 3559c067c6 Merge pull request #41571 from php-coder/fix_comments
Automatic merge from submit-queue

Minor cleanups

Minor improvements:
- `ValidateNoNewFinalizers`: remove unused const
- Mention that mutation of `spec.initContainers[*].image` field is allowed
- Improve godoc comments
2017-04-21 08:34:07 -07:00
Kubernetes Submit Queue 8e3d32b141 Merge pull request #44710 from xiangpengzhao/describe-print-rc-rs-conditions
Automatic merge from submit-queue

Print conditions of RC/RS in 'kubectl describe' command

**What this PR does / why we need it**:
If conditions of RC/RS exist, print them in 'kubectl describe' command.

**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
Print conditions of RC/RS in 'kubectl describe' command.
```
2017-04-21 07:47:29 -07:00
Kubernetes Submit Queue ef50807a2c Merge pull request #44320 from rmohr/workqueue
Automatic merge from submit-queue

client-go workqueue example

Demonstrates how to compose a controller out of cache.Controller,
cache.Indexer and a workqueue.
2017-04-21 06:58:26 -07:00
Kubernetes Submit Queue 910c9d1ec7 Merge pull request #44729 from liggitt/non-resource-url-test
Automatic merge from submit-queue

Add nonResourceURL wildcard coverage tests

Ensure `*` covering all paths is tested
2017-04-21 06:10:26 -07:00