Commit Graph

21160 Commits (1153ef19ce0cfd747d60132ddf222dbecb84eac9)

Author SHA1 Message Date
Kubernetes Submit Queue 5be7a6a73e Merge pull request #45514 from mikedanese/cert-refactor
Automatic merge from submit-queue (batch tested with PRs 45514, 45635)

refactor certificate controller to break it into two parts

Break pkg/controller/certificates into:
* pkg/controller/certificates/approver: containing the group approver
* pkg/controller/certificates/signer: containing the local signer
* pkg/controller/certificates: containing shared infrastructure
```release-note
Break the 'certificatesigningrequests' controller into a 'csrapprover' controller and 'csrsigner' controller.
```
2017-05-23 20:52:53 -07:00
Kubernetes Submit Queue 447ee4a1c9 Merge pull request #46258 from MrHohn/esipp-fix-needsUpdate
Automatic merge from submit-queue (batch tested with PRs 42042, 46139, 46126, 46258, 46312)

Detect ExternalTrafficPolicy and HealthCheckNodePort changes in needsUpdate()

Fix a bug that editing ExternalTrafficPolicy doesn't trigger LoadBalancer update. I'm surprise that ESIPP e2e tests didn't catch this.

/assign @freehan @thockin 

**Release note**:

```release-note
NONE
```
2017-05-23 19:43:04 -07:00
Kubernetes Submit Queue 8e87c02959 Merge pull request #46139 from monopole/removeDepOnPkgHelper
Automatic merge from submit-queue (batch tested with PRs 42042, 46139, 46126, 46258, 46312)

Remove kubectl's dependence on pkg/api/helper

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

Remove kubectl's dependence on pkg/api/helper, as part of
broader effort to isolate kubectl from the rest of k8s.
In this case, the code becomes private to kubectl; nobody else uses it.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-23 19:42:59 -07:00
Kubernetes Submit Queue f30443cacc Merge pull request #42042 from perotinus/svcaccounts
Automatic merge from submit-queue (batch tested with PRs 42042, 46139, 46126, 46258, 46312)

[Federation] Use service accounts instead of the user's credentials when accessing joined clusters' API servers.

Fixes #41267.

Release notes:
```release-note
Modifies kubefed to create and the federation controller manager to use credentials associated with a service account rather than the user's credentials.
```
2017-05-23 19:42:57 -07:00
Kubernetes Submit Queue 90250220a9 Merge pull request #44428 from qiujian16/commenttypo
Automatic merge from submit-queue

Fix some typo of comment in kubelet.go

**What this PR does / why we need it**:
The PR is to fix some typo in kubelet.go

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-23 18:45:34 -07:00
Kubernetes Submit Queue 95a6f108bd Merge pull request #46289 from p0lyn0mial/admission_plugins_remove_init_blocks
Automatic merge from submit-queue

remove init blocks from all admission plugins

**What this PR does / why we need it**:
removes init blocks from all admission plugins

**Release note**:

```release-note
NONE
```
2017-05-23 17:00:59 -07:00
Kubernetes Submit Queue 45b275d52c Merge pull request #45897 from ncdc/gc-require-list-watch
Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)

GC: update required verbs for deletable resources, allow list of ignored resources to be customized

The garbage collector controller currently needs to list, watch, get,
patch, update, and delete resources. Update the criteria for
deletable resources to reflect this.

Also allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.

cc @caesarxuchao @deads2k @smarterclayton @mfojtik @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews
2017-05-23 15:48:57 -07:00
Mike Danese f04ce3cfba refactor certificate controller 2017-05-23 15:25:58 -07:00
Kubernetes Submit Queue 98c66f9fca Merge pull request #46267 from Random-Liu/extend-stop-container-request-timeout
Automatic merge from submit-queue

Double `StopContainer` request timeout.

Doubled `StopContainer` request timeout to leave some time for `SIGKILL` container.

@yujuhong @feiskyer
2017-05-23 14:06:23 -07:00
p0lyn0mial c5019bf696 remove init blocks from all admission plugins 2017-05-23 22:00:32 +02:00
Kubernetes Submit Queue 9ebfe9662f Merge pull request #46286 from zjj2wry/timstamps-timestamps
Automatic merge from submit-queue (batch tested with PRs 45587, 46286)

fix typo in kubelet

