Commit Graph

21014 Commits (b3fc6556e4d59e00d360f7fd8035e606a032603b)

Author SHA1 Message Date
Alexander Campbell b3fc6556e4 kubectl: improve docstring on deprecatedCmd 2017-05-19 08:55:12 -07:00
Alexander Campbell 9e7f29c3fb cmd: fix deprecation warning bug
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 scale [...]

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

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.
2017-05-18 16:48:13 -07:00
Kubernetes Submit Queue 17b22cb01c Merge pull request #45315 from timstclair/audit-api
Automatic merge from submit-queue

Advanced audit logging API

This is an initial implementation of the API proposed in https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auditing.md

This deviates from the exact API specified in the proposal in a number of ways. Here's a list of some of the changes I made, and why:

- General API conformance (`metav1.{Type,List}Meta`, +optional, etc.)
- Dropped fields that won't be part of the initial implementation (storage objects & filters), to be added later
- {Request,Response}Body -> {Request,Response}Object - This is actually what the proposal originally had, and will be much better for adding Filters later, and provides a less protocol-dependent API. Note that there is currently no way to include Response body for non-resource requests.
- Drop HttpMethod - redundant with verb
- Response{StatusCode,ErrorMessage} collapsed into `ResponseStatus *metav1.Status` - This is the standard response type for resourec errors, but can hold genereric error responses too. Note that this is part of the `Metadata` Level.

/cc @kubernetes/sig-auth-api-reviews @kubernetes/api-reviewers
2017-05-18 14:23:53 -07:00
Kubernetes Submit Queue be71ec717b Merge pull request #45201 from vmware/network_id
Automatic merge from submit-queue

Same internal and external ip for vSphere Cloud Provider

Currently, vSphere Cloud Provider reports internal ip as container ip addresses. This PR modifies vSphere Cloud Provider to report same ip address as both internal and external that is provided by vmware infrastructure. 
cc @pdhamdhere @tusharnt @BaluDontu @divyenpatel @luomiao
2017-05-18 13:31:02 -07:00
Kubernetes Submit Queue 5f3f170919 Merge pull request #39488 from liggitt/flex-metadata
Automatic merge from submit-queue

Pass pod metadata to flex plugin

Normal volume plugins get the pod spec to pull information from when setting up their volume, but flex plugins do not.

If a flex volume wants to set up things unique to the pod, or limited in permission based on the service account, the pod namespace, name, uid, and service account name are needed.

This PR adds pod uid, name, namespace, and service account name to the options passed to the plugin available during mounting

```release-note
The options passed to a flexvolume plugin's mount command now contains the pod name (`kubernetes.io/pod.name`), namespace (`kubernetes.io/pod.namespace`), uid (`kubernetes.io/pod.uid`), and service account name (`kubernetes.io/serviceAccount.name`).
```
2017-05-18 12:29:04 -07:00
Kubernetes Submit Queue f231576f29 Merge pull request #45443 from abrarshivani/owners_cloud_providers
Automatic merge from submit-queue

Add approvers to vsphere cloudprovider

This PR adds approvers for vSphere Cloud provider.
cc @pdhamdhere @tusharnt @BaluDontu @divyenpatel @luomiao
2017-05-18 11:36:25 -07:00
Kubernetes Submit Queue f760d5a592 Merge pull request #46001 from bowei/alpha-to-beta
Automatic merge from submit-queue

Use beta GCP API instead of alpha in CloudCIDR controller

The feature we are using has been promoted to beta.

```release-note
NONE
```
2017-05-18 11:36:19 -07:00
Tim St. Clair dd9e0ecd06
Misc proto changes 2017-05-18 10:39:06 -07:00
Tim St. Clair 6565f68cfa
Update generated files 2017-05-18 10:39:04 -07:00
Kubernetes Submit Queue 2ff902b672 Merge pull request #45937 from smarterclayton/init_api
Automatic merge from submit-queue

Add initializers to ObjectMeta and a new filter on ListOptions

