Commit Graph

21060 Commits (8013212db54e95050c622675c6706cce5de42b45)

Author SHA1 Message Date
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
Humble Chirammal 11f1152e77 Add missing parameters of iscsi volume source to describe printer.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-18 17:08:13 +05:30
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
Alexander Block 06baeb33b2 Don't try to attach volumes which are already attached to other nodes 2017-05-18 06:56:30 +02: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
Nick Sardo 87a5edd2cd Initialize cloud providers with a K8s clientBuilder 2017-05-17 14:38:25 -07: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
Paul Michali 65342a0000 IPv6 support for hexCIDR()
Includes these changes:
- Modified so that IPv6 CIDRs can be converted correctly.
- Added test cases for IPv6 addresses.
- Split UTs for hexCIDR() and asciiCIDR() so that masking can be tested.
- Add UTs for failure cases.

Note: Some code that calls hexCIDR() builds a CIDR from the pod IP string
and the concatenation of "/32". These should, in the future, use "128",
if/when the pod IP is IPv6. Not addressed as part of this commit.
2017-05-17 20:35:37 +00: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
Humble Chirammal 19ecd5bd62 Make interface references consistent across the plugin code.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-17 10:19:56 +05:30
Kubernetes Submit Queue 6f4e0b66a7 Merge pull request #44685 from smarterclayton/serverside_get_api
Automatic merge from submit-queue (batch tested with PRs 44520, 45253, 45838, 44685, 45901)

API for server side tabular output

These are the APIs necessary to implement propsoal kubernetes/community#363

They consist of a new meta group (v1alpha1) that indicates these are alpha apis for the server as a whole, a new kind `TableList` which is a simple row + header arranged table capable of returning both object and columnar data, a `TableListOptions` for altering the behavior of the return, and `PartialObjectMetadata` which is an "interface" style API object which allows a client to ask any object for their metadata (without having to know how to parse the object or perform gymnastics).

Extracted from #40848

A few minor tweaks still required.
2017-05-16 21:28:00 -07:00
Kubernetes Submit Queue 79dae5c092 Merge pull request #45810 from superbrothers/expand-env-vals
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

kubectl plugin: Expand environment variables in the command of plugin.yaml

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

This commit improves kubectl plugins to expand environment variables in the command of plugin.yaml.
I'd like to use environment variables in the command of plugin.yaml as follows:
```yaml
name: hello
shortDesc: "The hello plugin"
longDesc: >
  The hello plugin is a new
  plugin used by test-cmd
  to test multiple plugin locations.
command: $HOME/path/to/plugins/hello.sh
```

**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-16 19:01:57 -07:00
Kubernetes Submit Queue 3f0ebbe884 Merge pull request #45247 from mbohlool/c3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

Apiregistration v1alpha1→v1beta1

Promoting apiregistration api from v1alpha1 to v1beta1.

API Registration is responsible for registering an API `Group`/`Version` with
another kubernetes like API server. The `APIService` holds information
about the other API server in `APIServiceSpec` type as well as general
`TypeMeta` and `ObjectMeta`. The `APIServiceSpec` type have the main
configuration needed to do the aggregation. Any request coming for
specified `Group`/`Version` will be directed to the service defined by
`ServiceReference` (on port 443) after validating the target using provided
`CABundle` or skipping validation if development flag `InsecureSkipTLSVerify`
is set. `Priority` is controlling the order of this API group in the overall
discovery document.
The return status is a set of conditions for this aggregation. Currently
there is only one condition named "Available", if true, it means the
api/server requests will be redirected to specified API server.

```release-note
API Registration is now in beta.
```
2017-05-16 19:01:55 -07:00
Kubernetes Submit Queue 2c2c92659a Merge pull request #44474 from ahmetb/fix-types-links
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Update 'More info' links on API types and fields

> **Please just review the first commit, the rest is generated files.**

Recent docs website shuffling during 1.6 caused majority of links in the API
types and fields to break. Since we do not have server-side 301 redirects, user
has to click an extra link, and the #target fragment in the URL will be lost.  (This is
because GitHub’s redirect_from feature is not ideal.) 

For the time being, I have manually gone through all of them to bring them up to date
and add HTTPS to those missing it. This is a docs-only change and impacts generated
code, generated swaggers, API reference docs etc.

cc: @steveperry-53 @devin-donnelly @chenopis fyi, docs links changes (even small title changes) easily breaks links in API reference, Swagger, kubectl explain, and many other places.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-16 18:11:04 -07:00
Kubernetes Submit Queue 7f92d35f1c Merge pull request #45739 from timothysc/cm_lock
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Allow kcm and scheduler to lock on ConfigMaps.