**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-05-23 10:29:58 -07:00
Kubernetes Submit Queue 1602e2a338 Merge pull request #45587 from foxish/pdb-maxunavailab
Automatic merge from submit-queue (batch tested with PRs 45587, 46286)

PDB Max Unavailable Field

Completes https://github.com/kubernetes/features/issues/285

```release-note
Adds a MaxUnavailable field to PodDisruptionBudget
```


Individual commits are self-contained; Last commit can be ignored because it is autogenerated code.
cc @kubernetes/sig-apps-api-reviews @kubernetes/sig-apps-pr-reviews
2017-05-23 10:29:56 -07:00
Random-Liu 5f0288e022 Double `StopContainer` request timeout. 2017-05-23 09:35:48 -07:00
Andy Goldstein d1a0384678 GC: allow ignored resources to be customized
Allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.
2017-05-23 12:05:09 -04:00
Anirudh 48d76edc74 PDB MaxUnavailable: Generated 2017-05-23 07:42:24 -07:00
Kubernetes Submit Queue 1f45c4846b Merge pull request #45766 from sttts/sttts-audit-event-in-context
Automatic merge from submit-queue (batch tested with PRs 45766, 46223)

Audit: fill audit.Event in handler chain

Related:
- external API types https://github.com/kubernetes/kubernetes/pull/45315
- policy checker https://github.com/kubernetes/kubernetes/pull/46009

