Commit Graph

952 Commits (e8dc9eae8c8376eea8f8bb68224611b0130f66cc)

Author SHA1 Message Date
k8s-merge-robot 5ca769e0a3 Merge pull request #25038 from mfojtik/json-line
Automatic merge from submit-queue

Display line number on JSON errors

Related issue: https://github.com/kubernetes/kubernetes/issues/12231

This PR will introduce line numbers for all JSON errors in the CLI:

(this is existing error reporting for YAML)
```console
$ kubectl create -f broken.yaml
yaml: line 8: mapping values are not allowed in this context
```

(this is error reporting proposed in this PR for JSON)
```console
$ kubectl create -f broken.json
json: line 35: invalid character '{' after object key
```

(and this is the current reporting:)
```console
$ kubectl create -f broken.json
invalid character '{' after object key
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-10 02:49:01 -07:00
Zach Loafman faf0c44429 GCE: Allow nodes to exceed target pool maximums
If we would exceeded the TargetPool API maximums, instead just
randomly select some subsection of the nodes to include in the TP
instead.
2016-05-09 21:44:58 -07:00
k8s-merge-robot 6596ae0c61 Merge pull request #24838 from saad-ali/attachControllerOpMap
Automatic merge from submit-queue

Add data structure for managing go routines by name

This PR introduces a data structure for managing go routines by name. It prevents the creation of new go routines if an existing go routine with the same name exists. This will enable parallelization of the designs in https://github.com/kubernetes/kubernetes/issues/20262 and https://github.com/kubernetes/kubernetes/issues/21931 with sufficient protection to prevent starting multiple operations on the same volume.
2016-05-09 06:31:22 -07:00
Tim Hockin 817abc3213 Kill our atomic pkg, now that 1.6 is req'd 2016-05-08 20:30:37 -07:00
Robert Bailey 375d2ad38c Merge pull request #24164 from sjenning/fix-util-cache
fix immediate evict in cache
2016-05-06 14:43:53 -07:00
Robert Bailey 222eb31f8a Merge pull request #25059 from janetkuo/deployment-availablepods-comment
Fix incorrect comments in IsPodAvailable
2016-05-06 14:11:18 -07:00
Robert Bailey 007e4f06a6 Merge pull request #24718 from chengyli/cinder-volume
fix cinder volume dir umount issue #24717
2016-05-06 13:53:30 -07:00
Clayton Coleman 0e05f704f3
Trace.Step() performs an unnecessary ref
Allocates more objects than necessary.
2016-05-06 11:42:35 -04:00
Michal Fojtik 543a8b2d06
Display line number on JSON errors 2016-05-06 13:10:47 +02:00
k8s-merge-robot 346ddc52c2 Merge pull request #24748 from Random-Liu/cleanup-with-new-engine-api
Automatic merge from submit-queue

Kubelet: Cleanup with new engine api

Finish step 2 of #23563

This PR:
1) Cleanup go-dockerclient reference in the code.
2) Bump up the engine-api version.
3) Cleanup the code with new engine-api.

Fixes #24076.
Fixes #23809.

/cc @yujuhong
2016-05-06 03:16:53 -07:00
k8s-merge-robot 93e3df8e55 Merge pull request #24789 from wojtek-t/use_proper_codec_in_client
Automatic merge from submit-queue

Use proper codec in client
2016-05-04 11:00:04 -07:00
Wojciech Tyczynski 11849e232e Fix bug in json framer. 2016-05-04 15:02:07 +02:00
Wojciech Tyczynski 303742ce12 Merge pull request #24723 from smarterclayton/strip_noop_imports
Protobuf generation should strip side-effect imports
2016-05-04 11:16:45 +02:00
Wojciech Tyczynski 3aadafd411 Use NegotiatedSerializer in client 2016-05-04 10:57:36 +02:00
Janet Kuo f3b1aaeca6 Fix incorrect comments in IsPodAvailable 2016-05-03 13:05:02 -07:00
k8s-merge-robot 946a311e7b Merge pull request #25014 from smarterclayton/broken_framing_growth
Automatic merge from submit-queue

Frame decoder was checking cap(), not len()

Resulted in bytes being missing from the streaming decoder. Update both
parts.

Required for #24789

@wojtek-t or @lavalamp while he's OOO
2016-05-03 11:26:15 -07:00
Clayton Coleman 99430cf5de
Strip side-effect imports from generated protobuf 2016-05-02 18:12:20 -04:00
saadali 53bb527e35 Introduce a data structure for managing go routines by unique name. 2016-05-02 12:02:34 -07:00
k8s-merge-robot c66b2b4e05 Merge pull request #23865 from rhcarvalho/unify-signal-handling
Automatic merge from submit-queue

Unify termination signal handling across platforms

The signals are used to ensure proper execution of cleaning up actions to restore a terminal in:
- [pkg/kubectl/cmd/attach.go#L163-L226](b8d000853e/pkg/kubectl/cmd/attach.go (L163-L226))
- [pkg/kubectl/cmd/util/editor/editor.go#L112-L137](b8d000853e/pkg/kubectl/cmd/util/editor/editor.go (L112-L137))

All supported platforms can handle the same set of signals we're interested in, thus we don't need build contraints to use a set of signals on Linux, while restricting ourselves to only SIGINT on Darwin and Windows.

According to the documentation of os/signal, similar to SIGINT and SIGTERM, SIGHUP causes the program to exit, therefore add it to the list of handled signals.

The fist commit is part of #23643.
2016-05-02 04:09:25 -07:00
Clayton Coleman 84dee0d9cc
Frame decoder was checking cap(), not len()
Resulted in bytes being missing from the streaming decoder. Update both
parts.
2016-04-30 17:57:17 -04:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Random-Liu 7796b619fd Cleanup the code with new engine-api 2016-04-29 13:34:38 -07:00
k8s-merge-robot c0fca43260 Merge pull request #24915 from wojtek-t/read_closer_in_streaming_decoder
Automatic merge from submit-queue

Support Close() in streaming decoder

[This would be useful for changes in clients to support protobufs.]
2016-04-29 07:21:23 -07:00
chengyli 1fb33aa2da fix cinder volume dir umount issue #24717
fix https://github.com/kubernetes/kubernetes/issues/24717
If kubelet root-dir is a symlink, the pod's cinder volume dir can't be
umounted even after pod is deleted.
This patch reads target path of symlink before comparing with entries in
proc mounts.
2016-04-29 00:50:33 +08:00
Rodolfo Carvalho 9576f71b9a Unify termination signal handling across platforms
- All supported platforms can handle the same set of signals we're
  interested in, thus we don't need build contraints to use a set of
  signals on Linux, while restricting ourselves to only SIGINT on Darwin
  and Windows.
- According to the documentation of os/signal, similar to SIGINT and
  SIGTERM, SIGHUP causes the program to exit, therefore add it to the
  list of handled signals.

Signed-off-by: Rodolfo Carvalho <rcarvalh@redhat.com>
2016-04-28 15:35:50 +02:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -07:00
Wojciech Tyczynski 3175d18b14 Support Close() in streaming decoder 2016-04-28 09:46:33 +02:00
k8s-merge-robot 4a0e0826e5 Merge pull request #24220 from gmarek/metrics
Automatic merge from submit-queue

Generated clients can return their RESTClients, RESTClient can return its RateLimiter

cc @lavalamp @krousey @wojtek-t @smarterclayton @timothysc 

Ref. #22421
2016-04-27 19:25:38 -07:00
gmarek 3171aac57c Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02:00
k8s-merge-robot 55cb7cceb3 Merge pull request #23632 from stefwalter/parse-repository-tag-removed
Automatic merge from submit-queue

Fix use of docker removed ParseRepositoryTag() function

Docker has removed the ParseRepositoryTag() function in
leading to failures using the kubernetes Go client API.

Failure:

```
../k8s.io/kubernetes/pkg/util/parsers/parsers.go:30: undefined: parsers.ParseRepositoryTag
```
2016-04-26 09:49:25 -07:00
k8s-merge-robot a586177360 Merge pull request #23740 from dcbw/kubenet-shaper
Automatic merge from submit-queue

kubenet: hook pod bandwidth resources up to shaper

@bprashanth @thockin Last bit for shaping.
2016-04-25 22:15:42 -07:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Stef Walter 481dbca8bc Fix use of docker removed ParseRepositoryTag() function
Docker has removed the ParseRepositoryTag() function in
leading to failures using the kubernetes Go client API.

Lets use github.com/docker/distribution reference.ParseNamed()
instead.

Failure:

../k8s.io/kubernetes/pkg/util/parsers/parsers.go:30: undefined: parsers.ParseRepositoryTag
2016-04-25 11:37:10 +02:00
Clayton Coleman 3111985564 Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket)
against all 3 media types. Adopt the
`application/vnd.kubernetes.protobuf;stream=watch` media type for the
content that comes back from a watch call so that it can be
distinguished from a Status result.
2016-04-22 11:07:24 -04:00
k8s-merge-robot 09adffb318 Merge pull request #23317 from aanm/removing-ipv4-enforcement
Automatic merge from submit-queue

Remove requirement that Endpoints IPs be IPv4

Signed-off-by: André Martins <aanm90@gmail.com>

Release Note: The `Endpoints` API object now allows IPv6 addresses to be stored.  Other components of the system are not ready for IPv6 yet, and many cloud providers are not IPv6 compatible, but installations that use their own controller logic can now store v6 endpoints.
2016-04-21 03:34:50 -07:00
Clayton Coleman e16a7f2421 Initial protobuf generated files 2016-04-20 12:13:05 -04:00
Dan Williams 8086d64131 kubenet: hook pod bandwidth resources up to shaper 2016-04-19 15:32:46 -05:00
k8s-merge-robot 7664509c73 Merge pull request #24248 from wojtek-t/parallel_predicates
Automatic merge from submit-queue

Parallelize computing predicates in scheduler

@davidopp
2016-04-16 09:51:45 -07:00
k8s-merge-robot 49dd31a9a8 Merge pull request #23643 from smarterclayton/leak
Automatic merge from submit-queue

interrupt package (attach and edit) could leak a goroutine
2016-04-16 00:00:24 -07:00
k8s-merge-robot 2382fec956 Merge pull request #23894 from vishh/oom-score-adj-error
Automatic merge from submit-queue

Do not throw creation errors for containers that fail immediately after being started

Fixes (hopefully) #23607 

cc @dchen1107
2016-04-14 22:29:14 -07:00
André Martins c1a360b1d5 Removing IPv4 enforcement on Endpoints
Signed-off-by: André Martins <aanm90@gmail.com>
2016-04-14 16:20:00 +01:00
Wojciech Tyczynski 5a73a9d235 Parallelize computing predicates 2016-04-14 16:32:52 +02:00
k8s-merge-robot 590a5f3ad7 Merge pull request #23444 from deads2k/add-requeue-after-duration
Automatic merge from submit-queue

add a delayed queueing option to the workqueue

Adds delayed requeuing to the workqueue so that I requeue an item to be retried at some later time in my controller with a series of backoff rules.  It lets me have the best of the retryManager and the work queue de-duping.  Tracking failures and backoffs is on the caller

@smarterclayton @pweil-  this would help us move to using the informer everywhere and de-duping at that level.
2016-04-14 05:02:24 -07:00
k8s-merge-robot 04df711a35 Merge pull request #24035 from jsafrane/devel/nsenter-error-messages
Automatic merge from submit-queue

Add path to log messages.

It is useful to see the path that failed to mount in the log messages.

Fixes #23990.
2016-04-14 03:47:26 -07:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
k8s-merge-robot ae57644172 Merge pull request #23435 from jsafrane/devel/fix-nsenter-mkdir
Automatic merge from submit-queue

Fixed mounting with containerized kubelet

`NsenterMounter.IsLikelyNotMountPoint()` should return `ErrNotExist` when the
checked directory does not exists - the regular mounted does this and
some volume plugins depend on this behavior.

See for example: https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/aws_ebs/aws_util.go#L72
2016-04-13 08:35:08 -07:00
Seth Jennings cf199dbdfa fix immediate evict in cache 2016-04-13 09:29:58 -05:00
k8s-merge-robot f5e8e7453b Merge pull request #23806 from smarterclayton/streaming_watch
Automatic merge from submit-queue

Implement a streaming serializer for watch

Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).

@wojtek-t @lavalamp
2016-04-13 05:18:17 -07:00
k8s-merge-robot fcddb9cba5 Merge pull request #16964 from liggitt/json_precision
Automatic merge from submit-queue

Preserve int data when unmarshaling

There are several places we use `json.Unmarshal` into an unstructured map (StrategicMergePatch, UnstructuredJSONScheme, many others).

In this scenario, the json package converts all numbers to float64. This exposes many of the int64 fields in our API types to corruption when the unstructured map is marshalled back to json.

A simple example is a pod with an `"activeDeadlineSeconds": 1000000`. Trying to use `kubectl label`, `annotate`, `patch`, etc results in that int64 being converted to a float64, submitted to the server, and the server rejecting it with an error about "cannot unmarshal number 1e+6 into Go value of type int64"

The json package provides a way to defer conversion of numbers (`json.Decoder#UseNumber`), but does not actually do conversions to int or float. This PR makes use of that feature, and post-processes the unmarshalled map to convert json.Number objects to either int64 or float64 values
2016-04-12 07:09:32 -07:00
k8s-merge-robot acf9492cb1 Merge pull request #23660 from goltermann/vetclean
Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
2016-04-12 06:22:16 -07:00