Commit Graph

15804 Commits (5509e50db4910e8c1c0a0875cd70771c127f57f0)

Author SHA1 Message Date
Kubernetes Submit Queue 538915c037 Merge pull request #34297 from AdoHe/fix_yaml_decoder
Automatic merge from submit-queue

fix yaml decode issue

fix #33588

@janetkuo @smarterclayton ptal.
2016-10-09 17:46:03 -07:00
Kubernetes Submit Queue ef1ba5f2be Merge pull request #33160 from m1093782566/m109-petset-internal-int32
Automatic merge from submit-queue

[Pet Set] petset internal replicas type should be int32

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

Fixes #32993 

Sometimes an int is 4 bytes and sometimes it's 8(depend on CPU architecture), but an int32 is always 32bits. So set petset internal replicas type to int32, avoid type casting in API version converting.
2016-10-09 16:08:11 -07:00
Kubernetes Submit Queue 4b3498d2d5 Merge pull request #34287 from Random-Liu/add-sandbox-gc-minage
Automatic merge from submit-queue

Add sandbox gc minage

Fixes https://github.com/kubernetes/kubernetes/issues/34272.
Fixes https://github.com/kubernetes/kubernetes/issues/33984.

This PR:
1) Change the `GetPodStatus` to get statuses of all containers in a pod instead of only containers belonging to existing sandboxes. This is because sandbox may be removed by GC or by users, kubelet should be able to deal with this case.
2) Change the CRI comment to clarify the timestamp unit (nanosecond).
2) Add MinAge for sandbox GC Policy.

@yujuhong @feiskyer @yifan-gu 
/cc @kubernetes/sig-node
2016-10-08 17:07:28 -07:00
Kubernetes Submit Queue e10f12278c Merge pull request #33092 from m1093782566/m109-fix-rs-hostloop
Automatic merge from submit-queue

fix replica set hot loop

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

Fix replicas set hot loop.

Related issue: #30629
2016-10-08 13:51:34 -07:00
Wojciech Tyczynski aed78e9287 Merge pull request #34386 from kubernetes/revert-33014-feature/set-image-id-manifest-digest
Revert "Kubelet: Use RepoDigest for ImageID when available"
2016-10-08 22:51:17 +02:00
m1093782566 fd47b6d4d1 change petset replicas type from int to int32
Change-Id: I0b8c30083e4a221421de46d9d4dcb21b1f5bb36f
2016-10-08 17:13:20 +08:00
Kubernetes Submit Queue 5562715ae5 Merge pull request #34249 from kargakis/retain-old-revisions
Automatic merge from submit-queue

controller: save older revisions for Deployment's replica sets

@jwforres the only usable way  I could find for multiple old revisions for a single replica set is to stuff them as comma-separated values.

@kubernetes/deployment this retains old revisions served by a replica set inside an annotation.

Fixes https://github.com/kubernetes/kubernetes/issues/33844
2016-10-08 01:32:47 -07:00
Wojciech Tyczynski 77371c3bf4 Revert "Kubelet: Use RepoDigest for ImageID when available" 2016-10-08 10:19:22 +02:00
m1093782566 a76a743ecd fix replica set hot loop
Change-Id: I5176eb9350324de8e7b2035686c4e2c2abc5ef3d
2016-10-08 15:59:22 +08:00
Kubernetes Submit Queue b5145e1924 Merge pull request #34322 from wojtek-t/cacher_improvements
Automatic merge from submit-queue

Improve some logging in cacher
2016-10-08 00:38:48 -07:00
Kubernetes Submit Queue 46c009952d Merge pull request #34199 from asalkeld/annotate-label
Automatic merge from submit-queue

Make kubectl label and annotate more consistent

**What this PR does / why we need it**:
This makes the label and annotate cmd files more consistent which should help with code maintenance.

Some of the main changes:
- add dryrun to annotate (can push this in a different PR if requested)
- use Complete(), Validate() and RunX()
- don't place dynamic variables in the options (only user options and args)
- call the NewBuilder() in the Run function.

**Which issue this PR fixes** 
fixes #34151

**Special notes for your reviewer**:
Note: you *can* now diff the two files and the changes make sense.

**Release note**:
```release-note
kubectl annotate now supports --dry-run
```
2016-10-07 23:58:54 -07:00
Kubernetes Submit Queue 882d431f96 Merge pull request #33552 from floreks/kubectl-node-external-ip
Automatic merge from submit-queue

kubectl: Add external ip information to node when '-o wide' is used

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

**Special notes for your reviewer**: 
1. Is it possible to expose multiple external ips on the node?
2. Should this be supported or first one be taken like now? 
3. Should more node address types be shown?

