Commit Graph

23918 Commits (b3e641d7f31e0e4c5d22a2ee787b611aefa88b79)

Author SHA1 Message Date
Kubernetes Submit Queue cd417b583c Merge pull request #49727 from gnufied/expand-pvc-plugin-changes
Automatic merge from submit-queue (batch tested with PRs 49727, 51792)

Implement Controller for growing persistent volumes

This PR implements API and controller plane changes necessary for doing controller side resize.

xref :  https://github.com/kubernetes/community/pull/657 

Also xref https://github.com/kubernetes/features/issues/284 

```
Add alpha support for allowing users to grow persistent volumes. Currently we only support volume types that just require control plane resize (such as glusterfs) and don't need separate file system resize. 
```
2017-09-04 03:37:57 -07:00
Yassine TIJANI 144bd102c0 implementation of GetZoneByProviderID and GetZoneByNodeName for azure 2017-09-04 10:43:19 +02:00
Jan Safranek 876109a53c Clear alpha MountPropagation fields.
According to api_changes.md, alpha fields must be cleared when corresponding
feature is disabled.
2017-09-04 10:40:54 +02:00
Kubernetes Submit Queue 156c4b443b Merge pull request #48582 from fabianofranz/fixes_grace_period_in_delete
Automatic merge from submit-queue

Fixes grace period in delete

**What this PR does / why we need it**:  Fixes `kubectl delete` ignoring `--grace-period`. 

**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/openshift/origin/issues/15060 found in OpenShift.

**Release note**:

```release-note
NONE
```
2017-09-04 00:03:01 -07:00
Hemant Kumar 84029c2c1a Update generated files - api, bazel, json
Update all generated files json, protocolbuffers,
documentation
2017-09-04 09:02:35 +02:00
Hemant Kumar cd2a68473a Implement controller for resizing volumes 2017-09-04 09:02:34 +02:00
Hemant Kumar e78d433150 Implement necessary API changes
Introduce feature gate for expanding PVs
Add a field to SC
Add new Conditions and feature tag pvc update
Add tests for size update via feature gate
register the resize admission plugin
Update golint failures
2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue 034c40be6f Merge pull request #51864 from jiayingz/fix-51863
Automatic merge from submit-queue (batch tested with PRs 51845, 51868, 51864)

Fixes a cross-build failure introduced in PR 51209. FYI, issue 51863.

fixes #51863
2017-09-03 21:32:00 -07:00
Kubernetes Submit Queue 0dedd13ad7 Merge pull request #51734 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Enable batch/v1beta1.CronJobs by default