Will support admission extension by allowing controllers to interact with objects before they are visible to the rest of the API.

Part of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_extension.md
2017-05-18 10:17:15 -07:00
Kubernetes Submit Queue a1c2db2fec Merge pull request #45950 from shyamjvs/revert-proxier
Automatic merge from submit-queue

Make real proxier in hollow-proxy optional (default=true)

Ref https://github.com/kubernetes/kubernetes/pull/45622
This allows using real proxier for hollow proxy, but we use the fake one by default.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-05-18 07:55:09 -07:00
Clayton Coleman bdd4d34c7d
generated: api changes 2017-05-18 10:07:47 -04:00
Clayton Coleman 668442321e
Add initializers and includeUninitialized to the API 2017-05-18 10:07:45 -04:00
Shyam Jeedigunta 804a4f558c Make usage of real proxier in hollow-proxy optional (default=true) 2017-05-18 14:30:12 +02:00
Kubernetes Submit Queue 212150b66a Merge pull request #45582 from CaoShuFeng/kubectl_set
Automatic merge from submit-queue

avoid concrete examples for missingResourceError

missingResourceError uses pod and services as an example in error message. However some sub-commands doesn't support pod/service, this change use `<resource> <name>` instead of concrete examples.
Before this change:
```console
$ kubectl set subject
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   'pods my-pod'
   'services'
```

After this change:
```console
$ kubectl set subject
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   '<resource> <name>'
   '<resource>'
```

**Release note**:

```release-note
avoid concrete examples for missingResourceError
```
2017-05-18 00:37:08 -07:00
Kubernetes Submit Queue 7abb2641c5 Merge pull request #46013 from NickrenREN/openstack-reviewer
Automatic merge from submit-queue

Add myself to openstack review pool

**Release note**:
```release-note
NONE
```
2017-05-17 23:48:35 -07:00
Kubernetes Submit Queue f706b81007 Merge pull request #45642 from JiangtianLi/jiangtli-fixdns2
Automatic merge from submit-queue

Fix the issue in Windows kube-proxy when processing unqualified name. This is for DNS client such as ping or iwr that validate name in response and original question.

**What this PR does / why we need it**:
This PR is an additional fix to #41618 and [the corresponding commit](b9dfb69dd7). The DNS client such as nslookup does not validate name matching in response and original question. That works fine when we append DNS suffix to unqualified name in DNS query in Windows kube-proxy. However, for DNS client such as ping or Invoke-WebRequest that validates name in response and original question, the issue arises and the DNS query fails although the received DNS response has no error. 

This PR fixes the additional issue by restoring the original question name in DNS response. Further, this PR refactors DNS message routines by using miekg's DNS library.

