Commit Graph

15890 Commits (06c1f2ba2c8c204b494d75b76f58d15161bc7721)

Author SHA1 Message Date
Kubernetes Submit Queue 06c1f2ba2c Merge pull request #34707 from gmarek/master
Automatic merge from submit-queue

Bump log level in case of Node eviction
2016-10-13 05:37:10 -07:00
Kubernetes Submit Queue 1c65d1df86 Merge pull request #34694 from gmarek/deleted_final_state_unknown
Automatic merge from submit-queue

Handle DeletedFinalStateUnknown in NodeController

Fix #34692

```release-note
Fix panic in NodeController caused by receiving DeletedFinalStateUnknown object from the cache.
```

cc @davidopp
2016-10-13 04:58:06 -07:00
gmarek 41278b4c6b Bump log level in case of Node eviction 2016-10-13 13:26:16 +02:00
Kubernetes Submit Queue ca75b47657 Merge pull request #32555 from pweil-/admission-authorizer
Automatic merge from submit-queue

WantsAuthorizer admission plugin support

The next step of PSP admission is to be able to limit the PSPs used based on user information.  To do this the admission plugin would need to make authz checks for the `user.Info` in the request.  This code allows a plugin to request the injection of an authorizer to allow it to make the authz checks.

Note:  this could be done with a SAR, however since admission is running in the api server using the SAR would incur an extra hop vs using the authorizer directly.

@deads2k @derekwaynecarr
2016-10-13 03:40:11 -07:00
Kubernetes Submit Queue 5496d22733 Merge pull request #34456 from kargakis/revert-29808
Automatic merge from submit-queue

Revert "Error out when any RS has more available pods then its spec r…

Reverts https://github.com/kubernetes/kubernetes/pull/29808

The PR is wrong because we can have more available pods than desired every time we scale down.

@kubernetes/deployment ptal
2016-10-13 03:01:47 -07:00
gmarek 8b7e9d303c Handle DeletedFinalStateUnknown in NodeController 2016-10-13 11:31:04 +02:00
Kubernetes Submit Queue 3b787c9b3d Merge pull request #34526 from colemickens/colemickens-azure-specify-availabilityset
Automatic merge from submit-queue

azure: filter load balancer backend nodes to PrimaryAvailabilitySet (if set)

<!--  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**:
- Adds a new field (`PrimaryAvailabilitySetName`) to the Azure CloudProvider config struct
- If the field is set, only machines who are in that availabilitySet are added to the load balancer backend pool.

This is required to:
- Support more than 100 nodes in Azure (only can have 100 nodes per availability set)
- Support multiple availability sets per cluster (An Azure L4 LoadBalancer can only be pointed at nodes in a single availability set)

Without this PR, or if the field is **not** set in a cluster that contains two availabilitysets, then the following is observed:
- Azure resources are created (LB, LB rules, NSG rules, public IP)
- Azure throws errors when trying to add nodes from the "other" availability set
- The service winds up exposed to the outside world (if you manually retrieve the public ip from Azure API)
- Kubernetes controller-manager's service loop keeps retrying forever because it never finishes fully successfully
- The "external ip" property field is never updated.

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

**Unknowns**:
- Naming convention: `LoadBalancedAvailabilitySet` might be more descriptive than `PrimaryAvailabilitySet`, but is also a misnomer since `kube-proxy` will still end up routing requests to all relevant nodes.
- Is it worth trying to be "smart" about it in the case the user hasn't set this field in the config? Save the first availability set name and try not to add any nodes that aren't also in that one? It may simply be better to just let this fail so the user has to choose the right setting for their use-case.