I'll add tests if solution is approved.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
kubectl: Add external ip information to node when '-o wide' is used
```
2016-10-07 21:10:27 -07:00
Kubernetes Submit Queue f2016df2cc Merge pull request #34054 from deads2k/testapi-01-remove-default.groupversion
Automatic merge from submit-queue

remove testapi.Default.GroupVersion

I'm going to try to take this as a series of mechanicals.  This removes `testapi.Default.GroupVersion()` and replaces it with `registered.GroupOrDie(api.GroupName).GroupVersion`.

@caesarxuchao I'm trying to see how much of `pkg/api/testapi` I can remove.
2016-10-07 20:30:34 -07:00
Kubernetes Submit Queue 2fd28577df Merge pull request #33276 from suonto/lbaasv2_reimplementation
Automatic merge from submit-queue

OpenStack LBaaSV2: EnsureLoadBalancer now updates instead of recreates existing LBs

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: Current LBaaSV2 integration recreates existing LBs and causes service downtime and floating ip rotation. New implementation updates LBs without service downtime or any ip rotation.

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

**Special notes for your reviewer**: I really need this before we can move to production with kubernetes. Getting this to v1.4 would be really great. I have performed plenty of testing; lb and listener creation, port changing and listener update, multiple listeners for multi-port LBs, and deletion. Seems to work flawlessly.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-10-07 19:52:42 -07:00
Kubernetes Submit Queue 2ecd96100e Merge pull request #33783 from derekwaynecarr/phase-1-pod-cgroups
Automatic merge from submit-queue

Add cgroup-driver and cgroups-per-qos flags to kubelet

Add the flags needed to support pod-level cgroups to kubelet.

/cc @vishh @dchen1107 @dubstack
2016-10-07 17:56:01 -07:00
Kubernetes Submit Queue 0623f5aab5 Merge pull request #34350 from kubernetes/revert-26501-scheduler
Automatic merge from submit-queue

Revert "Add kubelet awareness to taint tolerant match caculator."

Reverts kubernetes/kubernetes#26501

Original PR was not fully reviewed by @kubernetes/sig-node 

cc/ @timothysc @resouer
2016-10-07 14:42:12 -07:00
Random-Liu 08aedca12e Add MinAge for sandbox GC. 2016-10-07 14:10:19 -07:00
Random-Liu 76056a47f9 Change the timestamp unit to nanosecond. 2016-10-07 14:10:19 -07:00
Random-Liu a6aad1591b Make sure GetPodStatus can get statuses of all containers in a pod. 2016-10-07 14:10:18 -07:00
Kubernetes Submit Queue c23346f391 Merge pull request #33014 from DirectXMan12/feature/set-image-id-manifest-digest
Automatic merge from submit-queue

Kubelet: Use RepoDigest for ImageID when available

**Release note**:
```release-note
Use manifest digest (as `docker-pullable://`) as ImageID when available (exposes a canonical, pullable image ID for containers).
```

Previously, we used the docker config digest (also called "image ID"
by Docker) for the value of the `ImageID` field in the container status.
This was not particularly useful, since the config manifest is not
what's used to identify the image in a registry, which uses the manifest
digest instead.  Docker 1.12+ always populates the RepoDigests field
with the manifest digests, and Docker 1.10 and 1.11 populate it when
images are pulled by digest.

This commit changes `ImageID` to point to the the manifest digest when
available, using the prefix `docker-pullable://` (instead of
`docker://`)

Related to #32159
2016-10-07 12:48:32 -07:00
David Oppenheimer cd4e08e7ec Revert "Add kubelet awareness to taint tolerant match caculator." 2016-10-07 12:10:55 -07:00
Kubernetes Submit Queue 21188cadeb Merge pull request #26501 from resouer/scheduler
Automatic merge from submit-queue

Add kubelet awareness to taint tolerant match caculator.

Add kubelet awareness to taint tolerant match caculator.

Ref: #25320

This is required by `TaintEffectNoScheduleNoAdmit` & `TaintEffectNoScheduleNoAdmitNoExecute `, so that node will know if it should expect the taint&tolerant
2016-10-07 12:05:35 -07:00
Kubernetes Submit Queue f765f5e5d0 Merge pull request #33927 from deads2k/api-21-fix-improper-eviction
Automatic merge from submit-queue

fix pod eviction storage

Refactor pod eviction storage to remove the tight order coupling of the storage.  This also gets us ready to deal with cases where API groups are not co-located on the same server, though the particular client being used would assume a proxy.
2016-10-07 08:18:28 -07:00
Kubernetes Submit Queue 1510ed00fd Merge pull request #34325 from mwielgus/ingress-unit-fix
Automatic merge from submit-queue