This PR affects the Windows kube-proxy only.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix DNS suffix search list support in Windows kube-proxy.
```
2017-05-17 23:48:27 -07:00
Kubernetes Submit Queue 7f27cebe49 Merge pull request #45869 from MrHohn/esipp-default-move
Automatic merge from submit-queue

Move defaulting logic for ExternalTrafficPolicy into defaults.go

Link #45812.

Per [#45812/comment](https://github.com/kubernetes/kubernetes/issues/45812#issuecomment-301632807), move defaulting logic to defaults.go so that federation will get the same code.

This PR does not have any functional change :)

/assign @freehan @thockin 
/cc @madhusudancs @nikhiljindal @shashidharatd
Also /cc @caesarxuchao per the client-go changes.

**Release note**:

```release-note
NONE
```
2017-05-17 22:56:13 -07:00
NickrenREN 9370808a35 Add myself to openstack review pool 2017-05-18 13:37:48 +08:00
Jordan Liggitt b22ff25638
Pass pod metadata to flex plugin 2017-05-18 00:49:18 -04:00
Dawn Chen dddc6b863e Merge pull request #46004 from MrHohn/revert-remove-sync-reason
Revert "Remove reasons from iptables syncProxyRules"
2017-05-17 21:45:13 -07:00
Kubernetes Submit Queue 7df0178076 Merge pull request #42975 from smarterclayton/time_namespace
Automatic merge from submit-queue (batch tested with PRs 40234, 45885, 42975)

Log how much time it takes e2e tests to clean up the namespace
2017-05-17 20:27:52 -07:00
Kubernetes Submit Queue faf556ecbf Merge pull request #45885 from zhangxiaoyu-zidif/kubelet_test-delete-redundant-para
Automatic merge from submit-queue (batch tested with PRs 40234, 45885, 42975)

delete unused para.

**What this PR does / why we need it**:
delete unused para.

**Release note**:

```release-note
NONE
```
2017-05-17 20:27:50 -07:00
Kubernetes Submit Queue 6dbe853e29 Merge pull request #45544 from ianchakeres/reconciler-err-cleanup
Automatic merge from submit-queue (batch tested with PRs 45990, 45544, 45745, 45742, 45678)

Refactor reconciler volume log and error messages

**What this PR does / why we need it**:
Utilizes volume-specific error and log messages introduced in #44969, inside files that also log volume information. 

Specifically: 

- pkg/kubelet/volumemanager/reconciler/reconciler.go, 
- pkg/controller/volume/attachdetach/reconciler/reconciler.go, and
- pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go


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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
NONE
2017-05-17 18:40:51 -07:00
Kubernetes Submit Queue 7f183142de Merge pull request #45990 from dashpole/fix_gc
Automatic merge from submit-queue

[Bug Fix] Return quantity freed even when an error exists

bug was added by #44986.  If we get an error from deleteImages, we try and use the bytes freed in a calculation.
That PR changed the behavior from evicting a pod upon error, to panicking because of the nil pointer.

This should fix inode eviction tests

/assign @dchen1107
2017-05-17 18:03:59 -07:00
Zihong Zheng aca4d469b2 Revert "Remove reasons from iptables syncProxyRules"
This reverts commit 77624a12d3.
2017-05-17 16:33:13 -07:00
Bowei Du c77ffb2685 Use beta GCP API instead of alpha in CloudCIDR controller
The feature we are using has been promoted to beta.
2017-05-17 16:18:29 -07:00
Kubernetes Submit Queue 6e12c4cdbd Merge pull request #45890 from zjj2wry/xx
Automatic merge from submit-queue (batch tested with PRs 45977, 45890)

add test to cover more in kubectl create service

**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
```
2017-05-17 15:39:04 -07:00
Kubernetes Submit Queue ed8ce901f8 Merge pull request #45977 from yujuhong/started_time
Automatic merge from submit-queue (batch tested with PRs 45977, 45890)

kuberuntime: report StartedAt regardless of container states

This fixes #45943

**Release note**:
```release-note
Fix the bug where StartedAt time is not reported for exited containers.
```
2017-05-17 15:39:01 -07:00
Clayton Coleman 7da310ea28
Fix namespace controller logging to be consistent
time.Now() was wrong, simplify namespace controller output
2017-05-17 17:45:05 -04:00
Kubernetes Submit Queue 9a9a296556 Merge pull request #45889 from wojtek-t/kube_proxy_handlers
Automatic merge from submit-queue (batch tested with PRs 45953, 45889)

Add /metrics and profiling handlers to kube-proxy

Also expose "syncProxyRules latency" as a prometheus metrics.

Fix https://github.com/kubernetes/kubernetes/issues/45876
2017-05-17 13:56:47 -07:00
Yu-Ju Hong de0438a5c8 kuberuntime: add unit tests for container status population
Also refactor a little bit to make the function more testable.
2017-05-17 13:14:00 -07:00
David Ashpole c9f58c0cd5 dont return nil quantities when calling deleteImages, as this quantity is used regardless of err 2017-05-17 12:58:41 -07:00
Zihong Zheng 931892af8a Autogenerated files 2017-05-17 12:55:56 -07:00
Zihong Zheng a28a22df11 Move defaulting logic for ExternalTrafficPolicy into defaults.go 2017-05-17 12:47:01 -07:00
Kubernetes Submit Queue 799283f2e7 Merge pull request #45941 from cblecker/gengo
Automatic merge from submit-queue (batch tested with PRs 45852, 45965, 45941)