Decisions:
- ~~[ ] decide whether we want to send an event before `WriteHeader` https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38664161~~ Follow-up described in https://github.com/kubernetes/kubernetes/pull/46065/files#r117438531
- [ ] decide how to handle `AuditID`s and the IP chain https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38659371. Is the variant in the proposal (https://github.com/kubernetes/community/pull/625) final? Then we need the API type update.
- ~~[ ] decide how to mark intermediate/incomplete events? set a special reason in `ResponseStatus.Reason` vs. having extra fields for that `Event.NonFinal`
 https://github.com/kubernetes/kubernetes/pull/45766#discussion_r116795888~~ Follow-up of #46065
- [ ] decide whether and how to protect the `Audit-Level` header https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38937691

TODOs:
- ~~[ ] move `AuditIDHeader`, `AuditLevelHeader` to types https://github.com/kubernetes/kubernetes/pull/45766#discussion_r117064094, @timstclair for the type PR~~ Follow-up of https://github.com/kubernetes/kubernetes/pull/46065
- [x] add SourceIP/ForwardedFor support https://github.com/kubernetes/kubernetes/pull/45766#discussion_r116778101
- [x] adapt ObjectReference.Resource to API PR https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38656828
2017-05-23 07:41:56 -07:00
Anirudh 078f9566d9 PDB MaxUnavailable: kubectl changes 2017-05-23 07:18:44 -07:00
Anirudh ce48d4fb5c PDB MaxUnavailable: Disruption Controller Changes 2017-05-23 07:18:44 -07:00
Anirudh 2b0de599a7 PDB MaxUnavailable: API changes 2017-05-23 07:18:43 -07:00
Kubernetes Submit Queue 4871f4a75b Merge pull request #45637 from xilabao/hide-api-version
Automatic merge from submit-queue

remove --api-version
2017-05-23 06:15:45 -07:00
zhengjiajin c79b0c797f fix typo in kubelet 2017-05-23 19:54:10 +08:00
Dr. Stefan Schimanski ce942d19c3 audit: wire through non-nil context everywhere 2017-05-23 11:20:14 +02:00
Dr. Stefan Schimanski 0b5bcb0219 audit: add audit event to the context and fill in handlers 2017-05-23 11:20:14 +02:00
Kubernetes Submit Queue 7e75998233 Merge pull request #46060 from MrHohn/fix-serviceregistry-externaltraffic
Automatic merge from submit-queue (batch tested with PRs 46060, 46234)

Randomize test nodePort to prevent collision

Fix #37982.

/assign @bowei 

**Release note**:

```release-note
NONE
```
2017-05-23 01:41:55 -07:00
Kubernetes Submit Queue 286bcc6f5c Merge pull request #45995 from humblec/glusterfs-mount-3
Automatic merge from submit-queue

Add `auto_unmount` mount option for glusterfs fuse mount.

libfuse has an auto_unmount option which, if enabled, ensures that
the file system is unmounted at FUSE server termination by running a
separate monitor process that performs the unmount when that occurs.
(This feature would probably better be called "robust auto-unmount",
as FUSE servers usually do try to unmount their file systems upon
termination, it's just this mechanism is not crash resilient.)
This change implements that option and behavior for glusterfs.

This option will be only supported for clients with version >3.11.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-23 00:29:41 -07:00
Kubernetes Submit Queue 455e9fff09 Merge pull request #46176 from vmware/vSphereStoragePolicySupport
Automatic merge from submit-queue

vSphere storage policy support for dynamic volume provisioning

Till now, vSphere cloud provider provides support to configure persistent volume with VSAN storage capabilities - kubernetes#42974. Right now this only works with VSAN.

Also there might be other use cases:

- The user might need a way to configure a policy on other datastores like VMFS, NFS etc.
- Use Storage IO control, VMCrypt policies for a persistent disk.

We can achieve about 2 use cases by using existing storage policies which are already created on vCenter using the Storage Policy Based Management service. The user will specify the SPBM policy ID as part of dynamic provisioning 

- resultant persistent volume will have the policy configured with it. 
- The persistent volume will be created on the compatible datastore that satisfies the storage policy requirements. 
- If there are multiple compatible datastores, the datastore with the max free space would be chosen by default.
- If the user specifies the datastore along with the storage policy ID, the volume will created on this datastore if its compatible. In case if the user specified datastore is incompatible, it would error out the reasons for incompatibility to the user.
- Also, the user will be able to see the associations of persistent volume object with the policy on the vCenter once the volume is attached to the node.

For instance in the below example, the volume will created on a compatible datastore with max free space that satisfies the "Gold" storage policy requirements.

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
       name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
      diskformat: zeroedthick
      storagepolicyName: Gold
```

For instance in the below example, the vSphere CP checks if "VSANDatastore" is compatible with "Gold" storage policy requirements. If yes, volume will be provisioned on "VSANDatastore" else it will error that "VSANDatastore" is not compatible with the exact reason for failure.

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
       name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
      diskformat: zeroedthick
      storagepolicyName: Gold
      datastore: VSANDatastore
```

As a part of this change, 4 commits have been added to this PR.

1. Vendor changes for vmware/govmomi
2. Changes to the VsphereVirtualDiskVolumeSource in the Kubernetes API. Added 2 additional fields StoragePolicyName, StoragePolicyID
3. Swagger and Open spec API changes.
4. vSphere Cloud Provider changes to implement the storage policy support.

**Release note**:


```release-note
vSphere cloud provider: vSphere Storage policy Support for dynamic volume provisioning
```
2017-05-22 23:41:10 -07:00
Kubernetes Submit Queue 3bfae793f0 Merge pull request #46008 from NickrenREN/openstack-add-metric
Automatic merge from submit-queue

Recording openstack metrics

add openstack operation metrics


**Release note**:
```release-note
Add support for emitting metrics from openstack cloudprovider about storage operations.
```

/assign @gnufied
2017-05-22 21:54:02 -07:00
Kubernetes Submit Queue 644a544d62 Merge pull request #46062 from alexandercampbell/correct-deprecation-errors
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

kubectl: fix deprecation warning bug

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

Some kubectl commands were deprecated but would fail to print the
correct warning message when a flag was given before the command name.

	# Correctly prints the warning that "resize" is deprecated and
	# "scale" is now preferred.
	kubectl resize [...]

	# Should print the same warning but no warning is printed.
	kubectl --v=1 resize [...]

This was due to a fragile check on os.Args[1].

This commit implements a new function deprecatedCmd() that is used to
construct new "passthrough" commands which are marked as deprecated and
hidden.

Note that there is an existing "filters" system that may be preferable
to the system created in this commit. I'm not sure why the "filters"
array was not used for all deprecated commands in the first place.

**Release note**:

```release-note
NONE
```
2017-05-22 20:58:07 -07:00
Kubernetes Submit Queue cc6e51c6e8 Merge pull request #45427 from ncdc/gc-shared-informers
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

Use shared informers in gc controller if possible

Modify the garbage collector controller to try to use shared informers for resources, if possible, to reduce the number of unique reflectors listing and watching the same thing.

cc @kubernetes/sig-api-machinery-pr-reviews @caesarxuchao @deads2k @liggitt @sttts @smarterclayton @timothysc @soltysh @kargakis @kubernetes/rh-cluster-infra @derekwaynecarr @wojtek-t @gmarek
2017-05-22 20:58:03 -07:00
Kubernetes Submit Queue 6f5193593d Merge pull request #46201 from wojtek-t/address_kubeproxy_todos
Automatic merge from submit-queue

Address remaining TODOs in kube-proxy.

Followup PR from the previous two.
2017-05-22 20:54:14 -07:00
Kubernetes Submit Queue 99a8f7c303 Merge pull request #43590 from dashpole/eviction_complete_deletion
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

Eviction does not evict unless the previous pod has been cleaned up

Addresses #43166
This PR makes two main changes:
First, it makes the eviction loop re-trigger immediately if there may still be pressure.  This way, if we already waited 10 seconds to delete a pod, we dont need to wait another 10 seconds for the next synchronize call.
Second, it waits for the pod to be cleaned up (including volumes, cgroups, etc), before moving on to the next synchronize call.  It has a timeout for this operation currently set to 30 seconds.
2017-05-22 20:00:03 -07:00
Kubernetes Submit Queue c586f36e55 Merge pull request #46209 from wojtek-t/remove_iptables_save
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

Remove Save() from iptables interface

This is what @thockin requested in one of the reviews.
2017-05-22 20:00:00 -07:00
Kubernetes Submit Queue c6cf666fa1 Merge pull request #45308 from fabianofranz/more_cmd_sanity_checks
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

More cli sanity verifications

Adds some more `kubectl` command sanity checks to improve consistency and avoid the need of code reviews for some of our CLI style and standards.

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cli-pr-reviews
2017-05-22 19:59:59 -07:00
Kubernetes Submit Queue bb56937b92 Merge pull request #46055 from deads2k/crd-01-embed
Automatic merge from submit-queue (batch tested with PRs 46022, 46055, 45308, 46209, 43590)

embed kube-apiextensions inside of kube-apiserver

To reduce operation complexity, we decided to include the kube-apiextensions-server inside of kube-apiserver (https://github.com/kubernetes/community/blob/master/sig-api-machinery/api-extensions-position-statement.md#q-should-kube-aggregator-be-a-separate-binaryprocess-than-kube-apiserver).  With the API reasonably well established and a finalizer about merge, I think its time to add ourselves.

This pull wires kube-apiextensions-server ahead of the TPRs so that one will replace the other if both are added by accident (CRDs should have priority) and wires a controller for automatic aggregation.

WIP because I still need tests: unit test for controller, test-cmd test to mirror the TPR test.


```release-note
Adds the `CustomResourceDefinition` (crd) types to the `kube-apiserver`.  These are the successors to `ThirdPartyResource`.  See https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md for more details.
```
2017-05-22 19:59:57 -07:00
Kubernetes Submit Queue e823e60bbf Merge pull request #46022 from xilabao/add-rolebinding-to-describe-command
Automatic merge from submit-queue

add rolebinding/clusterrolebinding to describe.go

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

```
./cluster/kubectl.sh describe clusterrolebinding system:kube-dns
Name:		system:kube-dns
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
Role:
  Kind:	ClusterRole
  Name:	system:kube-dns
Subjects:
  Kind			Name		Namespace
  ----			----		---------
  ServiceAccount	kube-dns	kube-system
```

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-22 19:59:20 -07:00
Balu Dontu eb3cf509e5 SPBM policy ID support in vsphere cloud provider 2017-05-22 19:45:17 -07:00
System Administrator 83520a7470 Kubernetes core API changes for vSphere 2017-05-22 19:43:29 -07:00
Kubernetes Submit Queue 199465c3a5 Merge pull request #43663 from shiywang/quato
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

Fix command exec -- COMMAND can not contain spaces

Fixes https://github.com/kubernetes/kubernetes/issues/7688
the problem is when you execute command:
 `cluster/kubectl.sh exec -p client-blue-8yw37 -c client -i -t -- 'ls -t /usr'`
the args is 
[`client-blue-8yw37` , `ls -t /usr`] 
**instead of** 
[`client-blue-8yw37`, `ls`, `-t`, `/usr`]
@kubernetes/sig-cli-pr-reviews, so I add a warning, wdyt ?
cc @ymqytw @adohe @fabianofranz
2017-05-22 19:07:12 -07:00
Kubernetes Submit Queue c2c5051adf Merge pull request #44899 from smarterclayton/burst
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

Support parallel scaling on StatefulSets

Fixes #41255

```release-note
StatefulSets now include an alpha scaling feature accessible by setting the `spec.podManagementPolicy` field to `Parallel`.  The controller will not wait for pods to be ready before adding the other pods, and will replace deleted pods as needed.  Since parallel scaling creates pods out of order, you cannot depend on predictable membership changes within your set.
```
2017-05-22 19:07:09 -07:00
Kubernetes Submit Queue a31fda9950 Merge pull request #46225 from FengyunPan/fix-missing-close-file
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

Fix missing close file

None
2017-05-22 19:07:07 -07:00
Kubernetes Submit Queue 26a0db1722 Merge pull request #45781 from robertojrojas/issue_45736
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

kubectl: fixes issues #45736 and #45737

**What this PR does / why we need it**:
This PR improves the help displayed by the `kubectl proxy` command.

**Which issue this PR fixes**: 
fixes #45736, fixes #45737 

**Special notes for your reviewer**:
NONE

**Release note**:
NONE

```release-note
```
2017-05-22 19:07:04 -07:00
Kubernetes Submit Queue 503a8421fb Merge pull request #38990 from mikedanese/go-genrule-sets
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)

migrate set generation to go_genrule

Depends on https://github.com/kubernetes/release/pull/238
2017-05-22 19:06:58 -07:00
Zihong Zheng 5f814d957e Detect ExternalTrafficPolicy and HealthCheckNodePort changes in needsUpdate() 2017-05-22 18:15:48 -07:00
Kubernetes Submit Queue 0671a46610 Merge pull request #46246 from derekwaynecarr/kubelet-events
Automatic merge from submit-queue

Fix kubelet event recording

**What this PR does / why we need it**:
There are numerous areas where the kubelet was not properly recording events due to an incorrect type.

To keep this small, I updated all references to `RefManager` that result in throwing an event to ensure it does a conversion.

**Which issue this PR fixes**
Fixes https://github.com/kubernetes/kubernetes/issues/46241
Fixes #44348
Fixes #44652

**Special notes for your reviewer**:
I updated all references I could find to the existing RefManager in kubelet.

**Release note**:
```release-note
fix kubelet event recording for selected events.
```
2017-05-22 18:12:32 -07:00
Roberto J Rojas e24384643e kubectl: fixes issues #45736 and #45737
Adds long description from #45902
2017-05-22 18:57:11 -04:00
Kubernetes Submit Queue f6b3d083b7 Merge pull request #44640 from msau42/local-pv-api
Automatic merge from submit-queue

LocalStorage api

**What this PR does / why we need it**:
API changes to support persistent local volumes, as described [here](https://github.com/kubernetes/community/pull/306)

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

**Special notes for your reviewer**:
There were a few items I was concerned about.  Will add review comments in those places.

**Release note**:

NONE

Note will be added in subsequent PR with the volume plugin changes
2017-05-22 14:39:05 -07:00
Derek Carr f59069720e Fix kubelet event recording 2017-05-22 17:24:36 -04:00
Eric Tune 12fbd82529 Merge pull request #45301 from erictune/disrupt-approve
Move PDB controller and type ownership to SIG-Apps
2017-05-22 14:21:41 -07:00
Kubernetes Submit Queue 91adb3eacf Merge pull request #44906 from k82cn/moved_qos_to_v1helper
Automatic merge from submit-queue

Moved qos to api.helpers.

**What this PR does / why we need it**:
The `GetPodQoS` is also used by other components, e.g. kube-scheduler and it's not bound to kubelet; moved it to api helpers so client-go.

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

**Release note**:

```release-note-none
```
2017-05-22 13:30:06 -07:00
Eric Tune b17e3c14eb Move PDB controller and type ownership to SIG-Apps
Created OWNERS_ALIASES called sig-apps-reviewers from the union of reviewers in:
 pkg/controller/{cronjob,deployment,daemon,job,replicaset,statefulset}/OWNERS
except removed inactive user bprashanth

Created OWNERS_ALIASES called sig-apps-api-reviewers as the intersection
of sig-apps-reviewers and the approvers from pkg/api/OWNERS.

Used those OWNERS_ALIASES as the reviewers/approvers for the disruption controller,
and API.
2017-05-22 12:55:28 -07:00