Federated ingress unit test fix

Adds RaceFreeFakeWatcher to watch.go. If this struct succeeds with helping IngressController i will try to move all FakeWatchers to this implementation.

cc: @quinton-hoole @madhusudancs @wojtek-t @kubernetes/sig-cluster-federation

Should help with  #32685.
2016-10-07 07:34:29 -07:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Marcin Wielgus 46cc47e324 Race free version of FakeWatcher 2016-10-07 15:37:57 +02:00
Kubernetes Submit Queue 8b834dd5c0 Merge pull request #34243 from liggitt/simplify-raw
Automatic merge from submit-queue

Simplify kubectl get --raw

Write to configured output stream
Don't assume output is a string
2016-10-07 06:29:10 -07:00
Wojciech Tyczynski c02df26ad6 Improve some logging in cacher 2016-10-07 15:04:08 +02:00
Kubernetes Submit Queue 6d56d0337a Merge pull request #33234 from caesarxuchao/retry-discovery-failure
Automatic merge from submit-queue

Discovery client retry when failed to discovery resrouces

Fix #32308

`ServerPreferredNamespacedResources()` fails if in the middle of its execution, the TPR e2e tests change the supported resources on the API server. This PR let the e2e test framework retry `ServerPreferredNamespacedResources()`.

cc @lavalamp
2016-10-07 05:13:21 -07:00
Michail Kargakis 89eaa918be controller: save older revisions for Deployment's replica sets 2016-10-07 11:45:06 +02:00
Kubernetes Submit Queue a89e4785ba Merge pull request #31949 from asalkeld/fix-coverage
Automatic merge from submit-queue

Ignore troublesome paths that cause coverage to fail

**What this PR does / why we need it**:
`KUBE_COVER=y make check` currently fails, this patch fixes it.

**Which issue this PR fixes** 
fixes #31691

**Special notes for your reviewer**:
None

**Release note**:

```release-note
NONE
```

This avoids the whole command failing because of errors like the following:
```
# cover k8s.io/kubernetes/pkg/client/restclient
cover: internal error: block 268 overlaps block 270
```
2016-10-07 02:40:07 -07:00
Kubernetes Submit Queue db1985716f Merge pull request #29011 from justinsb/arbitrary_names_1
Automatic merge from submit-queue

Refactor: separate KubeletClient & ConnectionInfoGetter concepts

KubeletClient implements ConnectionInfoGetter, but it is not a complete
implementation: it does not set the kubelet port from the node record,
for example.

By renaming the method so that it does not implement the interface, we
are able to cleanly see where the "raw" GetConnectionInfo is used (it is
correct) and also have go type-checking enforce this for us.

This is related to #25532; I wanted to satisfy myself that what we were doing there was correct, and I wanted also to ensure that the compiler could enforce this going forwards.
2016-10-07 02:02:13 -07:00
Kubernetes Submit Queue 83921597ef Merge pull request #29236 from juanvallejo/jvallejo_add-configuration-missing-error-type
Automatic merge from submit-queue

Update client config invalid option errors to be more specific

This patch adds better error handling for cases where a global option (such as --context or --cluster) causes an invalid config to be returned.

```release-note
release-note-none
```
2016-10-07 01:24:49 -07:00
Kubernetes Submit Queue 144d88b0a1 Merge pull request #33567 from pmorie/gc-event
Automatic merge from submit-queue

Add node event for container/image GC failure

Follow up to #31988.  Add an event for a node when container/image GC fails.
2016-10-07 00:45:24 -07:00
Kubernetes Submit Queue 56a22f925f Merge pull request #33075 from mikedanese/kubectl-prune
Automatic merge from submit-queue

kubectl: implement kubectl apply --prune

Closes https://github.com/kubernetes/kubernetes/issues/19805

Depends on #32599 

@errordeveloper @lukemarsden
2016-10-06 20:53:00 -07:00
AdoHe 919bb01b04 fix yaml decode issue 2016-10-07 11:22:44 +08:00
Kubernetes Submit Queue ef5d694ebe Merge pull request #34251 from jingxu97/Oct/nil-mounter-10-6
Automatic merge from submit-queue

Fix nil pointer issue when getting metrics from volume mounter