**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
azure: add PrimaryAvailabilitySet to config, only use nodes in that set in the loadbalancer pool
```

CC: @brendandburns, @anhowe
2016-10-13 02:23:21 -07:00
Kubernetes Submit Queue 523fce990a Merge pull request #32781 from lukaszo/ready_ds
Automatic merge from submit-queue

Add ReadyScheduled to DaemonSet status

Fixes #25605

cc @bgrant0607 @mikedanese
2016-10-13 00:25:56 -07:00
Kubernetes Submit Queue b8b7f9ffc0 Merge pull request #32722 from juanvallejo/jvallejo_return-err-on-oc-get-empty-list
Automatic merge from submit-queue

return warning on empty list result in kubectl get

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

The current default behavior of `kubectl get` is to return an empty
output when there are no resources to display. This patch improves
usability by returning a warning through stderr in the case of an empty
list.

##### Before
`$ kubectl get pods`
  - *empty output*

##### After
`$ kubectl get pods`
```
There are no resources to display.
```
2016-10-12 23:48:01 -07:00
Kubernetes Submit Queue a0624835ac Merge pull request #34669 from yujuhong/get_netns
Automatic merge from submit-queue

Allow kuberuntime to get network namespace for not ready sandboxes

Kubelet calls TearDownPod to clean up the network resources for a pod sandbox.
TearDownPod relies on GetNetNS to retrieve network namespace, and the current
implementation makes this impossible for not-ready sandboxes. This change
removes the unnecessary filter to fix this issue.
2016-10-12 23:09:08 -07:00
Kubernetes Submit Queue f20e1cc4d0 Merge pull request #31911 from aveshagarwal/master-rhbz-1372425
Automatic merge from submit-queue

Send a pod event if preStop hook did not complete in time.

Fixes https://github.com/kubernetes/kubernetes/issues/31902
@kubernetes/rh-cluster-infra @derekwaynecarr
2016-10-12 21:45:47 -07:00
Kubernetes Submit Queue adfbe8d952 Merge pull request #33629 from mbohlool/o2
Automatic merge from submit-queue

Generate unique Operation IDs for root OpenAPI spec

This PR adds a customization method GetOperationID to OpenAPI spec generation and then use it to make sure root spec has unique operation IDs by mostly adding GroupVersion to the start of operation ID.
2016-10-12 21:06:24 -07:00
Kubernetes Submit Queue a0d4878ea9 Merge pull request #30145 from markturansky/limit_range_pvc
Automatic merge from submit-queue

Add PVC storage to LimitRange

This PR adds the ability to add a LimitRange to a namespace that enforces min/max on `pvc.Spec.Resources.Requests["storage"]`.

@derekwaynecarr @abhgupta @kubernetes/sig-storage 

Examples forthcoming. 

```release-note
pvc.Spec.Resources.Requests min and max can be enforced with a LimitRange of type "PersistentVolumeClaim" in the namespace
```
2016-10-12 20:26:59 -07:00
Kubernetes Submit Queue d236b84b4f Merge pull request #34555 from mikedanese/conversion
Automatic merge from submit-queue

kubeadm: fix conversion macros and add kubeadm to round trip testing

Tests are probably broken but I'll fix. @jbeda this probably fixes your change unless we decide we need generated deep copies or conversions.

@kubernetes/sig-cluster-lifecycle
2016-10-12 19:47:58 -07:00
Yu-Ju Hong 43368ff7b9 Allow kuberuntime to get network namespace for not ready sandboxes
Kubelet calls TearDownPod to clean up the network resources for a pod sandbox.
TearDownPod relies on GetNetNS to retrieve network namespace, and the current
implementation makes this impossible for not-ready sandboxes. This change
removes the unnecessary filter to fix this issue.
2016-10-12 18:05:40 -07:00
Cole Mickens 113c5e3475 azure: filter load balancer backend nodes to PrimaryAvailabilitySet if set 2016-10-12 15:01:17 -07:00
mbohlool 5ba06cf2bc Make Kubernetes OpenAPI operation IDs unique 2016-10-12 14:54:12 -07:00
Mike Danese 25e4dccefe kubeadm: fix conversion macros and add kubeadm to round trip testing 2016-10-12 13:26:23 -07:00
mbohlool 221a620a14 Move Trie to util package 2016-10-12 12:57:50 -07:00
Kubernetes Submit Queue b99a9094cc Merge pull request #34380 from Random-Liu/fix-cri-image
Automatic merge from submit-queue

CRI: Image pullable support in dockershim

For #33189.

The new test `ImageID should be set to the manifest digest (from RepoDigests) when available` introduced in #33014 is failing, because:
1) `docker-pullable://` conversion is not supported in dockershim;
2) `kuberuntime` and `dockershim` is using `ListImages with image name filter` to check whether image presents. However, `ListImages` doesn't support filter with `digest`.

This PR:
1) Change `kuberuntime.IsImagePresent` to use `runtime.ImageStatus` and `dockershim.InspectImage` instead. ***Notice an API change: `ImageStatus` should return `(nil, nil)` for non-existing image.***
2) Add `docker-pullable://` support.
3) Fix `RemoveImage` in dockershim https://github.com/kubernetes/kubernetes/pull/29316.

I've tried myself, the test can pass now.