**What this PR does / why we need it**:
Plumbs through the ability to lock on ConfigMaps through the kcm and scheduler.  

**Which issue this PR fixes** 
Fixes: #44857
Addresses issues with: #45415

**Special notes for your reviewer**:

**Release note**:

```
Add leader-election-resource-lock support to kcm and scheduler to allow for locking on ConfigMaps as well as Endpoints(default) 
```
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @jamiehannaford @bsalamat @mikedanese
2017-05-16 18:10:57 -07:00
Kubernetes Submit Queue f171683242 Merge pull request #44537 from FengyunPan/fix-volume-bug
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Fix attach volume to instance repeatedly

1.When volume's status is 'attaching', controllermanager will attach
    it again and return err. So it is necessary to check volume's
    status before attach/detach volume.

   2. When volume's status is 'attaching', its attachments will be None,
    controllermanager can't get device path and make some failed event.
    But it is normal, so don't return err when attachments is None

Fix bug: #44536
2017-05-16 18:10:55 -07:00
Kubernetes Submit Queue b10fd19232 Merge pull request #45625 from Random-Liu/fix-log-line
Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403)

Make a log line more clear in kuberuntime_manager.go.

Make a log in `podSandboxChanged` more clear.

@yujuhong @feiskyer
2017-05-16 16:14:56 -07:00
Ivan Shvedunov ef85747e14 Fix serialization of EnforceNodeAllocatable
EnforceNodeAllocatable being `nil` and `[]` are treated in different
ways by kubelet. Namely, `nil` is replaced with `[]string{"pods"}` by
the defaulting mechanism.

E.g. if you run kubelet in Docker-in-Docker environment
you may need to run it with the following options:
`--cgroups-per-qos=false --enforce-node-allocatable=`
(this corresponds to EnforceNodeAllocatable being empty array and not
null) If you then grab kubelet configuration via /configz and try to
reuse it for dynamic kubelet config, kubelet will think that
EnforceNodeAllocatable is null, failing to run in the
Docker-in-Docker environment.

Encountered this while updating Virtlet for Kubernetes 1.6
(the dev environment is based on kubeadm-dind-cluster)
2017-05-17 02:10:51 +03:00
Zihong Zheng a82676a126 Keep annotation_key_constants consistent 2017-05-16 14:25:30 -07:00
Nick Sardo 908bcc3b24 Removed duplicate CIDR 2017-05-16 14:24:57 -07:00
Kubernetes Submit Queue 88a3b5babd Merge pull request #45111 from dwradcliffe/fix_kubelet_config_ignore
Automatic merge from submit-queue

kubelet: use the base filename to check if the filename starts with a dot

**What this PR does / why we need it**:
Fixes a bug in https://github.com/kubernetes/kubernetes/pull/39196. The goal was to ignore files that start with a dot but the value used is the full absolute filename including path.

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

@yujuhong

**Release note**:
```release-note
kubelet config should actually ignore files starting with dots
```
2017-05-16 11:39:02 -07:00
Kubernetes Submit Queue f82bdca459 Merge pull request #44326 from xlgao-zju/forcibly-remove
Automatic merge from submit-queue (batch tested with PRs 44326, 45768)

[CRI] Forcibly remove container