Update k8s.io/gengo dependency

**What this PR does / why we need it**:
Brings in changes to improve type checker and deep copy

**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-17 12:32:51 -07:00
Kubernetes Submit Queue ac62748480 Merge pull request #44230 from mtaufen/remove-babysit-daemons
Automatic merge from submit-queue

Remove the deprecated --babysit-daemons kubelet flag

```release-note
Removes the deprecated kubelet flag --babysit-daemons
```

This flag has been deprecated for over a year (git blame says marked deprecated on March 1, 2016).
Relatively easy removal - nothing in the Kubelet relies on it anymore.

There was still some stuff in the provisioning scripts. It was easy to rip out, but in general we probably need to be more disciplined about updating the provisioning scripts at the same time that we initially mark things deprecated.
2017-05-17 11:23:17 -07:00
Yu-Ju Hong 7c75f5c551 kuberuntime: report StartedAt for exited containers 2017-05-17 11:14:09 -07:00
Kubernetes Submit Queue 4a9a702ee1 Merge pull request #45926 from MrHohn/api-annotations-move
Automatic merge from submit-queue

Move all API related annotations into annotation_key_constants.go

Separate from #45869. See https://github.com/kubernetes/kubernetes/pull/45869#discussion_r116839411 for details.

This PR does nothing but move constants around :)

/assign @caesarxuchao 

**Release note**:

```release-note
NONE
```
2017-05-17 10:34:53 -07:00
Wojciech Tyczynski 45ed99c3a6 Add syncProxyRules prometheus metric 2017-05-17 19:26:58 +02:00
Wojciech Tyczynski e35b1c21a1 Expose /metrics and /debug/pprof from kube-proxy 2017-05-17 19:23:58 +02:00
Kubernetes Submit Queue 2cf0169092 Merge pull request #45895 from humblec/glusterfs-defacto
Automatic merge from submit-queue

Make interface references consistent across the gluster plugin code.
2017-05-17 09:42:40 -07:00
Michael Taufen 2ee2ec5e21 Remove the deprecated --babysit-daemons kubelet flag 2017-05-17 09:08:57 -07:00
deads2k edd2d973a3 stop setting bad defaults that are indistinguishable from real values for clients 2017-05-17 07:18:34 -04:00
deads2k 75bd27a595 remove unnessary confusion of dead values 2017-05-17 07:15:29 -04:00
Christoph Blecker 4361a9146e
Update generated files 2017-05-17 00:59:52 -07:00
Kubernetes Submit Queue 8863bd4353 Merge pull request #45709 from YuPengZTE/devGetAllDaemonSetPods
Automatic merge from submit-queue (batch tested with PRs 45709, 41939)

delete err when return _

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



**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
```
2017-05-16 23:11:49 -07:00
Kubernetes Submit Queue bcf5837c94 Merge pull request #45912 from nicksardo/gce-src-ip-dedupe
Automatic merge from submit-queue (batch tested with PRs 45884, 45879, 45912, 45444, 45874)

[GCE] Removed duplicate CIDR

**What this PR does / why we need it**:
Removes a duplicate CIDR in the list of LB source CIDRs.
https://cloud.google.com/compute/docs/load-balancing/network/ and https://cloud.google.com/compute/docs/load-balancing/http/ both list `35.191.0.0/16`.  Only one is needed.

**Release note**:

```release-note
NONE
```
2017-05-16 22:18:54 -07:00
Zihong Zheng 5992425588 Autogenerated files 2017-05-16 21:55:51 -07:00
Zihong Zheng c0920f75cf Move API annotations into annotation_key_constants and remove api/annotations package 2017-05-16 21:55:23 -07:00