@yujuhong @feiskyer @yifan-gu 
/cc @kubernetes/sig-node
2016-10-12 12:25:37 -07:00
Kubernetes Submit Queue 44337ba8c2 Merge pull request #33176 from gluke77/allow-pod-prefix-for-kubectl-exec
Automatic merge from submit-queue

Allow 'pod/' prefix in pod name for 'kubectl exec'

This PR adds ability to provide pod name with 'pod/' prefix for 'kubectl exec' command. Pod names without 'pod/' prefix are still allowed.

Fixes #24225
2016-10-12 10:15:42 -07:00
pweil- 5c66dcb526 inject authorizer when admission controller requests it 2016-10-12 13:05:34 -04:00
Mike Danese d9cc8119ef allow apigroups to opt out of proto round trip testing 2016-10-12 10:01:38 -07:00
Random-Liu afa3414779 * Add docker pullable support.
* Fix inspect image bug.
* Fix remove image bug.
2016-10-12 09:21:10 -07:00
Illia Khudoshyn ea12b32d6a Allow 'pod/' prefix in pod name for 'kubectl exec'
Fixes #24225

This PR adds ability to provide pod name with 'pod/' prefix for 'kubectl exec' command. Pod names without 'pod/' prefix are still allowed.
2016-10-12 17:42:31 +03:00
Łukasz Oleś 4ebe1f666a Generated part for NumberReady 2016-10-12 15:36:01 +02:00
Łukasz Oleś 5d2e215652 Add NumberReady to DaemonSet status
Fixes #25605
2016-10-12 15:15:10 +02:00
Piotr Szczesniak bd3c11df8a Merge pull request #34608 from deads2k/controller-10-really-fix-it
fix unfiltered comparison in controller test
2016-10-12 14:59:45 +02:00
Kubernetes Submit Queue f9e8ee8fe8 Merge pull request #33905 from kargakis/replica-set-conditions
Automatic merge from submit-queue

Replica set conditions API

Partially addresses https://github.com/kubernetes/kubernetes/issues/32863

@kubernetes/sig-apps
2016-10-12 05:10:45 -07:00
deads2k 81a8efda28 fix unfiltered comparison 2016-10-12 08:06:10 -04:00
Kubernetes Submit Queue 1a123f9fc5 Merge pull request #34145 from lukaszo/revision
Automatic merge from submit-queue

Fix missleading comment

**What this PR does / why we need it**: It just  fixes misleading comment. It took me some time to figure out real behavior.
2016-10-12 04:31:02 -07:00
Kubernetes Submit Queue 3a882072e9 Merge pull request #34279 from ymqytw/refactor_edit
Automatic merge from submit-queue

Refactor kubectl edit cmd

Refactor `kubectl edit` command.

#33250 will be based on this PR for easier review.
Will need to rebase after #33973 merges.
2016-10-12 03:52:39 -07:00
Kubernetes Submit Queue b65a07b204 Merge pull request #34435 from wojtek-t/avoid_unnecessary_decoding
Automatic merge from submit-queue

Avoid unnecessary decoding in etcd3 client

Ref https://github.com/kubernetes/kubernetes/issues/33653

With the "Cacher" layer in Kubernetes, most of the watches processed by "pkg/storage/etcd3/watcher.go" have "filter = Everything()". That said, we generally don't need to decode previous value of the object (which is used only to get the value of filter of it), because we already know it will be true.

This PR is basically fixing this problem.

Should be merged after https://github.com/kubernetes/kubernetes/pull/34246
2016-10-12 01:02:09 -07:00
Kubernetes Submit Queue d6da3f8e66 Merge pull request #34512 from foxish/add-finalizers
Automatic merge from submit-queue

Copy finalizers from template spec to pod.

**What this PR does / why we need it**: The PodTemplateSpec has a finalizers field whose contents are not copied over to a pod during creation.
2016-10-12 00:21:42 -07:00
Kubernetes Submit Queue 272703702a Merge pull request #34574 from Random-Liu/cri-unix-to-unixnano
Automatic merge from submit-queue

CRI: Change dockershim to use UnixNano instead of Unix.

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

This PR changes the dockershim to use `UnixNano` instead of `Unix` to return timestamp in nanoseconds.

@yujuhong
2016-10-11 19:40:18 -07:00
Kubernetes Submit Queue 8a72f11596 Merge pull request #33842 from deads2k/api-19-clean-structs
Automatic merge from submit-queue

clean api server cruft

Some cruft has developed over refactors.  Remove that cruft.