Forcibly remove the running containers in `RemoveContainer`. Since we should forcibly remove the running containers in `RemovePodSandbox`. See [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/api/v1alpha1/runtime/api.proto#L35).

cc @feiskyer @Random-Liu 

Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-05-16 10:39:05 -07:00
David Radcliffe aa4fdf5907 use the base filename to check if the filename starts with a dot 2017-05-16 12:17:58 -04:00
Kubernetes Submit Queue 11a6f190be Merge pull request #45528 from humblec/glusterfs-code-refactor
Automatic merge from submit-queue (batch tested with PRs 45408, 45355, 45528)

Make createEndpointService() and deleteEndpointService() plugin interface methods.

Why this change?

In some setups, after creation of dynamic PVs and before mounting/using these  PVs in a pod, the endpoint/service got mistakenly deleted by the user/developer. By making these methods 'plugin' specific, we can call it from mounter if there are scenarios where the endpoint and service got wiped in between accidentally.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-16 09:12:00 -07:00
Kubernetes Submit Queue ece4124e17 Merge pull request #45355 from p0lyn0mial/admission_options_spits_out_admission_control
Automatic merge from submit-queue (batch tested with PRs 45408, 45355, 45528)

Admission options spits out admission control

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

This PR adds ApplyTo method to AdmissionOptions struct. The method creates and initialises admission control to the server configuration.

**Release note**:

```
NONE
```
2017-05-16 09:11:54 -07:00
Kubernetes Submit Queue 576d1d243e Merge pull request #45408 from Carlory/fix-typo
Automatic merge from submit-queue

fix typo in docker_container.go

Signed-off-by: Carlory <fanbaofa@gmail.com>



**What this PR does / why we need it**:
fix typo in docker_container.go

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-05-16 09:06:38 -07:00
Kubernetes Submit Queue a4aaaf69e8 Merge pull request #45769 from zhangxiaoyu-zidif/add-describe-pod-node
Automatic merge from submit-queue

describe pod: add unit test for Node

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

Add unit test for "describe pod" in order to get node info.

**Release note**:

```release-note
NONE
```
2017-05-16 08:17:17 -07:00
Humble Chirammal 936c81ddfb Recreate endpoint/service if it lost in between.
In some setups, after creation of dynamic PVs and before mounting/using
these PVs in a pod, the endpoint/service got mistakenly deleted by the
user/developer. By making these methods 'plugin' specific, we can call
it from mounter if there are scenarios where the endpoint and service
got wiped in between accidentally.

Signed-off-by: Humble Chirammal hchiramm@redhat.com
2017-05-16 19:51:21 +05:30
Kubernetes Submit Queue c5e9031d7d Merge pull request #45856 from shyamjvs/save-iptables
Automatic merge from submit-queue

Make fake iptables' Save operation more realistic

Ref https://github.com/kubernetes/kubernetes/pull/45622#issuecomment-301624384 (2nd point)

This would make fake IPtables actually return the iptable contents it stores.

cc @kubernetes/sig-scalability-misc @wojtek-t
2017-05-16 04:28:34 -07:00
zhangxiaoyu-zidif 471f97526b delete unused para. 2017-05-16 18:46:29 +08:00
zhengjiajin 735e32ef83 add test to cover more in kubectl create service 2017-05-16 18:45:38 +08:00
Shyam Jeedigunta da924fc337 Make fake iptables' Save operation more realistic 2017-05-16 11:58:44 +02:00
Kubernetes Submit Queue 2879b2cb84 Merge pull request #44612 from nikhita/fix-patch-crash
Automatic merge from submit-queue

Fix kube-apiserver crash when patching TPR data

**What this PR does / why we need it**: While trying to do a strategic merge patch, kube-apiserver crashes with a nil pointer dereference because `UnsafeConvertor` is `nil` for TPR data resources here: https://github.com/kubernetes/kubernetes/blob/master/pkg/master/thirdparty/thirdparty.go#L314-L337.

This PR does not make strategic merge patch work on TPR data but makes sure that the kube-api server does not crash while trying to do so.

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-05-16 01:48:15 -07:00
yupengzte e463c28db6 delete err when return _
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-16 16:15:06 +08:00
Kubernetes Submit Queue 15a8ab33b8 Merge pull request #44915 from xiangpengzhao/fix-kubectl-run-pod-label
Automatic merge from submit-queue

Assign label to pod when exec 'kubectl run' command with flags "--expose=true" and "--restart=Never"

**What this PR does / why we need it**:
As the title says and issue #40503 mentioned.
cc @tanapoln 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-15 21:52:45 -07:00
Kubernetes Submit Queue 746f5d6a28 Merge pull request #45664 from tacy/fix45213
Automatic merge from submit-queue (batch tested with PRs 45664, 45861)

Fix #45213: Syncing jobs would return error when podController exception

**What this PR does / why we need it**:
Jobcontroller:  Syncing jobs would return error when podController exception
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes #45213 
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-15 21:08:48 -07:00
Kubernetes Submit Queue 560323ad9b Merge pull request #45389 from monopole/isolation1
Automatic merge from submit-queue (batch tested with PRs 45835, 45389)

Introduce visibility rules to kubernetes code.

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

Use rules to identify "bad" dependencies on kubectl code for later refactoring or removal, and prevent their reintroduction.

**Which issue this PR fixes**

First in a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-15 19:34:52 -07:00
Kubernetes Submit Queue 24cb1cec64 Merge pull request #45758 from caesarxuchao/remove-vendor-heapster-v1alpha1
Automatic merge from submit-queue (batch tested with PRs 44337, 45775, 45832, 45574, 45758)

Stop vendoring heapster v1alpha1

Changes to use the one in staging/metrics.

TODO: remove the exception in https://github.com/kubernetes/kubernetes/pull/45176

Implementing https://github.com/kubernetes/kubernetes/issues/45498#issuecomment-301013423.
2017-05-15 18:39:20 -07:00
Kubernetes Submit Queue c03e4952a3 Merge pull request #45574 from zhangxiaoyu-zidif/format-daemondset-for
Automatic merge from submit-queue (batch tested with PRs 44337, 45775, 45832, 45574, 45758)

daemoncontroller.go:format for

**What this PR does / why we need it**:
format for.
delete redundant para.
make code clean.

**Release note**:

```release-note
NONE
```
2017-05-15 18:39:18 -07:00
Kubernetes Submit Queue 7cd32aba17 Merge pull request #45775 from liggitt/mirror-pod-validation
Automatic merge from submit-queue (batch tested with PRs 44337, 45775, 45832, 45574, 45758)

Tighten validation of mirror pod annotations

Tightens validation for pods with a mirror pod annotation:
1. spec.nodeName must be set
2. makes the mirror pod annotation immutable
3. starts validating pod-specific annotations during pod status update

None of these changes affect usage of the mirror pod annotation by kubelets, which only set it on pod creation (verified this is true back to 1.5.x)

the second commit updates the pod validation tests to look for specific error messages (best reviewed ignoring whitespace changes)

This is the validation portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and https://github.com/kubernetes/features/issues/279

```release-note
Mirror pods must now indicate the nodeName they are bound to on creation. The mirror pod annotation is now treated as immutable and cannot be added to an existing pod, removed from a pod, or modified.
```
2017-05-15 18:39:13 -07:00
Cao Shufeng b53ae95e84 modify the example part of missingResourceError
"missingResourceError" is a generic error for kubectl, so we should
not use concrete examples in the error message.
2017-05-16 09:37:37 +08:00
Kubernetes Submit Queue 521d7d1ac5 Merge pull request #42472 from timchenxiaoyu/requesttypo
Automatic merge from submit-queue

fix request typo
2017-05-15 15:57:57 -07:00
mbohlool 103c1bfc1e Update generated files 2017-05-15 15:34:33 -07:00
mbohlool e2f20a3539 Promote apiregistration from v1alpha1 to v1beta1 2017-05-15 15:34:33 -07:00
p0lyn0mial 7b0950b298 bazel update 2017-05-16 00:18:38 +02:00
Kubernetes Submit Queue e11963194e Merge pull request #45808 from Crazykev/quick-fix
Automatic merge from submit-queue (batch tested with PRs 45171, 43947, 45788, 45822, 45808)

[CRI] Continue remove image when can't find image id with ImageRef

Signed-off-by: Crazykev <crazykev@zju.edu.cn>



**What this PR does / why we need it**: 
Should try to remove imageRef as repo:tag when can't find it as imageID.
/cc @feiskyer @Random-Liu  PTAL
also /cc @xlgao-zju @heartlock

**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-15 14:24:51 -07:00
Kubernetes Submit Queue 1e48f5b40b Merge pull request #45788 from zhangxiaoyu-zidif/describe-pod-node-nil
Automatic merge from submit-queue (batch tested with PRs 45171, 43947, 45788, 45822, 45808)

Display <none> for kubectl describe pod when node is empty.

**What this PR does / why we need it**:
Display <none> for kubectl describe pod when node is empty.

**Special notes for your reviewer**:
refer to #45572

**Release note**:

```release-note
NONE
```
2017-05-15 14:24:47 -07:00
Kubernetes Submit Queue 5b417e4458 Merge pull request #43947 from xiangpengzhao/describe-cleanup
Automatic merge from submit-queue (batch tested with PRs 45171, 43947, 45788, 45822, 45808)

Cleanup kubectl describe code

**What this PR does**:
- move all `tabbedString` into separate functions to keep same style
- delete unused functions
2017-05-15 14:24:44 -07:00
Ahmet Alp Balkan 455baadc40
Autogenerated files
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 14:15:30 -07:00
Chao Xu 36e2d0b4cb hack/update-bazal.sh
hack/update-godep-license
2017-05-15 13:51:39 -07:00
Chao Xu d9c2fbbf23 rely on staging/metrics instead of on
vendor/k8s.io/heapster/metrics/apis/metrics/v1alpha1

fix some related imports
2017-05-15 13:50:49 -07:00
Ahmet Alp Balkan 893280d3e4
Update 'More info' links on API types and fields
Recent docs website shuffling during 1.6 caused majority of links in the API
types and fields to break. Since we do not have server-side 301 redirects, user
has to click an extra link and the #target segment in the URL will be lost.

I have manually gone through all of them to bring them up to date and add HTTPS
to those missing it.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2017-05-15 13:32:25 -07:00
Kubernetes Submit Queue 51d6429a62 Merge pull request #45658 from zhangxiaoyu-zidif/add-strong-to-parsepodfulname
Automatic merge from submit-queue (batch tested with PRs 41331, 45591, 45600, 45176, 45658)

ParsePodFullName():code robustness

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

ParsePodFullName():code robustness

if pod name or namespace name is null, the function can handle it.
Meanwhile update unit test 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-15 13:25:52 -07:00
Kubernetes Submit Queue f6bcd28cd7 Merge pull request #41331 from dshulyak/import_remotecommand
Automatic merge from submit-queue (batch tested with PRs 41331, 45591, 45600, 45176, 45658)

Move client/unversioned/remotecommand to client-go

Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which was copied to client-go/pkg/util
2017-05-15 13:25:42 -07:00
Jeffrey Regan 7abff879d7 Introduce visibility rules to kubernetes code.
**What this PR does / why we need it**:

Visibility rules allow dependency control.  The rules currently in
place make all targets public, to override the default state of
private.  This PR removes public visibility from kubectl code.  It
uses specially named pacakge groups to identify "bad" dependencies on
kubectl code for later refactoring or removal.

**Which issue this PR fixes**

First in a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-15 12:50:56 -07:00
Kubernetes Submit Queue 1b7dacde4b Merge pull request #41766 from feiskyer/sysctls
Automatic merge from submit-queue (batch tested with PRs 45826, 45747, 45548, 45606, 41766)

CRI: using typed filed for sysctls

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

CRI supports sysctls via annotations [today](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/api/v1alpha1/runtime/api.proto#L237), we should move them to typed and structured fields instead. (refer [here](https://github.com/kubernetes/kubernetes/issues/30819#issuecomment-253369441))

**Which issue this PR fixes** 

Part of #39130.

**Release note**:

```release-note
NONE
```
2017-05-15 11:39:29 -07:00
Kubernetes Submit Queue e9a98cb42b Merge pull request #45826 from deads2k/api-11-ownerreferences
Automatic merge from submit-queue (batch tested with PRs 45826, 45747, 45548, 45606, 41766)

prevent pods/status from touching ownerreferences

pods/status updates touching ownerreferences causes new fields to be dropped.

I think we really want to protect our metatdata by default with something like https://github.com/kubernetes/kubernetes/pull/45552 .  This fixes the immediate problem.

```release-note
prevent pods/status from touching ownerreferences
```

@derekwaynecarr @eparis
2017-05-15 11:39:18 -07:00
Kubernetes Submit Queue 3f054a03a9 Merge pull request #42471 from timchenxiaoyu/resourceytpo
Automatic merge from submit-queue

fix resource typo
2017-05-15 10:39:06 -07:00
Kubernetes Submit Queue 330efc10f6 Merge pull request #45807 from xingzhou/typo-fix
Automatic merge from submit-queue (batch tested with PRs 45807, 45814)

Fix typo.
2017-05-15 09:44:41 -07:00
Timothy St. Clair 2033ea6c2c Update generated 2017-05-15 10:01:57 -05:00
Timothy St. Clair 1173c84ad9 Update to plumb through configurable locking on different resource types. 2017-05-15 10:01:46 -05:00
lichunlong ab1476b1df Fix #45213: Syncing jobs would return error when podController exception 2017-05-15 22:52:50 +08:00
Clayton Coleman c299a8049c
Add Table to meta.k8s.io/v1alpha1
Table is a generic tabular output that can be returned by servers to
enable clients to display data simply.
2017-05-15 10:50:49 -04:00
Kubernetes Submit Queue 161ba1c9a0 Merge pull request #45789 from zhangxiaoyu-zidif/vars-cronjob-sheduledjob-strategy
Automatic merge from submit-queue (batch tested with PRs 45070, 45821, 45732, 45494, 45789)

Rename vars scheduledJob to cronJob

**What this PR does / why we need it**:
Rename vars scheduledJob to cronJob

**Special notes for your reviewer**:
refer to #45480

**Release note**:

```release-note
NONE
```
2017-05-15 07:50:04 -07:00
deads2k b630e44dee prevent pods/status from touching ownerreferences 2017-05-15 10:05:07 -04:00