Currently it is possible that the mounter object stored in Mounted
Volume data structure in the actual state of kubelet volume manager is
nil if this information is recovered from state sync process. This will
cause nil pointer issue when calculating stats in volume_stat_calculator.
A quick fix is to not return the volume if its mounter is nil. A more
complete fix is to also recover mounter object when reconstructing the
volume data structure which will be addressed in PR #33616
2016-10-06 18:18:57 -07:00
Mike Danese ea5ecc4145 implement kubectl apply --prune 2016-10-06 17:49:02 -07:00
Kubernetes Submit Queue c1d2b61d79 Merge pull request #34076 from mbohlool/c
Automatic merge from submit-queue

Remove headers that are unnecessary for proxy target

Some headers like authorization is unnecessary to pass to the proxy target. We should start removing these headers in proxy requests.
2016-10-06 15:19:38 -07:00
Kubernetes Submit Queue 808ed6bfd0 Merge pull request #34139 from liggitt/fix-jitter-until
Automatic merge from submit-queue

Fix wait.JitterUntil

https://github.com/kubernetes/kubernetes/pull/29743 changed a util method to cause process exits if a handler function panics.

Utility methods should not make process exit decisions. If a process (like the controller manager) wants to exit on panic, appending a panic handler or setting `ReallyCrash = true` is the right way to do that (discussed [here](https://github.com/kubernetes/kubernetes/pull/29743#r75509074)).

This restores the documented behavior of wait.JitterUntil
2016-10-06 13:40:08 -07:00
juanvallejo 6f925b1f82
handle invalid client config option errors
This patch provides a more relevant error message when a client
configuration option is passed with an invalid or non-existent value.

`$ kubectl get pods --cluster="non-existent"`
```
error: No configuration file found, please login or point to an existing
file
```

`$ kubectl get pods --cluster="non-existent"`
```
error: cluster "non-existent" does not exist
```
2016-10-06 16:28:51 -04:00
mbohlool 7e80ab2401 Remove unnecessary authorization headers after authorization is successful 2016-10-06 12:38:00 -07:00
Jing Xu b2b04090da Fix nil pointer issue when getting metrics from volume mounter
Currently it is possible that the mounter object stored in Mounted
Volume data structure in the actual state of kubelet volume manager is
nil if this information is recovered from state sync process. This will
cause nil pointer issue when calculating stats in volume_stat_calculator.
A quick fix is to not return the volume if its mounter is nil. A more
complete fix is to also recover mounter object when reconstructing the
volume data structure which will be addressed in PR #33616
2016-10-06 11:10:46 -07:00
Kubernetes Submit Queue 6a9d56b35a Merge pull request #32724 from sjenning/eviction-timestamp
Automatic merge from submit-queue

kubelet: eviction: avoid duplicate action on stale stats

Currently, the eviction code can be overly aggressive when synchronize() is called two (or more) times before a particular stat has been recollected by cadvisor.  The eviction manager will take additional  action based on information for which it has already taken actions.

This PR provides a method for the eviction manager to track the timestamp of the last obversation and not take action if the stat has not been updated since the last time synchronize() was run.

@derekwaynecarr @vishh @kubernetes/rh-cluster-infra
2016-10-06 11:05:34 -07:00
Kubernetes Submit Queue 8dd9462dd1 Merge pull request #32995 from kargakis/scale-before-rolling-out
Automatic merge from submit-queue

controller: scale proportionally before rolling out new templates

Once we have progressDeadlineSeconds (https://github.com/kubernetes/kubernetes/pull/19343) and https://github.com/kubernetes/kubernetes/issues/32863 we should be able to get meaningful errors for the concerns I raised in https://github.com/kubernetes/kubernetes/issues/29357.

cc: @kubernetes/deployment 

Fixes https://github.com/kubernetes/kubernetes/issues/29357
2016-10-06 10:03:52 -07:00
Seth Jennings 98e97a475a kubelet: eviction: avoid duplicate action on stale stats 2016-10-06 11:39:05 -05:00
Kubernetes Submit Queue 07eba4c6ef Merge pull request #33392 from sjenning/min-reclaim-percent
Automatic merge from submit-queue

kubelet: eviction: allow minimum reclaim as percentage

Fixes #33354 

xref #32537

**Release note**:
```release-note
The kubelet --eviction-minimum-reclaim option can now take precentages as well as absolute values for resources quantities
```
@derekwaynecarr @vishh @mtaufen
2016-10-06 09:25:46 -07:00
Jordan Liggitt 82a099d92d
Simplify kubectl get --raw 2016-10-06 11:42:19 -04:00
Wojciech Tyczynski d70a9615ec Minor clearnup in etcd3 code 2016-10-06 15:38:34 +02:00
Wojciech Tyczynski 90bc19959d Extend logging in cacher to understand its bottleneck 2016-10-06 10:57:46 +02:00