@liggitt probably last in the chain so far
2016-10-11 18:56:15 -07:00
Random-Liu 13459411c1 Change dockershim to use UnixNano instead of Unix. 2016-10-11 14:50:55 -07:00
deads2k 2ad0fbd99a filter informer actions when inspecting controller unit test reactions 2016-10-11 13:12:58 -04:00
deads2k 406c0a36ae cleanup cruft from API server structs 2016-10-11 10:56:05 -04:00
Kubernetes Submit Queue db0529fc7c Merge pull request #34349 from deads2k/controller-07-d-contorller
Automatic merge from submit-queue

convert deployment controller to shared informers

Converts the deployment controller to shared informers.

@kargakis I think you've been in here.  Pretty straight forward swap.

Fixes #27687
2016-10-11 05:46:38 -07:00
Kubernetes Submit Queue 8179f4d1a3 Merge pull request #34332 from resouer/cri-versioncache
Automatic merge from submit-queue

Add version cache for cri APIVersion

ref https://github.com/kubernetes/kubernetes/issues/29478

1. Added a version cache for `APIVersion()` by using object cache., with ttl=1 min
2. Leaving `Version()` as it is today
2016-10-11 03:54:52 -07:00
Kubernetes Submit Queue e7f77237e0 Merge pull request #34403 from derekwaynecarr/update-libcontainer
Automatic merge from submit-queue

Update godeps for libcontainer+cadvisor

Needed to unblock more progress on pod cgroup.

/cc @vishh @dchen1107 @timstclair
2016-10-11 01:58:53 -07:00
Wojciech Tyczynski b675b2230c Avoid unnecessary decoding in etcd3 client 2016-10-11 10:38:46 +02:00
Kubernetes Submit Queue 0b627334df Merge pull request #34246 from hongchaodeng/etcddep
Automatic merge from submit-queue

etcd3: use PrevKV to remove additional get

ref: #https://github.com/kubernetes/kubernetes/issues/33653

We are trying to test using PrevKV feature and see if it improves performance.
In order to test this, we will need etcd v3.1 (alpha) image.

Blockers:
- update gcr.io image (version v3.0.12)
2016-10-11 01:16:59 -07:00
Kubernetes Submit Queue 254c10f08a Merge pull request #32137 from mtaufen/spellcheck
Automatic merge from submit-queue

Fixup in kubelet.go: Package short names should be [a-z0-9]
2016-10-11 00:33:34 -07:00
Kubernetes Submit Queue c50af358e8 Merge pull request #34473 from DirectXMan12/feature/set-image-id-manifest-digest
Automatic merge from submit-queue

Kubelet: Use RepoDigest for ImageID when available

```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-11 00:33:25 -07:00
Kubernetes Submit Queue 6af180b0d7 Merge pull request #34019 from deads2k/rbac-12-default-bindings
Automatic merge from submit-queue

Add default cluster role bindings

Add default cluster roles bindings to rbac bootstrapping.  Also adds a case for allowing escalation when you have no authenticator.

@liggitt I expect you may need to make peace with this.
2016-10-10 23:53:34 -07:00
Kubernetes Submit Queue 1837914d8e Merge pull request #34029 from liggitt/service-account-rotation
Automatic merge from submit-queue

Enable service account signing key rotation

fixes #21007

```release-note
The kube-apiserver --service-account-key-file option can be specified multiple times, or can point to a file containing multiple keys, to enable rotation of signing keys.
```

This PR enables the apiserver authenticator to verify service account tokens signed by different private keys. This can be done two different ways:
* including multiple keys in the specified keyfile (e.g. `--service-account-key-file=keys.pem`)
* specifying multiple key files (e.g. `--service-account-key-file current-key.pem --service-account-key-file=old-key.pem`)

This is part of enabling signing key rotation:

1. update apiserver(s) to verify tokens signed with a new public key while still allowing tokens signed with the current public key (which is what this PR enables)
2. give controllermanager the new private key to sign new tokens with
3. remove old service account tokens (determined by verifying signature or by checking creationTimestamp) once they are no longer in use (determined using garbage collection or magic) or some other algorithm (24 hours after rotation, etc). For the deletion to immediately revoke the token, `--service-account-lookup` must be enabled on the apiserver.
4. once all old tokens are gone, update apiservers again, removing the old public key.
2016-10-10 21:54:03 -07:00
Kubernetes Submit Queue 28080293b1 Merge pull request #33148 from mml/words
Automatic merge from submit-queue

Clarify MinAvailable approval semantics.
2016-10-10 20:32:45 -07:00
Anirudh 887e88669d Copy finalizers from template spec to pod. 2016-10-10 17:31:28 -07:00