This PR re-applies the cronjobs->beta back (https://github.com/kubernetes/kubernetes/pull/51720)  with the fix from @shyamjvs.

Fixes #51692

@apelisse @dchen1107 @smarterclayton ptal
@janetkuo @erictune fyi
2017-09-03 18:22:27 -07:00
Kubernetes Submit Queue 6ec80eac1b Merge pull request #51816 from liggitt/xiangpengzhao-remove-initc-anno
Automatic merge from submit-queue

Remove deprecated init-container in annotations

fixes #50655
fixes #51816 
closes #41004
fixes #51816 

Builds on #50654 and drops the initContainer annotations on conversion to prevent bypassing API server validation/security and targeting version-skewed kubelets that still honor the annotations

```release-note
The deprecated alpha and beta initContainer annotations are no longer supported. Init containers must be specified using the initContainers field in the pod spec.
```
2017-09-03 17:35:11 -07:00
Kubernetes Submit Queue f9a82dd3b7 Merge pull request #50924 from liggitt/alpha-fields
Automatic merge from submit-queue (batch tested with PRs 51682, 51546, 51369, 50924, 51827)

Clear values for disabled alpha fields

Fixes #51831

Before persisting new or updated resources, alpha fields that are disabled by feature gate must be removed from the incoming objects.

This adds a helper for clearing these values for pod specs and calls it from the strategies of all in-tree resources containing pod specs.

Addresses https://github.com/kubernetes/community/pull/869
2017-09-03 15:54:22 -07:00
Kubernetes Submit Queue 0f2a72f9f5 Merge pull request #51546 from apelisse/remove-duplicate-fake-openapi
Automatic merge from submit-queue (batch tested with PRs 51682, 51546, 51369, 50924, 51827)

Remove duplicate fake and unused openapi

**What this PR does / why we need it**:
Follow-up on PR #50404

**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-09-03 15:54:16 -07:00
Kubernetes Submit Queue 7a219684a9 Merge pull request #51682 from m1093782566/ipvs-rsync-iptables
Automatic merge from submit-queue

rsync IPVS proxier to the HEAD of iptables

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

There was a significant performance improvement made to iptables. Since IPVS proxier makes use of iptables in some use cases, I think we should rsync IPVS proxier to the HEAD of iptables.

**Which issue this PR fixes** : 

xref #51679 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-03 15:48:31 -07:00
Kubernetes Submit Queue a31bc44b38 Merge pull request #51500 from m1093782566/fix-kube-proxy-panic
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

fix kube-proxy panic because of nil sessionAffinityConfig

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

fix kube-proxy panic because of nil sessionAffinityConfig

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

**Special notes for your reviewer**:

I apology that this bug is introduced by #49850 :(

@thockin @smarterclayton @gnufied 

**Release note**:

```release-note
NONE
```
2017-09-03 15:00:15 -07:00
Kubernetes Submit Queue 3c621d6ee6 Merge pull request #51761 from karataliu/ccmupdatenode
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

Fix providerID update validation

**What this PR does / why we need it**:
Cloud controller manager supports updating providerID in #50730, but the node updating was blocked by 
validation rule.

This is to propose a fix for updating the validation rule by allowing altering spec.providerID if not set.

Please check #51596 for detail

**Which issue this PR fixes**
fixes #51596

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-09-03 15:00:07 -07:00
Kubernetes Submit Queue 765d9089d2 Merge pull request #51706 from zhangxiaoyu-zidif/fix-format-local-follow-go
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

Fix local storage code to follow go style

**What this PR does / why we need it**:
Fix local storage code to follow go style
**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-09-03 15:00:03 -07:00
Kubernetes Submit Queue b63abc9fdd Merge pull request #51153 from clamoriniere1A/feature/job_failure_policy_controller
Automatic merge from submit-queue

Job failure policy controller support

**What this PR does / why we need it**:
Start implementing the support of the "Backoff policy and failed pod limit" in the ```JobController```  defined in https://github.com/kubernetes/community/pull/583.
This PR depends on a previous PR #48075  that updates the K8s API types.

TODO: 
* [X] Implement ```JobSpec.BackoffLimit``` support
* [x] Rebase when #48075 has been merged.
* [X] Implement end2end tests



implements https://github.com/kubernetes/community/pull/583

**Special notes for your reviewer**:

**Release note**:
```release-note
Add backoff policy and failed pod limit for a job
```
2017-09-03 13:13:17 -07:00
Kubernetes Submit Queue bee221cca9 Merge pull request #51638 from mfojtik/client-gen-custom-methods
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Allow custom client verbs to be generated using client-gen

This change will allow to define custom verbs for resources using the following new tag:

```
// +genclient:method=Foo,verb=create,subresource=foo,input=Bar,output=k8s.io/pkg/api.Blah
```

This will generate client method `Foo(bar *Bar) (*api.Blah, error)` (format depends on the particular verb type)

With this change we can add `UpdateScale()` and `GetScale()` into all scalable resources. Note that intention of this PR is not to fix the Scale(), but that is used as an example of this new capability.
Additionally this will also allow us to get rid of `// +genclient:noStatus` and fix guessing of the "updateStatus" subresource presence based on the existence of '.Status' field.
Basically you will have to add following into all types you want to generate `UpdateStatus()` for:

```
// +genclient:method=UpdateStatus,verb=update,subresource=status
```

This allows further extension of the client without writing an expansion (which proved to be pain to maintain and copy...). Also allows to customize native CRUD methods if needed (input/output types).

```release-note
NONE
```
2017-09-03 11:10:09 -07:00
Kubernetes Submit Queue f07279ada2 Merge pull request #51474 from verult/ProberTest
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Flexvolume dynamic plugin discovery: Prober unit tests and basic e2e test.

**What this PR does / why we need it**: Tests for changes introduced in PR #50031 .
As part of the prober unit test, I mocked filesystem, filesystem watch, and Flexvolume plugin initialization.
Moved the filesystem event goroutine to watcher implementation.

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

**Special notes for your reviewer**:
First commit contains added functionality of the mock filesystem.
Second commit is the refactor for moving mock filesystem into a common util directory.
Third commit is the unit and e2e tests.

**Release note**:

```release-note
NONE
```
/release-note-none
/sig storage
/assign @saad-ali @liggitt 
/cc @mtaufen @chakri-nelluri @wongma7
2017-09-03 11:10:05 -07:00
Kubernetes Submit Queue d970eb8f94 Merge pull request #50875 from ericchiang/oidc-claims-prefix
Automatic merge from submit-queue (batch tested with PRs 50579, 50875, 51797, 51807, 51803)

oidc auth: make the OIDC claims prefix configurable

Add the following flags to control the prefixing of usernames and
groups authenticated using OpenID Connect tokens.

	--oidc-username-prefix
	--oidc-groups-prefix

```release-note
The OpenID Connect authenticator can now use a custom prefix, or omit the default prefix, for username and groups claims through the --oidc-username-prefix and --oidc-groups-prefix flags. For example, the authenticator can map a user with the username "jane" to "google:jane" by supplying the "google:" username prefix.
```

Closes https://github.com/kubernetes/kubernetes/issues/50408
Ref https://github.com/kubernetes/kubernetes/issues/31380

cc @grillz @kubernetes/sig-auth-pr-reviews @thomastaylor312 @gtaylor
2017-09-03 08:46:23 -07:00
cedric lamoriniere 1dbef2f113
Job failure policy support in JobController
Job failure policy integration in JobController. From the
JobSpec.BackoffLimit the JobController will define the backoff
duration between Job retry.

It use the ```workqueue.RateLimitingInterface``` to store the number of
"retry" as "requeue" and the default Job backoff initial duration is set
during the initialization of the ```workqueue.RateLimiter.

Since the number of retry for each job is store in a local structure
"JobController.queue" if the JobController restarts the number of retries
will be lost and the backoff duration will be reset to 0.

Add e2e test for Job backoff failure policy
2017-09-03 12:07:12 +02:00
mbohlool b9eacd0bf5 update bazel
update OpenAPI spec

update staging godeps
2017-09-03 02:18:14 -07:00
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
Kubernetes Submit Queue 28857a2f02 Merge pull request #49142 from joelsmith/slowstart
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Slow-start batch pod creation of rs, rc, ds, jobs

Prevent too-large replicas from generating enormous numbers
of events by creating only a few pods at a time, then increasing
the batch size when pod creations succeed. Stop creating batches
of pods when any pod creation errors are encountered.

Todo:

- [x] Add automated tests
- [x] Test ds

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

**Release note**:
```release-note
controllers backoff better in face of quota denial
```
2017-09-03 01:12:14 -07:00
Kubernetes Submit Queue fc87bba2dd Merge pull request #51748 from smarterclayton/events_inline
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Simplify describe events table

The describe table for events is not easy to read and violates other
output guidelines. Change to use spaces (we don't use tabs in formal
output for tables). Remove columns that are not normally needed or
available on events.

Example for pods:

```
...
QoS Class:       BestEffort
Node-Selectors:  role=app
Tolerations:     <none>
Events:
  Type     Reason      Age                 From                         Message
  ----     ------      ----                ----                         -------
  Normal   Pulling     1h (x51 over 5h)    kubelet, origin-ci-ig-n-gj0x pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Normal   BackOff     8m (x1274 over 5h)  kubelet, origin-ci-ig-n-gj0x Back-off pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Warning  FailedSync  3m (x1359 over 5h)  kubelet, origin-ci-ig-n-gj0x Error syncing pod
```

Puts the type first (separate important from not), then reason (which is
the most impactful scanning field). Collapses first seen, last seen, and
times into a single field, since most of the time you care about the
last time the event happened, not the first time.

@kubernetes/sig-cli-pr-reviews sorry for the last minute drop, but the usability of this is driving me up the wall and I can't take it anymore. Would like to slip this into 1.8 so that I can debug things without dying a little inside.

Fixes #47715

```release-note
The event table output under `kubectl describe` has been simplified to show only the most essential info.
```
2017-09-03 01:12:12 -07:00
Kubernetes Submit Queue 1d43050372 Merge pull request #51703 from deads2k/discovery-02-scale
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

expose discovery information on scalable resources

Builds on https://github.com/kubernetes/kubernetes/pull/49971 and provides the GroupVersion information that can be used by a dynamic scale client.

@kubernetes/sig-api-machinery-pr-reviews 
@foxish @DirectXMan12 since you both asked for it.
2017-09-03 01:12:09 -07:00
Kubernetes Submit Queue 9ad2bd0f7f Merge pull request #51561 from cheftako/getzone
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Implement GetZoneByProviderID & GetZoneByNodeName

Adding an implementation of GetZoneByProviderID & GetZoneByNodeName for
GCE.
This is related to ticket 50926.
This was tested as part of the ongoing separate GCE cloud provider work.

**What this PR does / why we need it**: It implements GCE methods needed by the cloud provider work.

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

**Special notes for your reviewer**: Tested with pull/50811

**Release note**:
<!--  Steps to write your release note:
```release-note NONE
```
2017-09-03 01:12:07 -07:00
Kubernetes Submit Queue 6b39b017b4 Merge pull request #50993 from wackxu/fixdepfuncaws
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Replace the deprecated function with the suggest function in aws module

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

There are some deprecated  function and I replace the deprecated function with the suggest function in aws module.

**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-09-02 23:50:07 -07:00
Kubernetes Submit Queue 9341f22bb6 Merge pull request #50112 from jlz27/multiple-ips
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

AWS: handle multiple IPs when using more than 1 network interface per ec2 instance

**What this PR does / why we need it**:
Adds support for kubelets running with the AWS cloud provider on ec2 instances with multiple network interfaces. If the active interface is not eth0, the AWS cloud provider currently reports the wrong node IP.

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

**Special notes for your reviewer**:
There is also some work necessary for handling multiple DNS names and such but I didn't fix them in this PR.

**Release note**:

```release-note
Fixed bug in AWS provider to handle multiple IPs when using more than 1 network interface per ec2 instance.
```
2017-09-02 23:50:03 -07:00
Kubernetes Submit Queue 5c0b265a9b Merge pull request #50497 from dixudx/kubectl-include-uninitialized
Automatic merge from submit-queue (batch tested with PRs 51301, 50497, 50112, 48184, 50993)

Introduce new flag "--include-uninitialized" to kubectl

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

Introduce `--include-uninitialized` as a global flag to kubectl

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

**Special notes for your reviewer**:
/assign @caesarxuchao @smarterclayton @ahmetb @deads2k 

**Release note**:

```release-note
Add flag "--include-uninitialized" to kubectl annotate, apply, edit-last-applied, delete, describe, edit, get, label, set. "--include-uninitialized=true" makes kubectl commands apply to uninitialized objects, which by default are ignored if the names of the objects are not provided. "--all" also makes kubectl commands apply to uninitialized objects. Please see the [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/) doc for more details.
```
2017-09-02 23:50:00 -07:00
Kubernetes Submit Queue 6d32783453 Merge pull request #51301 from yujuhong/net-tiers-v0.3
Automatic merge from submit-queue

GCE: Add Alpha feature "Network Tiers" for external L4 load balancers

**Special notes for your reviewer**:
The PR has been manually tested in a GCE e2e cluster for the following conditions:
  1. When `network-tier` is not enabled in gce.conf, network tier annotations are completely ignored by the controller.
  2. When  `network-tier` is enabled in gce.conf:
     * Service w/ Standard tier: create a standard-tier LB.
     * Update Service to use a different tier: tear down the existing forwarding rule and release the IP before creating a new LB.
     * Service w/ an invalid tier value: `ensureExternalLoadBalancer()` returns an error, and controller emits an event.
     * Service w/ a user-owned static IP: check if the tier matches, if not, returns an error and emits an event.

I uploaded an e2e test #51483. You're welcome to review that one too.

**Release note**:

```release-note
GCE: Service object now supports "Network Tiers" as an Alpha feature via annotations.
```
2017-09-02 23:38:55 -07:00
Kubernetes Submit Queue 0554520495 Merge pull request #50938 from cblecker/threshold-crossbuild
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Fix threshold notifier build tags

**What this PR does / why we need it**:
Cross building from darwin is currently broken on the following error:
```
# k8s.io/kubernetes/pkg/kubelet/eviction
pkg/kubelet/eviction/threshold_notifier_unsupported.go:25: NewMemCGThresholdNotifier redeclared in this block
        previous declaration at pkg/kubelet/eviction/threshold_notifier_linux.go:38
```
It looks like #49300 broke the build tags introduced in #38630 and #37384. This fixes the build tag on `threshold_notifier_unsupported.go` as the cgo requirement was removed from `threshold_notifier_linux.go`.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-09-02 22:52:11 -07:00
Kubernetes Submit Queue bd813ce089 Merge pull request #51058 from thockin/codegen-dbg
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Add debugging to the codegen process

This was useful when debugging a different problem.
2017-09-02 22:52:06 -07:00
Kubernetes Submit Queue 6c60a73f8a Merge pull request #49829 from zhangxiaoyu-zidif/add-test-item-for-job-util
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Add test items for job utils

**What this PR does / why we need it**:
Add test item for job util

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

```release-note
NONE
```
2017-09-02 22:52:04 -07:00
Kubernetes Submit Queue 0ff4ca9815 Merge pull request #51666 from davidz627/storage_capacity
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Fixed integer overflow when matching PVPVC claims

Fixes #49911

Fixed integer overflow when matching PVPVC claims. Added test to guard this behavior.
2017-09-02 22:52:00 -07:00
Kubernetes Submit Queue 52e3fdacbb Merge pull request #51538 from kow3ns/less-ugly-names
Automatic merge from submit-queue (batch tested with PRs 51553, 51538, 51663, 51069, 51737)

Consistent Names for ControllerRevisions, ReplicaSets, and objects using GenerateName

**What this PR does / why we need it**:
Adds the rand.SafeEncodeString function and uses this function to generate names for ReplicaSets and ControllerRevisions.

```release-note
The names generated for ControllerRevision and ReplicaSet are consistent with the GenerateName functionality of the API Server and will not contain "bad words".
```
2017-09-02 21:57:59 -07:00
Jiaying Zhang 29d178fbc3 Fixes a cross-build failure introduced in PR 51209. FYI, issue 51863. 2017-09-02 21:56:39 -07:00
Kubernetes Submit Queue 578195873a Merge pull request #51553 from wongma7/pvc-prometheus
Automatic merge from submit-queue

Expose PVC metrics via kubelet prometheus

This depends on https://github.com/kubernetes/kubernetes/pull/51448, opening early though. second commit is mine and mostly a copy/paste job.

implements metrics listed in here https://github.com/kubernetes/community/pull/855 following method here https://github.com/kubernetes/community/pull/930#issuecomment-325509736

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: https://github.com/kubernetes/features/issues/363

**Special notes for your reviewer**:

**Release note**:

```release-note
PersistentVolumeClaim metrics like "volume_stats_inodes" and "volume_stats_capacity_bytes" are now reported via kubelet prometheus
```
2017-09-02 21:22:43 -07:00
Kubernetes Submit Queue dceff77669 Merge pull request #51374 from bowei/ip-alias-v2
Automatic merge from submit-queue (batch tested with PRs 51583, 51283, 51374, 51690, 51716)

Add IPAM controller for synchronizing node pod CIDR range allocations between the cluster and the cloud (alpha feature)

```release-note
IPAM controller unifies handling of node pod CIDR range allocation.
It is intended to supersede the logic that is currently in range_allocator 
and cloud_cidr_allocator. (ALPHA FEATURE)

Note: for this change, the other allocators still exist and are the default.

It supports two modes:
* CIDR range allocations done within the cluster that are then propagated out to the cloud provider.
* Cloud provider managed IPAM that is then reflected into the cluster.
```

Fixes https://github.com/kubernetes/kubernetes/issues/51826
2017-09-02 20:35:24 -07:00
Kubernetes Submit Queue 12f96e2e35 Merge pull request #51283 from caesarxuchao/fix-initializer-validate
Automatic merge from submit-queue (batch tested with PRs 51583, 51283, 51374, 51690, 51716)

Unify initializer name validation

Unify the validation rules on initializer names. Fix https://github.com/kubernetes/kubernetes/issues/51843.

```release-note
Action required: validation rule on metadata.initializers.pending[x].name is tightened. The initializer name needs to contain at least three segments separated by dots. If you create objects with pending initializers, (i.e., not relying on apiserver adding pending initializers according to initializerconfiguration), you need to update the initializer name in existing objects and in configuration files to comply to the new validation rule.
```
2017-09-02 20:35:22 -07:00
Kubernetes Submit Queue 35ffb5c6cf Merge pull request #48921 from smarterclayton/paging_prototype
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

Alpha list paging implementation

Design in kubernetes/community#896

Support `?limit=NUMBER`, `?continue=CONTINUATIONTOKEN`, and a `continue` field
on ListMeta and pass through to etcd. Perform minor validation as an example.

```
# first out of three
$ curl http://127.0.0.1:8080/api/v1/namespaces?limit=1
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "146",
    "next": "ZGVmYXVsdA"
  },
  "items": [
    {
      "metadata": {
        "name": "default",
        "selfLink": "/api/v1/namespaces/default",
        "uid": "f95e1390-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "4",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
...
# last
$ curl "http://127.0.0.1:8080/api/v1/namespaces?limit=1&continue=a3ViZS1wdWJsaWM"
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "145"
  },
  "items": [
    {
      "metadata": {
        "name": "kube-system",
        "selfLink": "/api/v1/namespaces/kube-system",
        "uid": "f95e9484-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "5",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
```
2017-09-02 19:26:29 -07:00
Kubernetes Submit Queue a3aac42b9a Merge pull request #51636 from deads2k/cli-01-reconcile
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

add reconcile command to kubectl auth

This pull exposes the RBAC reconcile commands through `kubectl auth reconcile -f FILE`.  When passed a file which contains RBAC roles, rolebindings, clusterroles, or clusterrolebindings, it will compute covers and add the missing rules.

The logic required to properly "apply" rbac permissions is more complicated that a json merge since you have to compute logical covers operations between rule sets.  This means that we cannot use `kubectl apply` to update rbac roles without risking breaking old clients (like controllers).

To solve this problem, RBAC created reconcile functions to use during startup for "stock" roles.  We want to offer this power to users who are running their own controllers and extension servers.

This is an intersection between @kubernetes/sig-auth-misc and @kubernetes/sig-cli-misc
2017-09-02 19:26:25 -07:00
Kubernetes Submit Queue d375e1595f Merge pull request #50920 from DirectXMan12/versions/custom-metrics-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

Graduate custom metrics API to v1beta1

This graduates custom-metrics.metrics.k8s.io/v1alpha1 to custom-metrics.metrics.k8s.io/v1beta1.  The move is more-or-less just a straightforward rename.

Part of kubernetes/features#117 and kubernetes/features#118

```release-note
the custom metrics API (custom-metrics.metrics.k8s.io) has moved from v1alpha1 to v1beta1
```
2017-09-02 18:18:57 -07:00
Kubernetes Submit Queue 73ed961b8e Merge pull request #48075 from clamoriniere1A/feature/job_failure_policy
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

[API] Feature/job failure policy

**What this PR does / why we need it**: Implements the Backoff policy and failed pod limit defined in https://github.com/kubernetes/community/pull/583

**Which issue this PR fixes**: 
fixes #27997, fixes #30243

**Special notes for your reviewer**:
This is a WIP PR, I updated the api batchv1.JobSpec in order to prepare the backoff policy implementation in the JobController.

**Release note**:
```release-note
Add backoff policy and failed pod limit for a job
```
2017-09-02 18:18:54 -07:00
Kubernetes Submit Queue 94d9457e4e Merge pull request #51130 from luxas/fake_discovery
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

Add the possibility to set return values for the FakeDiscovery implementation

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

As an user of the fake clientset (with the fake discovery), I want to be able to set the fake server's version on demand like this for example:

```go
func TestFakingServerVersion(t *testing.T) {
	client := fakeclientset.NewSimpleClientset()
	fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery)
	if !ok {
		t.Fatalf("couldn't convert Discovery() to *FakeDiscovery")
	}

	testGitCommit := "v1.0.0"
	fakeDiscovery.FakedServerVersion = &version.Info{
		GitCommit: testGitCommit,
	}

	sv, err := client.Discovery().ServerVersion()
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	if sv.GitCommit != testGitCommit {
		t.Fatalf("unexpected faked discovery return value: %q", sv.GitCommit)
	}
}
```

This PR makes that possible, in wait for a more sophisticated FakeDiscovery implementation generally.

**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
```
@kubernetes/sig-api-machinery-pr-reviews
2017-09-02 18:18:51 -07:00
Kubernetes Submit Queue d42014e638 Merge pull request #51364 from apelisse/openapi-change-default
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

Change default validation to openapi

**What this PR does / why we need it**:
And also update the test to match the new error string.

**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/kubectl/issues/49

**Special notes for your reviewer**:

**Release note**:
```release-note
Performs validation (when applying for example) against OpenAPI schema rather than Swagger 1.0.
```
2017-09-02 18:18:48 -07:00
Kubernetes Submit Queue fc9e214a84 Merge pull request #51519 from hzxuzhonghu/cronjob
Automatic merge from submit-queue

update deprecated interface and fix bug not return when list pod failed in cronjob_controller.go

**What this PR does / why we need it**:
remove some unused redundant code, and fix bug: when list pod failed, 
job still deleted but pod may still exist  in func `deleteJob`

**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-09-02 12:58:07 -07:00
Kubernetes Submit Queue 3cbc0ae459 Merge pull request #51605 from tcharding/golint-kc-rollout-status
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

kubectl: Clean up documentation for rollout_status.go

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

`golint` emits various warnings about missing comments for exported funcitons and types.

This PR adds missing documentation strings to functions and types. Also adds punctuation to current documentation strings in line with Go coding standards.

**Release note**:

```release-note
NONE
```
/sig cli
/kind cleanup
/kind documentation
2017-09-02 12:11:12 -07:00
Kubernetes Submit Queue 11a836078d Merge pull request #46444 from jsafrane/node-mount-propagation
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Mount propagation in kubelet

Together with #45724 it implements mount propagation as proposed in https://github.com/kubernetes/community/pull/659

There is:

- New alpha annotation that allows user to explicitly set propagation mode for each `VolumeMount` in pod containers (to be replaced with real `VolumeMount.Propagation` field during beta) + validation + tests. "Private" is the default one (= no change to existing pods).

  I know about proposal for real API fields for alpha feature in https://docs.google.com/document/d/1wuoSqHkeT51mQQ7dIFhUKrdi3-1wbKrNWeIL4cKb9zU/edit, but it seems it's not implemented yet. It would save me quite lot of code and ugly annotation.

- Updated CRI API to transport chosen propagation to Docker.

- New `kubelet --experimental-mount-propagation` option to enable the previous bullet without modifying types.go (worked around with changing `KubeletDeps`... not nice, but it's better than adding a parameter to `NewMainKubelet` and removing it in the next release...)

```release-note
kubelet has alpha support for mount propagation. It is disabled by default and it is there for testing only. This feature may be redesigned or even removed in a future release.
```

@derekwaynecarr @dchen1107 @kubernetes/sig-node-pr-reviews
2017-09-02 12:11:07 -07:00
Kubernetes Submit Queue c84b3132a2 Merge pull request #48051 from xilabao/add-selfsubjectrulesreview-api
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Add selfsubjectrulesreview in authorization

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace.
```
/cc @deads2k @liggitt
2017-09-02 12:11:04 -07:00
Kubernetes Submit Queue 917f9f02ef Merge pull request #45724 from jsafrane/mount-propagation2
Automatic merge from submit-queue

Make /var/lib/kubelet as shared during startup

This is part of ~~https://github.com/kubernetes/community/pull/589~~ https://github.com/kubernetes/community/pull/659

We'd like kubelet to be able to consume mounts from containers in the future, therefore kubelet should make sure that `/var/lib/kubelet` has shared mount propagation to be able to see these mounts. 

On most distros, root directory is already mounted with shared mount propagation and this code will not do anything. On older distros such as Debian Wheezy, this code detects that `/var/lib/kubelet` is a directory on `/` which has private mount propagation and kubelet bind-mounts `/var/lib/kubelet` as rshared.

Both "regular" linux mounter and `NsenterMounter` are updated here.

@kubernetes/sig-storage-pr-reviews @kubernetes/sig-node-pr-reviews 
@vishh 

Release note:
```release-note
Kubelet re-binds /var/lib/kubelet directory with rshared mount propagation during startup if it is not shared yet.
```
2017-09-02 12:00:30 -07:00
Kubernetes Submit Queue ddef5f1ef9 Merge pull request #51575 from derekwaynecarr/fix-stats
Automatic merge from submit-queue (batch tested with PRs 51590, 48217, 51209, 51575, 48627)

Skip system container cgroup stats if undefined

**What this PR does / why we need it**:
the kubelet /stats/summary endpoint tried to look up cgroup stats for containers that are not required.  this polluted logs with messages about not finding stats for "" container.  this pr skips cgroup stats if the cgroup name is not specified (they are optional anyway)

**Special notes for your reviewer**:
i think this was a regression from recent refactor.

**Release note**:
```release-note
NONE
```
2017-09-02 11:12:13 -07:00
Kubernetes Submit Queue 139e52744a Merge pull request #51209 from jiayingz/deviceplugin-jiayingz
Automatic merge from submit-queue (batch tested with PRs 51590, 48217, 51209, 51575, 48627)

Deviceplugin jiayingz

**What this PR does / why we need it**:
This PR implements the kubelet Device Plugin Manager.
It includes four commits implemented by @RenaudWasTaken and a commit that supports allocation.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Design document: kubernetes/community#695
PR tracking: kubernetes/features#368

**Special notes for your reviewer**:

**Release note**:
Extending Kubelet to support device plugin

```release-note
```
2017-09-02 11:12:10 -07:00
Kubernetes Submit Queue 5c8d6ea5ea Merge pull request #48217 from kargakis/unavailable-replicas-comment
Automatic merge from submit-queue (batch tested with PRs 51590, 48217, 51209, 51575, 48627)

api: clarify d.status.unavailableReplicas

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

@kubernetes/sig-apps-api-reviews
2017-09-02 11:12:07 -07:00
Kubernetes Submit Queue 562d7ee37b Merge pull request #51590 from karataliu/instancetypebyid
Automatic merge from submit-queue

Fix InstanceTypeByProviderID for Azure

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

Fix change in #46940, should return InstanceType in function InstanceTypeByProviderID

Otherwise:
```
I0830 05:01:08.497989   15347 node_controller.go:328] Adding node label from cloud provider: beta.kubernetes.io/instance-type=/subscriptions/{id}/resourceGroups/{id}/providers/Microsoft.Compute/virtualMachines/k8s-agentpool1
```

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

@brendandburns @realfake
2017-09-02 11:01:35 -07:00
Shyam JVS 3bba914496 Revert "Remove deprecated and experimental fields from KubeletConfiguration" 2017-09-02 16:30:56 +02:00
Davanum Srinivas b6721bebea Changes in OpenStack cloud provider for latest gophercloud 2017-09-01 20:56:13 -04:00
Kubernetes Submit Queue 5f405b7f47 Merge pull request #49645 from dixudx/v1beta2_conversion_test
Automatic merge from submit-queue (batch tested with PRs 50381, 51307, 49645, 50995, 51523)

add apps/v1beta2 conversion tests

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

add apps/v1beta2 conversion test

Depend on ~~#49751~~(Merged), ~~#49719~~(Merged)

**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**:
/cc @janetkuo 

**Release note**:

```release-note
add apps/v1beta2 conversion test
```
2017-09-01 16:34:02 -07:00
Kubernetes Submit Queue 9b535b06a6 Merge pull request #51307 from mtaufen/kc-type-refactor
Automatic merge from submit-queue (batch tested with PRs 50381, 51307, 49645, 50995, 51523)

Remove deprecated and experimental fields from KubeletConfiguration

As we work towards providing a stable (v1) kubeletconfig API,
we cannot afford to have deprecated or "experimental" (alpha) fields
living in the KubeletConfiguration struct. This removes all existing
experimental or deprecated fields, and places them in KubeletFlags
instead.

I'm going to send another PR after this one that organizes the remaining
fields into substructures for readability. Then, we should try to move
to v1 ASAP (maybe not v1 in 1.8, given how close we are, but definitely in 1.9).

It makes far more sense to focus on a clean API in kubeletconfig v2,
than to try and further clean up the existing "API" that everyone
already depends on.

fixes: #51657

**Release note**:
```release-note
NONE
```
2017-09-01 16:33:59 -07:00
Kubernetes Submit Queue 0955f3602e Merge pull request #50381 from sczizzo/bugfix-issue-47800
Automatic merge from submit-queue (batch tested with PRs 50381, 51307, 49645, 50995, 51523)

Bugfix: Use local JSON log buffer in parseDockerJSONLog.

**What this PR does / why we need it**:
The issue described in #47800 is due to a race condition in `ReadLogs`: Because the JSON log buffer (`dockerJSONLog`) is package-scoped, any two goroutines modifying the buffer could race and overwrite the other's changes. In particular, one goroutine could unmarshal a JSON log line into the buffer, then another goroutine could `Reset()` the buffer, and the resulting `Stream` would be empty (`""`). This empty `Stream` is caught in a `case` block and raises an `unexpected stream type` error.

This PR creates a new buffer for each execution of `parseDockerJSONLog`, so each goroutine is guaranteed to have a local instance of the buffer.

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

**Release note**:
```release-note
Fixed an issue (#47800) where `kubectl logs -f` failed with `unexpected stream type ""`.
```
2017-09-01 16:33:56 -07:00
Walter Fender 0167c6eb22 Implement GetZoneByProviderID & GetZoneByNodeName
Adding an implementation of GetZoneByProviderID & GetZoneByNodeName for
GCE.
This is related to ticket 50926.
This was tested as part of the ongoing separate GCE cloud provider work.

Added unit test.
Fix for wojtek-t (borrowed from FengyunPan)
2017-09-01 14:02:50 -07:00
Bowei Du 428b8a4132 (ALPHA GCP FEATURE) Add IPAM controller
IPAM controller unifies handling of node pod CIDR range allocation.  It
is intended to supersede the logic that is currently in range_allocator
and cloud_cidr_allocator.

Note: for this change, the other allocators still exist and are the
default.

It supports two modes:
* CIDR range allocations done within the cluster that are then
propagated out to the cloud provider.
* Cloud provider managed IPAM that is then reflected into the cluster.
2017-09-01 12:58:40 -07:00
Jan Safranek 03b753daad Implement mount propagation in kubelet 2017-09-01 21:36:33 +02:00
Jan Safranek 0c767355d8 Implement mount propagation in docker shim 2017-09-01 21:36:33 +02:00
Jan Safranek 9a7465a4e2 Add mount propagation to CRI protocol
CRI will blindly obey Kubelet decission about what propagation should be
used when.
2017-09-01 21:36:33 +02:00
Jan Safranek c49e34fd17 Add API for mount propagation.
In fact, this is one annotation + its parsing & validation. Appropriate
kubelet logic that uses this annotation is in following patches.
2017-09-01 21:36:32 +02:00
Jan Safranek 2db8af96e2 Add feature gate for mount propagation 2017-09-01 21:36:14 +02:00
Michail Kargakis b1d99e9f7e
Update d.status.unavailableReplicas api comment 2017-09-01 21:19:12 +02:00
Solly Ross 89a56a3cee Move HPA to use custom-metrics/v1beta1
This commit migrates the HPA metrics clients to use the beta version of
the custom metrics API.
2017-09-01 15:08:31 -04:00
Solly Ross 98b1a08d7e Move custom metrics APIs to v1beta1
This commit moves the custom metrics APIs and clients from v1alpha1
to v1beta1.
2017-09-01 15:08:30 -04:00
cedric lamoriniere 228693622b Generate files from v1.JobSpec modification
This commit contains the new version of generated api files linked
to the v1.JobSpec modifications in the previous commit after
"make update"
2017-09-01 21:01:48 +02:00
cedric lamoriniere 3989b18586 update API v1 Job object
Add new fields in api v1.JobSpec object for backoff policy
- BackoffLimit
- FailedPodsLimit

fixes: https://github.com/kubernetes/community/pull/583
2017-09-01 21:01:29 +02:00
Jiaying Zhang 02001af752 Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
Renaud Gaubert 7a8ad491ef Alpha feature integration 2017-09-01 11:47:16 -07:00
Renaud Gaubert f7f4515e43 Testing 2017-09-01 11:47:16 -07:00
Renaud Gaubert c4a1c97329 Device Plugin Kubelet integration 2017-09-01 11:47:09 -07:00
Jordan Liggitt 525254a3d1
Drop alpha/beta init containers annotations on conversion 2017-09-01 14:45:08 -04:00
Renaud Gaubert b563101efb Added Device Plugin Manager 2017-09-01 11:40:52 -07:00
Jordan Liggitt 02281898f8
Clear values for disabled alpha fields 2017-09-01 14:34:01 -04:00
David Zhu a60965337c Fixed integer overflow when matching PVPVC claims. Added tests to guard this behavior. 2017-09-01 10:10:13 -07:00
Matthew Wong dac2068bbd Expose PVC metrics via kubelet prometheus 2017-09-01 12:50:17 -04:00
Shyam JVS 8d2832021a Revert "CPU manager wiring and `none` policy" 2017-09-01 18:17:36 +02:00
Yu-Ju Hong 76945ad86d GCE: Add "Network Tiers" as an Alpha feature for L4 load balancers
This feature supports specifying what network tier (premium, standard)
to use for the load balancer backing the Service (type=LoadBalancer).
2017-09-01 09:13:20 -07:00
Antoine Pelisse 54b9c22f2a openapi: Remove unused test structure and code. 2017-09-01 08:45:44 -07:00
Antoine Pelisse 9287eb0c3e Change default validation to openapi
And also update the test to match the new error string.
2017-09-01 08:44:36 -07:00
Fabiano Franz d77295677b Fixes grace period in delete 2017-09-01 12:28:18 -03:00
Kubernetes Submit Queue 324a3bf7f5 Merge pull request #51055 from nicksardo/gce-ilb-ip
Automatic merge from submit-queue (batch tested with PRs 51632, 51055, 51676, 51560, 50007)

GCE: Reserve address for ILBs during sync

**What this PR does / why we need it**:
This PR adds the ability for the service controller to hold the ILB's IP during sync which may delete/recreate the forwarding rule.

Fixes: #47531

**Release note**:
```release-note
GCE: Internal load balancer IPs are now reserved during service sync to prevent losing the address to another service.
```
2017-09-01 08:27:13 -07:00
Joel Smith 1889a6ef52 Slow-start batch pod creation of rs, rc, ds, jobs
Prevent too-large replicas from generating enormous numbers
of events by creating only a few pods at a time, then increasing
the batch size when pod creations succeed. Stop creating batches
of pods when any pod creation errors are encountered.
2017-09-01 09:23:43 -06:00
David Eads 65d0f188f6 expose discovery information on scalable resources 2017-09-01 10:52:26 -04:00
Clayton Coleman 8952a0cb72
Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.
2017-09-01 10:47:01 -04:00
Clayton Coleman 500b130ff0
Enable paging for all list watchers 2017-09-01 10:47:01 -04:00
Michal Fojtik 7d2be1c521
generate UpdateScale and GetScale verbs for scalable resources 2017-09-01 14:25:46 +02:00
Michal Fojtik ba731a6cca
update bazel 2017-09-01 14:25:46 +02:00
xilabao 790374da10 create the methods in the generated expansion files 2017-09-01 19:15:59 +08:00
Chen Rong ed8adf6e51 generated 2017-09-01 19:11:19 +08:00
xilabao f14c138438 add selfsubjectrulesreview api 2017-09-01 19:09:43 +08:00
tengqm 12cce2df5e Remove DynamicVolumeProvisioning from feature gate 2017-09-01 17:22:41 +08:00
Kubernetes Submit Queue 6a845c67f0 Merge pull request #48287 from thockin/json-iterator
Automatic merge from submit-queue

Use json-iterator instead of ugorji for JSON.

@smarterclayton @wojtek-t

Fixes #36120
xref #18762

```release-note
Switch JSON marshal/unmarshal to json-iterator library.  Performance should be close to previous with no generated code.
```
2017-09-01 02:04:56 -07:00
m1093782566 617e6f4fa8 remove explictly set timeout value 2017-09-01 16:18:06 +08:00
m1093782566 1faa6f56b9 fix kube-proxy panic 2017-09-01 16:18:03 +08:00
Kubernetes Submit Queue c65ab61b3f Merge pull request #51372 from mtaufen/feature-gate-file
Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

Separate feature gates for dynamic kubelet config vs loading from a file

This makes it so these two features can be turned on independently, rather than bundling both under dynamic kubelet config.

fixes: #51664

```release-note
NONE
```
2017-09-01 01:12:47 -07:00
Kubernetes Submit Queue 7d49e7bb17 Merge pull request #51616 from tcharding/golint-kc-secret-for-tls
Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

kubectl: Remove ending punctuation from error strings

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

`golint` emits 2 warnings of type:

`error strings should not end with punctuation`

Remove punctuation from end of error strings.



**Release note**:

```release-note
NONE
```
/sig cli
/kind cleanup
2017-09-01 01:12:42 -07:00
Kubernetes Submit Queue 08ad0127ac Merge pull request #51357 from ConnorDoyle/cpu-manager-wiring-and-nonepolicy
Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

CPU manager wiring and `none` policy

Blocker for CPU manager #49186 (4 of 6)

* Previous PR in this series: #51140
* Next PR in this series: #51180

cc @balajismaniam @derekwaynecarr @sjenning 

**Release note**:

```release-note
NONE
```

TODO:
- [X] In-memory CPU manager state
- [x] Kubelet config value
- [x] Feature gate
- [X] None policy
- [X] Unit tests
- [X] CPU manager instantiation
- [x] Calls into CPU manager from Kubelet container runtime
2017-09-01 01:12:39 -07:00
Kubernetes Submit Queue 8beb39d07e Merge pull request #51279 from kow3ns/daemonset-respects-termination
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Ensure that DaemonSet respects termination

**What this PR does / why we need it**:
#43077 correctly prevents the DaemonSet controller from adopting deleted Pods, but, as pointed out in #50477, the controller now has no sensitivity to the termination lifecycle (i.e TerminationGracePeriodSeconds) of the Pods it creates. This PR attempts to balance the two. DaemonSet controller will now consider deleted Pods owned by a DaemonSet during creation, but it will not consider deleted Pods as targets for adoption.

fixes #50477

```release-note
#43077 introduced a condition where DaemonSet controller did not respect the TerminationGracePeriodSeconds of the Pods it created. This is now corrected.
```
2017-09-01 00:11:20 -07:00
Kubernetes Submit Queue aa50c0f54c Merge pull request #51490 from NickrenREN/eviction-podLocalEphemeralStorageUsage
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Fix pod local ephemeral storage usage calculation

We use podDiskUsage to calculate pod local ephemeral storage which is not correct, because podDiskUsage also contains HostPath volume  which is considered as persistent storage
This pr fixes it
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51489

**Special notes for your reviewer**:

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

/assign @jingxu97  @vishh 
cc @ddysher
2017-09-01 00:11:17 -07:00
Kubernetes Submit Queue c67b57d4c8 Merge pull request #51637 from mtanino/issue/51635
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Fix printISCSIVolumeSource to show kubectl describe properly

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

After merging #51189, 'kubectl describe' doesn't show persistent volume properly if the volume is iSCSI.
This PR fixes the problem.


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

**Special notes for your reviewer**:

Result without InitiatorName.
```
% k describe pv pv0001
Name:		pv0001
Labels:		<none>
Annotations:	volume.beta.kubernetes.io/storage-class=slow
StorageClass:	slow
Status:		Available
Claim:		
Reclaim Policy:	Recycle
Access Modes:	RWO
Capacity:	1Gi
Message:	
Source:
    Type:		ISCSI (an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod)
    TargetPortal:	192.168.122.85:3260
    IQN:		iqn.2017-05.com.example:rhel7
    Lun:		0
    ISCSIInterface	default
    FSType:		ext4
    ReadOnly:		true
    Portals:		[192.168.122.7:3260]
    DiscoveryCHAPAuth:	false
    SessionCHAPAuth:	false
    SecretRef:		<nil>
    InitiatorName:	<none>
Events:			<none>
```
Result with InitiatorName.
```
% k describe pv pv0001
Name:		pv0001
Labels:		<none>
Annotations:	volume.beta.kubernetes.io/storage-class=slow
StorageClass:	slow
Status:		Available
Claim:		
Reclaim Policy:	Recycle
Access Modes:	RWO
Capacity:	1Gi
Message:	
Source:
    Type:		ISCSI (an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod)
    TargetPortal:	192.168.122.85:3260
    IQN:		iqn.2017-05.com.example:rhel7
    Lun:		0
    ISCSIInterface	default
    FSType:		ext4
    ReadOnly:		true
    Portals:		[192.168.122.7:3260]
    DiscoveryCHAPAuth:	false
    SessionCHAPAuth:	false
    SecretRef:		<nil>
    InitiatorName:	iqn.1994-05.com.redhat:185ce16b55ad
Events:			<none>
```

@rootfs @humblec @jsafrane 

**Release note**:
```
NONE
```
2017-09-01 00:11:14 -07:00
Kubernetes Submit Queue 855c5e0e93 Merge pull request #51628 from jsafrane/fix-iscsi-attach
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Fix iSCSI WaitForAttach not mounting a volume

WaitForAttach failed consistently with this error:
```
Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory
```

We should ignore "no such file or directory" eror, the directory is created just few lines below.

Fixes: #51625



**Release note**:

```release-note
NONE
```

/sig storage
/assign @mtanino
2017-09-01 00:11:12 -07:00
Tim Hockin 9e2fccd1de Remove generated JSON code 2017-08-31 23:31:12 -07:00
Tim Hockin 5728b1970a Use json-iterator for JSON, kill off codecgen 2017-08-31 23:30:45 -07:00
Kubernetes Submit Queue 43a40f7ab5 Merge pull request #44680 from rrati/pvl-controller
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

Add a persistent volume label controller to the cloud-controller-manager

Part of https://github.com/kubernetes/features/issues/88

Outstanding concerns needing input:
- [x] Why 5 threads for controller processing?
- [x] Remove direct linkage to aws/gce cloud providers [#51629]
- [x] Modify shared informers to allow added event handlers ability to include uninitialized objects/using unshared informer #48893
- [x] Use cache.MetaNamespaceKeyFunc in event handler?

I'm willing to work on addressing the removal of the direct linkage to aws/gce after this PR gets in.
2017-08-31 23:13:23 -07:00
Kubernetes Submit Queue b832992fc6 Merge pull request #49257 from k82cn/k8s_42001
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

Task 1: Tainted node by condition.

**What this PR does / why we need it**:
Tainted node by condition for MemoryPressure, OutOfDisk and so on.

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

**Release note**:
```release-note
Tainted nodes by conditions as following:
  * 'node.kubernetes.io/network-unavailable=:NoSchedule' if NetworkUnavailable is true
  * 'node.kubernetes.io/disk-pressure=:NoSchedule' if DiskPressure is true
  * 'node.kubernetes.io/memory-pressure=:NoSchedule' if MemoryPressure is true
  * 'node.kubernetes.io/out-of-disk=:NoSchedule' if OutOfDisk is true
```
2017-08-31 23:13:20 -07:00
Kubernetes Submit Queue 8c8b1b5e88 Merge pull request #51574 from dillaman/ceph-rbd-image-format
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

rbd: default image format to v2 instead of deprecated v1

**What this PR does / why we need it**:
Image format v1 has been deprecated since the Infernalis release of
Ceph over two years ago.

**Release note**:
```StorageClass Ceph RBD now defaults to using the v2 image format ```
2017-08-31 23:13:15 -07:00
Kubernetes Submit Queue 17dffc1ef5 Merge pull request #51448 from kastenhq/pvc_ref_volstats
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

Add PVCRef to VolumeStats

**What this PR does / why we need it**:
For pod volumes that reference a PVC, add a PVCRef to the corresponding
volume stat. This allows metrics to be indexed/queried by PVC name
which is more user-friendly than Pod reference

**Which issue this PR fixes** : [#363](https://github.com/kubernetes/features/issues/363)

**Special notes for your reviewer**:

**Release note**:
```
`VolumeStats` reported by the kubelet stats summary API 
(http://<node>:10255/stats/summary) now include a PVCRef
field describing the PVC referenced by the volume (if any). 
```
2017-08-31 22:09:20 -07:00
Kubernetes Submit Queue b7381c3b03 Merge pull request #51515 from jianglingxia/jlx82918
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

fix typo about volumes

**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-08-31 22:09:13 -07:00
Kubernetes Submit Queue 63dfd147bf Merge pull request #51513 from yastij/aws-support-byProviderID
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448)

implementation of GetZoneByProviderID and GetZoneByNodeName for AWS

This a part of the #50926 effort

cc @luxas 

**Release note**:

```release-note
None
```
2017-08-31 22:09:10 -07:00
Kubernetes Submit Queue d56b676100 Merge pull request #51408 from feiskyer/magic
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Use constants instead of magic string for runtime names

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

Use constants instead of magic string for runtime names.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-31 21:09:17 -07:00
Kubernetes Submit Queue 393778375b Merge pull request #50212 from jhorwit2/jah/psp-hostpath
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Allow PSP's to specify a whitelist of allowed paths for host volume

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

Reverts the revert for the allowed host path feature that was moved from v1.7 to v1.8. This PR also changes the api as discussed in https://github.com/kubernetes/kubernetes/pull/47811.

Original pr: https://github.com/kubernetes/kubernetes/pull/43946
revert: https://github.com/kubernetes/kubernetes/pull/47851

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

**Special notes for your reviewer**:

cc @liggitt @ericchiang @php-coder 

It seems the api build process has changed. Hopefully I did it right 👼 .

**Release note**:

```release-note
Allow PSP's to specify a whitelist of allowed paths for host volume
```
2017-08-31 21:09:14 -07:00
Kubernetes Submit Queue 9a3dfbcab0 Merge pull request #50719 from crimsonfaith91/immutability
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Make selector immutable for v1beta2 deployment, replicaset and daemonset prior update

**What this PR does / why we need it**:
This PR ensures controller selector is immutable for deployment and replicaset prior update by ignoring any change to `Spec`.

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

**Special notes for your reviewer**:
This will be a breaking change.

**Release note**:

```release-note
For Deployment, ReplicaSet, and DaemonSet, selectors are now immutable when updating via the new `apps/v1beta2` API. For backward compatibility, selectors can still be changed when updating via `apps/v1beta1` or `extensions/v1beta1`.
```
2017-08-31 21:09:08 -07:00
Kubernetes Submit Queue 0f2c2bd847 Merge pull request #50404 from apelisse/http-cache
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Kubectl to use http caching to cache openapi responses from the server

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

This PR is trying to address the problems raised in #50254 

> * uses a disk-based cache that is not safe between processes (does not use atomic fs operations)
> * writes get/list responses to disk that should not be cached (like kubectl get secrets)
> * is vulnerable to partially written cache responses being used as responses to future requests
> * breaks uses of the client transport that make use of websockets
> * defaults to enabling the cache for any client builder using RecommendedConfigOverrideFlags or DefaultClientConfig which affects more components than just kubectl

All of these points are addressed by this pull-request:
1. It now uses atomic fs operations
2. Doesn't cache by default, only if requested by the client (and it's only done by openapi client)
3. Fixed because of atomic fs operations
4. Found the reason for the bug: Cache wrapper couldn't be unwrapped. I implemented the `WrappedRoundTripper` interface.
5. Since 2. is fixed, I think that should be fine

@smarterclayton @liggitt 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Allows kubectl to use http caching mechanism for the OpenAPI schema. The cache directory can be configured through `--cache-dir` command line flag to kubectl. If set to empty string, caching will be disabled.
```
2017-08-31 20:08:46 -07:00
Kubernetes Submit Queue b5fad6eb1b Merge pull request #50846 from FengyunPan/change-log-level
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Use 'Infof' instead of 'Errorf' for a debug log

Outputing error log for a debug is confused.

**Release note**:
```release-note
NONE
```
2017-08-31 20:08:42 -07:00
Kubernetes Submit Queue 00846fc794 Merge pull request #50123 from WIZARD-CXY/fixlog
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

make get pod log with follow option as CONNECT verb

**What this PR does / why we need it**:
Don't make the get log with follow option request mix with GET pods request. Make it reported as a WATCH pod log request.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #49998 

```release-note
Pod log attempts are now reported in apiserver prometheus metrics with verb `CONNECT` since they can run for very long periods of time.
```
2017-08-31 20:08:40 -07:00
Dong Liu 032a6d9441 Fix providerID update validation 2017-09-01 11:01:26 +08:00
Di Xu 3bc47924a9 fix bug on kubectl deleting uninitialized resources 2017-09-01 09:57:19 +08:00
Kubernetes Submit Queue 4af900b43f Merge pull request #51633 from deads2k/controller-03-wait
Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

update GC controller to wait until controllers have been initialized …

fixes #51013

Alternative to https://github.com/kubernetes/kubernetes/pull/51492 which keeps those few controllers (only one) from starting the informers early.
2017-08-31 18:43:41 -07:00
Kubernetes Submit Queue 8679a8f5fe Merge pull request #50163 from jingxu97/Aug/sizeLimit
Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

Change SizeLimit to a pointer

This PR fixes issue #50121

```release-note
The `emptyDir.sizeLimit` field is now correctly omitted from API requests and responses when unset.
```
2017-08-31 18:43:38 -07:00
Cheng Xing 52a77aaccd Added basic Flexvolume dynamic plugin discovery e2e test; added Flexvolume prober unit tests. 2017-08-31 16:50:02 -07:00
Clayton Coleman 824f04f86a
Simplify describe events table
The describe table for events is not easy to read and violates other
output guidelines. Change to use spaces (we don't use tabs in formal
output for tables). Remove columns that are not normally needed or
available on events.

Example for pods:

```
...
QoS Class:       BestEffort
Node-Selectors:  role=app
Tolerations:     <none>
Events:
  Type     Reason      Age                 From                         Message
  ----     ------      ----                ----                         -------
  Normal   Pulling     1h (x51 over 5h)    kubelet, origin-ci-ig-n-gj0x pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Normal   BackOff     8m (x1274 over 5h)  kubelet, origin-ci-ig-n-gj0x Back-off pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Warning  FailedSync  3m (x1359 over 5h)  kubelet, origin-ci-ig-n-gj0x Error syncing pod
```

Puts the type first (separate important from not), then reason (which is
the most impactful scanning field). Collapses first seen, last seen, and
times into a single field, since most of the time you care about the
last time the event happened, not the first time.
2017-08-31 19:11:01 -04:00
Derek Carr 566f411b08 Support remote runtimes with native cAdvisor support 2017-08-31 16:41:53 -04:00
Kenneth Owens 8ad18bf2ec Ensures that the DaemonSet controller does not launch a Pod on a Node while waiting for a Pod that it has previously created to terminate. 2017-08-31 10:29:03 -07:00
Antoine Pelisse d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
zhangxiaoyu-zidif 90cb1c16eb Fix local storage code to follow go style 2017-08-31 22:09:41 +08:00
Chenxingyu e49315f2db make api request verb can be overrided and make "GET" pod log request reported as "CONNECT" pod log request for metrics 2017-08-31 21:39:10 +08:00
David Eads 253b047d89 update GC controller to wait until controllers have been initialized once 2017-08-31 09:01:38 -04:00
Di Xu be0cadde2e enforce include-uninitialized in several kubectl commands 2017-08-31 16:30:56 +08:00
Di Xu a76f538304 add tests for apps/v1beta2 conversion 2017-08-31 16:23:19 +08:00
m1093782566 96882713b4 rsync iptables 2017-08-31 14:54:22 +08:00
Connor Doyle 50674ec614 Added cpu-manager-reconcile-period config.
- Defaults to sync-frequency.
2017-08-30 23:42:32 -07:00
hzxuzhonghu b80a8db6d3 update Deprecated code and fix bug not return when list pod failed 2017-08-31 14:14:51 +08:00
zhangxiaoyu-zidif 056d586840 make these tests table-driven 2017-08-31 14:08:46 +08:00
Kubernetes Submit Queue bc35234269 Merge pull request #51536 from php-coder/fix_typo_in_api_doc
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Fix typo in API docs

Typo fix for https://github.com/kubernetes/kubernetes/pull/47019#discussion_r135780591

xref #47019

CC @jessfraz @simo5
2017-08-30 15:14:36 -07:00
Kubernetes Submit Queue ffcd6d1dce Merge pull request #51465 from soltysh/cronjob_beta
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Enable batch/v1beta1.CronJobs by default

This PR moves to CronJobs beta entirely, enabling `batch/v1beta1` by default.

Related issue: #41039 

@erictune @janetkuo ptal

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-30 15:14:32 -07:00
Kubernetes Submit Queue 3019daa1dc Merge pull request #51168 from smarterclayton/fix_transport_wrap
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Allow bearer requests to be proxied by kubectl proxy

Use a fake transport to capture changes to the request and then surface
them back to the end user.

Fixes #50466

@liggitt no tests yet, but works locally
2017-08-30 15:14:29 -07:00
Antoine Pelisse a97a1ba14e c-go cache: Only cache discovery requests
Only cache discovery requests, and only for kubectl.
2017-08-30 15:01:46 -07:00
Michael Taufen 0e25cbd6a0 Separate feature gates for dynamic kubelet config vs loading from a file 2017-08-30 14:52:37 -07:00
Kenneth Owens 313a8b304a Adds the rand.SafeEncodeString function and uses this function to
generate names for ReplicaSets and ControllerRevisions.
2017-08-30 14:01:11 -07:00
crimsonfaith91 9929e03f87 ignore selector changes for deployment, replicaset and daemonset prior update 2017-08-30 13:15:19 -07:00
Kubernetes Submit Queue 6f4a15f922 Merge pull request #51627 from php-coder/fix_godoc
Automatic merge from submit-queue

Fix godoc comments

This PR fixes godoc comments.

CC @simo5
2017-08-30 13:12:37 -07:00
Kubernetes Submit Queue 374e631626 Merge pull request #50757 from NickrenREN/local-storage-limitrange
Automatic merge from submit-queue

Add local ephemeral storage support in LimitRange

**Special notes for your reviewer**:
For a single local ephemeral storage resource

xref #43607 

**Release note**:
```release-note
Add local ephemeral storage support to LimitRange
```

/assign @jingxu97 
cc @ddysher
2017-08-30 13:12:23 -07:00
David Eads aa637502e0 add reconcile command to kubectl auth 2017-08-30 16:04:00 -04:00
Jing Xu e1460efcf2 Generated files
generated files
2017-08-30 12:45:41 -07:00
Michael Taufen c18626de4a Remove deprecated and experimental fields from KubeletConfiguration
As we work towards providing a stable (v1) kubeletconfig API,
we cannot afford to have deprecated or "experimental" (alpha) fields
living in the KubeletConfiguration struct. This removes all existing
experimental or deprecated fields, and places them in KubeletFlags
instead.

I'm going to send another PR after this one that organizes the remaining
fields into substructures for readability. Then, we should try to move
to v1 ASAP.

It makes far more sense to focus on a clean API in kubeletconfig v2,
than to try and further clean up the existing "API" that everyone
already depends on.
2017-08-30 11:54:21 -07:00
Jing Xu 4d6da1fd9a Change SizeLimit to a pointer
This PR fixes issue #50121
2017-08-30 11:50:35 -07:00
Nick Sardo 644aa69da7 Reserve internal address for ILBs 2017-08-30 11:46:07 -07:00
Seth Jennings 3b80b9d518 do not update init containers status if terminated 2017-08-30 13:55:17 -04:00
mtanino f1b9e3e6e3 Fix printISCSIVolumeSource to show kubectl describe properly
Fixes #51635
2017-08-30 12:27:59 -04:00
Connor Doyle 7c6e31617d CPU Manager initialization and lifecycle calls. 2017-08-30 08:50:41 -07:00
Connor Doyle 5dee682796 CPU manager config and feature gate. 2017-08-30 08:27:23 -07:00
Balaji Subramaniam 7567f1765f Added CPU manager unit tests (none policy) 2017-08-30 08:26:22 -07:00
Seth Jennings ff471913f9 Added none policy for CPU manager. 2017-08-30 08:26:21 -07:00
Connor Doyle 01d1d8f23f Added in-memory CPU manager state. 2017-08-30 08:26:21 -07:00
Kubernetes Submit Queue e794dce445 Merge pull request #48936 from jsafrane/aws-key-check
Automatic merge from submit-queue

AWS: check validity of KSM key before creating a new encrypted disk.

AWS CreateVolume call does not check if referenced encryption key actually exists and returns a valid new AWS EBS volume even though an invalid key was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists before calling CreateVolume.

Fixes #48438

/sig aws

Please review carefully. Can we safely assume that Kubernetes controller-manager can read encryption keys?

```release-note
aws: Kubernetes now checks existence of provided KSM (Key Management Service) key before creating an encrypted AWS EBS.
```
2017-08-30 08:05:56 -07:00
Jan Safranek d9500105d8 Share /var/lib/kubernetes on startup
Kubelet makes sure that /var/lib/kubelet is rshared when it starts.
If not, it bind-mounts it with rshared propagation to containers
that mount volumes to /var/lib/kubelet can benefit from mount propagation.
2017-08-30 16:45:04 +02:00
Kubernetes Submit Queue 022919d1a4 Merge pull request #51483 from yujuhong/e2e-net-tiers
Automatic merge from submit-queue

e2e: Add tests for network tiers in GCE

This test depends on #51301, which adds the new feature. Only the `e2e: Add tests for network tiers in GCE` commit is new.
#51301 should pass this new test.
2017-08-30 06:55:35 -07:00
Jan Safranek 540752d0a1 Fix iSCSI WaitForAttach not mounting a volume
WaitForAttach failed consistently with this error:
Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory

We should ignore "no such file or directory" eror, the directory is created
just few lines below.
2017-08-30 15:34:49 +02:00
Slava Semushin 19e9e027bb Fix godoc comments. 2017-08-30 15:22:47 +02:00
Kubernetes Submit Queue a0fe767fa5 Merge pull request #51539 from saad-ali/enableAlphaGCEDiskAPI
Automatic merge from submit-queue (batch tested with PRs 51439, 51361, 51140, 51539, 51585)

Enable alpha GCE disk API

This PR builds on top of #50467 to allow the GCE disk API to use either the alpha or stable APIs.

CC @freehan
2017-08-30 03:59:35 -07:00
Kubernetes Submit Queue 99c5295fdd Merge pull request #51140 from ConnorDoyle/cpu-manager-interfaces
Automatic merge from submit-queue (batch tested with PRs 51439, 51361, 51140, 51539, 51585)

CPU manager interfaces.

Please review / merge #51132 first.
Blocker for CPU manager #49186 (3 of 6)

@sjenning @derekwaynecarr
2017-08-30 03:59:32 -07:00
Kubernetes Submit Queue 5f8d229585 Merge pull request #51361 from yastij/iscsi-handle-failedMount
Automatic merge from submit-queue (batch tested with PRs 51439, 51361, 51140, 51539, 51585)

Iscsi handle failed mount

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-30 03:59:30 -07:00
Slava Semushin 227236bd0c Fix typo in docs. 2017-08-30 12:33:37 +02:00
tcharding 8c5653d252 kubectl: Remove ending punctuation from error strings
`golint` emits 2 warnings of type:

`error strings should not end with punctuation`

Remove punctuation from end of error strings.
2017-08-30 20:33:22 +10:00
tcharding c5389815a9 kubectl: Clean up documentation for rollout_status.go
`golint` emits various warnings about missing comments for exported
funcitons and types.

This PR adds missing documentation strings to functions and types. Also
adds punctuation to current documentation strings in line with Go coding
standards.
2017-08-30 17:25:42 +10:00
hzxuzhonghu 928ac582e5 fix taint controller panic 2017-08-30 15:01:45 +08:00
Kubernetes Submit Queue 99a9ee5a3c Merge pull request #51544 from sttts/sttts-deepcopy-pkg-api
Automatic merge from submit-queue (batch tested with PRs 51228, 50185, 50940, 51544, 51543)

pkg/api: simplify deepcopy calls
2017-08-29 23:54:32 -07:00
Kubernetes Submit Queue 583c4a442a Merge pull request #51228 from wongma7/mount-options-sc
Automatic merge from submit-queue

Add storageClass.mountOptions and use it in all applicable plugins

split off from https://github.com/kubernetes/kubernetes/pull/50919 and still dependent on it. cc @gnufied


issue: https://github.com/kubernetes/features/issues/168

```release-note
Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class.
```
2017-08-29 23:48:32 -07:00
Vaibhav Kamra 1ac56d8cbb Add PVCRef to VolumeStats
For pod volumes that reference a PVC, add a PVCRef to the corresponding
volume stat. This allows metrics to be indexed/queried by PVC name
which is more user-friendly than Pod reference
2017-08-29 23:12:20 -07:00
Kubernetes Submit Queue 4d5fc46536 Merge pull request #50998 from zjj2wry/set-env
Automatic merge from submit-queue (batch tested with PRs 51377, 46580, 50998, 51466, 49749)

feat(#21648 )Add kubectl set env command.

**What this PR does / why we need it**:
#21648
Moved from OpenShift to Kubenetes.
@kargakis @smarterclayton 

**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-08-29 22:57:06 -07:00
Kubernetes Submit Queue 367cdb1a55 Merge pull request #46580 from Huawei-PaaS/kube-proxy-ipvs-pr
Automatic merge from submit-queue (batch tested with PRs 51377, 46580, 50998, 51466, 49749)

Implement IPVS-based in-cluster service load balancing

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

Implement IPVS-based in-cluster service load balancing. It can provide some performance enhancement and some other benefits to kube-proxy while comparing iptables and userspace mode. Besides, it also support more sophisticated load balancing algorithms than iptables (least conns, weighted, hash and so on).

**Which issue this PR fixes**

#17470 #44063

**Special notes for your reviewer**:


* Since the PR is a bit large, I splitted it and move the commits related to ipvs util pkg to PR #48994. Hopefully can make it easier to review.

@thockin @quinton-hoole @kevin-wangzefeng @deepak-vij @haibinxie @dhilipkumars @fisherxu 

**Release note**:

```release-note
Implement IPVS-based in-cluster service load balancing
```
2017-08-29 22:57:03 -07:00
NickrenREN 9fadd3bd9a Fix pod local ephemeral storage usage 2017-08-30 13:53:54 +08:00
Kubernetes Submit Queue 759ba487b3 Merge pull request #51377 from Random-Liu/streaming-server-stop
Automatic merge from submit-queue

Implement stop function in streaming server.

Implement streaming server stop, so that we could properly stop streaming server.

We need this to properly stop cri-containerd.
2017-08-29 22:33:31 -07:00
Dong Liu 09f0850da3 Fix InstanceTypeByProviderID for Azure 2017-08-30 13:00:21 +08:00
Kubernetes Submit Queue aa9417ce91 Merge pull request #49927 from huangjiuyuan/fix-kubelet-option-validation
Automatic merge from submit-queue (batch tested with PRs 49961, 50005, 50738, 51045, 49927)

adding validations on kubelet starting configurations

**What this PR does / why we need it**:
I found some validations of kubelet starting options were missing when I was creating a custom cluster from scratch. The kubelet does not check invalid configurations on `--cadvisor-port`, `--event-burst`, `--image-gc-high-threshold`, etc. I have added some validations in kubelet like validations in `cmd/kube-apiserver/app/options/validation.go`.

**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
Adds additional validation for kubelet in `pkg/kubelet/apis/kubeletconfig/validation`.
```
2017-08-29 21:43:42 -07:00
Kubernetes Submit Queue bb8fed88f6 Merge pull request #51045 from jcbsmpsn/rotate-kubelet-client-certificate-beta
Automatic merge from submit-queue (batch tested with PRs 49961, 50005, 50738, 51045, 49927)

Move rotating kubelet client certificate to beta.

```release-note
Release the kubelet client certificate rotation as beta.
```
2017-08-29 21:43:38 -07:00
Kubernetes Submit Queue b4a2c09ede Merge pull request #50738 from sttts/sttts-deepcopy-calls-controllers
Automatic merge from submit-queue (batch tested with PRs 49961, 50005, 50738, 51045, 49927)

controllers: simplify deepcopy calls
2017-08-29 21:43:35 -07:00
Kubernetes Submit Queue 2cf5118abb Merge pull request #49961 from mtaufen/kubectl-hash
Automatic merge from submit-queue (batch tested with PRs 49961, 50005, 50738, 51045, 49927)

Add --append-hash flag to kubectl create configmap/secret

**What this PR does / why we need it**:
Specifying this new flag will automatically hash the configmap/secret
contents with sha256 and append the first 40 hex-encoded bits of the
hash to the name of the configmap/secret. This is especially useful for
workflows that generate configmaps/secrets from files (e.g.
--from-file).

See this Google doc for more background:
https://docs.google.com/document/d/1x1fJ3pGRx20ujR-Y89HUAw8glUL8-ygaztLkkmQeCdU/edit

**Release note**:
```release-note
Adds --append-hash flag to kubectl create configmap/secret, which will append a short hash of the configmap/secret contents to the name during creation.
```
2017-08-29 21:43:29 -07:00
Dong Liu 623d32a637 Fix splitProviderID for Azure 2017-08-30 12:30:34 +08:00
m1093782566 5ed2b44ca7 implement ipvs mode of kube-proxy
Conflicts:
	pkg/util/ipvs/ipvs_unsupported.go
2017-08-30 10:03:02 +08:00
m1093782566 09a853257f wrapper ipvs API as util 2017-08-30 10:01:21 +08:00
Kubernetes Submit Queue 4457e43e7b Merge pull request #47263 from nikhita/crd-01-validation-types
Automatic merge from submit-queue

apiextensions: validation for customresources

- [x] Add types for validation of CustomResources
- [x] Fix conversion-gen: #49747
- [x] Fix defaulter-gen: kubernetes/gengo#61
- [x] Convert to OpenAPI types
- [x] Validate CR using go-openapi
- [x] Validate CRD Schema
- [x] Add integration tests
- [x] Fix round trip tests: #51204 
- [x] Add custom fuzzer functions
- [x] Add custom conversion functions
- [x] Fix data race while updating CRD: #50098 
- [x] Add feature gate for CustomResourceValidation
- [x] Fix protobuf generation

Proposal: https://github.com/kubernetes/community/pull/708
Additional discussion: https://github.com/kubernetes/kubernetes/issues/49879, https://github.com/kubernetes/kubernetes/pull/50625

**Release note**:

```release-note
Add validation for CustomResources via JSON Schema.
```

/cc @sttts @deads2k
2017-08-29 18:37:10 -07:00
Derek Carr ef9b398f4c Skip system container cgroup stats if undefined 2017-08-29 20:34:50 -04:00
saadali 4ca1dbc589 Enable switching to alpha GCE disk API 2017-08-29 17:23:25 -07:00
Jason Dillaman 68c1eea2c6 rbd: default image format to v2 instead of deprecated v1
Image format v1 has been deprecated since the Infernalis release of
Ceph over two years ago.
2017-08-29 20:11:46 -04:00
Kubernetes Submit Queue 0d17e9deb7 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```
2017-08-29 11:11:10 -07:00
Dr. Stefan Schimanski 362439db64 pkg/api: simplify deepcopy calls 2017-08-29 20:04:05 +02:00
Kubernetes Submit Queue a9c80bc97b Merge pull request #51298 from yujuhong/gce-fakes
Automatic merge from submit-queue (batch tested with PRs 51298, 51510, 51511)

GCE: Add a fake forwarding rule service

Also add more methods to the address service.  These
will be used for testing soon.
2017-08-29 10:38:14 -07:00
Dr. Stefan Schimanski 1d053c4f7c controllers: simplify deepcopy calls 2017-08-29 19:21:24 +02:00
Jacob Simpson a0d81d1abb Move rotating kubelet client certificate to beta. 2017-08-29 09:25:12 -07:00
Nikhita Raghunath 6ba1523a8e Add feature gate for CustomResourceValidation
update feature gates for generic apiserver

Add apiextensions-apiserver features to golint_failures

Ignore alpha feature if gate is disabled
2017-08-29 21:35:12 +05:30
Matthew Wong ca98b8e756 Generated storageClass.mountOptions code 2017-08-29 11:37:36 -04:00
Matthew Wong 5e772b8e4b Add storageClass.mountOptions and use it in all applicable plugins 2017-08-29 11:37:36 -04:00
Kubernetes Submit Queue 25da6e64e2 Merge pull request #48454 from weiwei04/check-job-activeDeadlineSeconds
Automatic merge from submit-queue (batch tested with PRs 44719, 48454)

check job ActiveDeadlineSeconds

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

enqueue a sync task after ActiveDeadlineSeconds

**Which issue this PR fixes** *: 

fixes #32149

**Special notes for your reviewer**:

**Release note**:

```release-note
enqueue a sync task to wake up jobcontroller to check job ActiveDeadlineSeconds in time
```
2017-08-29 08:25:06 -07:00