Commit Graph

2229 Commits (2d6c632de2f9ac15005c188913f779a81b392c81)

Author SHA1 Message Date
k8s-merge-robot bf4f84167f Merge pull request #23567 from smarterclayton/init_containers
Automatic merge from submit-queue

Add init containers to pods

This implements #1589 as per proposal #23666

Incorporates feedback on #1589, creates parallel structure for InitContainers and Containers, adds validation for InitContainers that requires name uniqueness, and comments on a number of implications of init containers.

This is a complete alpha implementation.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23567)
<!-- Reviewable:end -->
2016-05-18 00:53:30 -07:00
Tim Hockin 152c86ab06 Make name validators return string slices 2016-05-18 00:48:01 -07:00
Tim Hockin 66d0d87829 Make IsValidLabelValue return error strings 2016-05-17 21:36:10 -07:00
k8s-merge-robot 7b4851b9ae Merge pull request #21274 from derekwaynecarr/kubelet_eviction
Automatic merge from submit-queue

out of resource killing (memory)

Adds the core framework for low-resource killing in the kubelet.

Implements support for out of memory killing.

Related:
https://github.com/kubernetes/kubernetes/pull/18724

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/21274)
<!-- Reviewable:end -->
2016-05-17 10:15:32 -07:00
Jan Safranek 0be1512f1c Add ClaimLost phase. 2016-05-17 15:14:07 +02:00
k8s-merge-robot 6376b52b90 Merge pull request #25271 from euank/fix-missing-resttest-call
Automatic merge from submit-queue

test: Call forgotten resttest test

PR #3789 introduced this test, but it was never called.

This test was created, but never called.
Written, but never run.
It has neither flaked nor asserted. At its inception it was deserted.
My change gives this test a chance, to at long last finally pass.

The resttest stuff is a bit complicated and I'm not totally sure I put it in the right place  @smarterclayton, want to double check this change makes sense?
2016-05-16 23:49:39 -07:00
Clayton Coleman 2a53330700
Describe and get should show init containers 2016-05-17 00:29:54 -04:00
Clayton Coleman 205a8b4574
Add init container loading to the kubelet 2016-05-17 00:29:53 -04:00
Clayton Coleman 6cc6d29339
Generated code for init containers 2016-05-17 00:29:52 -04:00
Clayton Coleman 6685715c4c
API for adding init containers 2016-05-17 00:29:49 -04:00
Chao Xu c73406bcfe the garbage collector controller 2016-05-15 16:04:19 -07:00
k8s-merge-robot e10625cdcc Merge pull request #25033 from smarterclayton/use_upstream_conversion
Automatic merge from submit-queue

Conversions have kube-isms and are not portable for downstream

Some minor fixes to enable generators for OpenShift and others who need
to generate conversions on Kube API groups outside the core.

@deads2k
2016-05-15 04:54:54 -07:00
k8s-merge-robot 272674b2a6 Merge pull request #25007 from liggitt/third-party-resource-validation
Automatic merge from submit-queue

validate third party resources

addresses validation portion of https://github.com/kubernetes/kubernetes/issues/22768

* ThirdPartyResource: validates name (3 segment DNS subdomain) and version names (single segment DNS label)
* ThirdPartyResourceData: validates objectmeta (name is validated as a DNS label)
* removes ability to use GenerateName with thirdpartyresources (kind and api group should not be randomized, in my opinion)

test improvements:
* updates resttest to clean up after create tests (so the same valid object can be used)
* updates resttest to take a name generator (in case "foo1" isn't a valid name for the object under test)

action required for alpha thirdpartyresource users:
* existing thirdpartyresource objects that do not match these validation rules will need to be removed/updated (after removing thirdpartyresourcedata objects stored under the disallowed versions, kind, or group names)
* existing thirdpartyresourcedata objects that do not match the name validation rule will not be able to be updated, but can be removed
2016-05-15 03:38:29 -07:00
k8s-merge-robot dba8b953ed Merge pull request #24870 from smarterclayton/conversion_updated
Automatic merge from submit-queue

Optimize group version allocations

Avoid allocation in strings.Split() for most common cases.

Extracted from #24845

@wojtek-t or @deads2k
2016-05-15 00:58:22 -07:00
k8s-merge-robot 4ac32179bf Merge pull request #24798 from thockin/validation_pt8-1
Automatic merge from submit-queue

Make IsQualifiedName return error strings

Part of the larger validation PR, broken out for easier review and merge.

@lavalamp FYI, but I know you're swamped, too.
2016-05-14 22:14:17 -07:00
derekwaynecarr edc76f6d4f out of resource killing (memory) 2016-05-14 11:34:45 -04:00
Matt Liggett f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07:00
Jeff Lowdermilk 1169743223 Merge pull request #25575 from fgrzadkowski/unschedulable_pod
Fix updating pod condition in scheduler
2016-05-13 15:05:19 -07:00
Jeff Lowdermilk 177c0efe72 Merge pull request #25552 from caesarxuchao/merge-finalizers
add merge tag to v1/ObjectMeta.Finalizers
2016-05-13 15:04:17 -07:00
k8s-merge-robot ce80372573 Merge pull request #25500 from mml/2016
Automatic merge from submit-queue

It's 2016, yo.
2016-05-13 14:24:57 -07:00
k8s-merge-robot 399b086620 Merge pull request #23684 from luxas/auto_label_arch
Automatic merge from submit-queue

Automatically add node labels beta.kubernetes.io/{os,arch}

Proposal: #17981
As discussed in #22623:
> @davidopp: #9044 says cloud provider but can also cover platform stuff.

Adds a label `beta.kubernetes.io/platform` to `kubelet` that informs about the os/arch it's running on.
Makes it easy to specify `nodeSelectors` for different arches in multi-arch clusters.

```console
$ kubectl get no --show-labels
NAME        STATUS    AGE       LABELS
127.0.0.1   Ready     1m        beta.kubernetes.io/platform=linux-amd64,kubernetes.io/hostname=127.0.0.1
$ kubectl describe no
Name:			127.0.0.1
Labels:			beta.kubernetes.io/platform=linux-amd64,kubernetes.io/hostname=127.0.0.1
CreationTimestamp:	Thu, 31 Mar 2016 20:39:15 +0300
```
@davidopp @vishh @fgrzadkowski @thockin @wojtek-t @ixdy @bgrant0607 @dchen1107 @preillyme
2016-05-13 13:25:34 -07:00
Matt Liggett 2bc46d5085 It's 2016, yo. 2016-05-13 12:41:40 -07:00
Filip Grzadkowski 6c6862216b Fix updating pod condition in scheduler 2016-05-13 19:00:58 +02:00
k8s-merge-robot bb3f5b1768 Merge pull request #23090 from tgraf/ipv6
Automatic merge from submit-queue

Add IPv6 address support for pods - does NOT include services

This allows a container to have an IPv6 address only and extracts the address via nsenter and iproute2 or the docker client directly. An IPv6 address is now correctly reported when describing a pod.

@thockin @kubernetes/sig-network

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23090)
<!-- Reviewable:end -->
2016-05-13 06:32:00 -07:00
k8s-merge-robot 04416c6b2d Merge pull request #24136 from derekwaynecarr/fix_constants
Automatic merge from submit-queue

Resource name constants were incorrect in versioned types.go

The constant field names and actual values to quota requests and limits for cpu and memory were incorrect in the v1 types.go file.

Important to note for reviewer:
* the constant fields here are unused in the project at this time
* the values those unused constant fields mapped to are not actually supported by the project
* there is no backwards compatibility concern, but if/when we look to convert to using versioned clients, we should have the correct constant fields and values.

The correct values were here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L2213

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24136)
<!-- Reviewable:end -->
2016-05-12 15:49:20 -07:00
k8s-merge-robot 5c30f983d9 Merge pull request #25018 from smarterclayton/fast_conversion
Automatic merge from submit-queue

Reduce allocations during conversion, enable new UnsafeConvertToVersion path

Cleans up the conversion path to avoid a few unnecessary allocations, then creates a new UnsafeConvertToVersion path that will allow encode/decode to bypass copying the object for performance. In that subsequent PR, ConvertToVersion will start to call Copy() and we will refactor conversions to reuse as much of the existing object as possible.

Also changes the unversioned.ObjectKind signature to not require allocations - speeds up a few common paths.
2016-05-12 14:50:01 -07:00
k8s-merge-robot 08440b5dcc Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue

WIP v0 NVIDIA GPU support

```release-note
* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource 
```

Implements part of #24071 for  #23587

I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and docs

cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
2016-05-12 14:04:15 -07:00
Chao Xu 6f1521afe4 add merge tag to Finalizers list 2016-05-12 14:00:39 -07:00
Clayton Coleman ea7e7a18cb
Create a new method UnsafeConvertToVersion for faster convert
Only encode/decode will call this path, to allow us to optimize for
unsafe operations.
2016-05-12 10:10:35 -04:00
Clayton Coleman 51b624103f
Change ConvertToVersion to use GroupVersion
Long delayed refactor, avoids a few more allocations.
2016-05-12 10:10:35 -04:00
Clayton Coleman a84e62d9e6
Change ObjectKind signature to avoid allocations
We don't need to pass a pointer into SetGroupKindVersion() - a
struct works just as well.
2016-05-12 10:10:35 -04:00
k8s-merge-robot 132ebb091a Merge pull request #24459 from fgrzadkowski/unschedulable_pod
Automatic merge from submit-queue

Add pod condition PodScheduled to detect situation when scheduler tried to schedule a Pod, but failed

Set `PodSchedule` condition to `ConditionFalse` in `scheduleOne()` if scheduling failed and to `ConditionTrue` in `/bind` subresource.

Ref #24404

@mml (as it seems to be related to "why pending" effort)

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24459)
<!-- Reviewable:end -->
2016-05-12 05:54:06 -07:00
Filip Grzadkowski a80b1798c4 Add pod condition PodScheduled to detect situation
when scheduler tried to schedule a Pod, but failed.

Ref #24404
2016-05-12 10:21:21 +02:00
saadali 666da0ccdc Run codegen and codecgen 2016-05-11 17:15:55 -07:00
saadali b83af3d481 Change "speter.net/go/exp/math/dec/inf" dependency
to "https://gopkg.in/inf.v0"
2016-05-11 17:01:28 -07:00
k8s-merge-robot e0f7de94f5 Merge pull request #25279 from piosz/hpa-ga
Automatic merge from submit-queue

Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling

ref #21577

@lavalamp could you please review or delegate to someone from CSI team?
@janetkuo could you please take a look into the kubelet changes?

cc @fgrzadkowski @jszczepkowski @mwielgus @kubernetes/autoscaling
2016-05-11 13:19:42 -07:00
Clayton Coleman adf3c387ee
Regenerate api/unversioned by hand so that it is complete
We need to break the circular dependency on generation to the scheme.
2016-05-11 14:04:04 -04:00
Euan Kemp 713853d3a8 test: Call forgotten resttest test
PR #3789 introduced this test, but it was never called.
2016-05-11 10:55:07 -07:00
k8s-merge-robot 7ae1dab280 Merge pull request #25172 from pwittrock/kubectl-apiversion
Automatic merge from submit-queue

Kubectl support for validating nested objects with different ApiGroups

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
kubectl now supports validation of nested objects with different ApiGroups (e.g. objects in a List)
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

#24089
2016-05-11 10:11:55 -07:00
k8s-merge-robot ef885d05eb Merge pull request #21675 from soltysh/job_template
Automatic merge from submit-queue

Added JobTemplate, a preliminary step for ScheduledJob and Workflow

@sdminonne as promised, sorry it took this long 😊 
@erictune fyi though it does not have to be in for 1.2

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/21675)
<!-- Reviewable:end -->
2016-05-11 02:40:58 -07:00
Wojciech Tyczynski 9d52822377 Reproduce time issue with protobufs. 2016-05-11 09:34:29 +02:00
k8s-merge-robot 22dfaef9f0 Merge pull request #24943 from XiaoningDing/federation-copy-server-address-by-client-cidr
Automatic merge from submit-queue

copy ServerAddressByClientCIDR to federation types

#24016
copy ServerAddressByClientCIDR to federation types
update generated files

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-10 20:22:34 -07:00
Maciej Szulik a31ca0dc98 enable batch/v2alpha1 tests 2016-05-10 22:40:24 +02:00
Maciej Szulik de357fdea0 extensions -> batch internals move leftovers 2016-05-10 21:48:39 +02:00
Tim Hockin 72955770f3 Make IsQualifiedName return error strings 2016-05-10 11:23:23 -07:00
Lucas Käldström 0b6b723575 Run hack/update-all.sh 2016-05-10 20:39:25 +03:00
Lucas Käldström c28524fbab Add operatingsystem/architecture as node labels. Also, display that in status 2016-05-10 20:38:57 +03:00
jianhuiz 4e6e51dc26 copy ServerAddressByClientCIDR to federation types 2016-05-10 10:34:00 -07:00
Phillip Wittrock 680b2b9d09 Kubectl support for validating nested objects with different ApiGroups (e.g. Lists containing objects in different api groups). Closes #24089 2016-05-09 19:38:40 -07:00
Rudi Chiarito 362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
jianhuiz 441e206671 move server client shared annotations to new api/annotations package 2016-05-09 11:10:44 -07:00
Jordan Liggitt 6c323a4f72 Remove name generation from thirdpartyresource 2016-05-09 09:27:54 -04:00
Piotr Szczesniak 212b459817 Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling 2016-05-09 09:18:13 +02:00
k8s-merge-robot f2f3b49f58 Merge pull request #22575 from MikaelCluseau/wip-issue-20466
Automatic merge from submit-queue

Add subPath to mount a child dir or file of a volumeMount

Allow users to specify a subPath in Container.volumeMounts so they can use a single volume for many mounts instead of creating many volumes. For instance, a user can now use a single PersistentVolume to store the Mysql database and the document root of an Apache server of a LAMP stack pod by mapping them to different subPaths in this single volume.

Also solves https://github.com/kubernetes/kubernetes/issues/20466.
2016-05-08 08:45:15 -07:00
Clayton Coleman 9ebfa1db2f
Add a proto full decode benchmark 2016-05-07 11:55:31 -04:00
Clayton Coleman db5a851d0c
Inline default methods by hand in custom conversions 2016-05-07 11:55:31 -04:00
Clayton Coleman 7104be87cb
Regenerate conversions without reflection defaulting 2016-05-07 11:55:31 -04:00
k8s-merge-robot c0b788bf49 Merge pull request #24727 from smarterclayton/fast_path_lookup
Automatic merge from submit-queue

Avoid allocations and a reflect.Call in conversion

reflect.Call is fairly expensive, performing 8 allocations and having to
set up a call stack. Using a fairly straightforward to generate switch
statement, we can bypass that early in conversion (as long as the
function takes responsibility for invocation). We may also be able to
avoid an allocation for the conversion scope, but not positive yet.

```
benchmark                    old ns/op     new ns/op     delta
BenchmarkPodConversion-8     14713         12173         -17.26%

benchmark                    old allocs     new allocs     delta
BenchmarkPodConversion-8     80             72             -10.00%

benchmark                    old bytes     new bytes     delta
BenchmarkPodConversion-8     9133          8712          -4.61%
```

@wojtek-t related to #20309
2016-05-06 07:10:18 -07: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 60324ff884 Merge pull request #25229 from smarterclayton/bench_quantity
Automatic merge from submit-queue

Add quantity benchmarks
2016-05-06 02:31:38 -07:00
Kevin 82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00:00
Mikaël Cluseau 4c2dc566ac VolumeMount.SubPath: API change. 2016-05-06 15:40:10 +11:00
Mikaël Cluseau 06900a934d Introduce subPath in VolumeMount 2016-05-06 15:08:41 +11:00
k8s-merge-robot 4a7ec6034f Merge pull request #23928 from caesarxuchao/cascading-deletion-API-changes
Automatic merge from submit-queue

API changes for Cascading deletion 

This PR includes the necessary API changes to implement cascading deletion with finalizers as proposed is in #23656. Comments are welcome.

@lavalamp @derekwaynecarr @bgrant0607 @rata @hongchaodeng
2016-05-05 19:46:40 -07:00
Clayton Coleman cb3a479ed7
Add quantity benchmarks 2016-05-05 18:06:19 -04:00
derekwaynecarr d466d084c2 Resource name constants were not consistent 2016-05-05 16:21:05 -04:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
Clayton Coleman 5622c8a471
Generated files 2016-05-05 12:08:23 -04:00
Clayton Coleman 4ad5565c41
RecognizingDecoder didn't handle ambiguous input
YAML is not guaranteed to be recognizable, so we need to bump JSON and
protobuf above it in the decoding order. Add a unit test.
2016-05-05 12:08:22 -04:00
Chao Xu 4562a26d34 generated changes 2016-05-04 21:54:55 -07:00
Chao Xu a46b7775fc API changes for finalizers and system-wide garbage collector 2016-05-04 21:54:55 -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
k8s-merge-robot bc010d76cc Merge pull request #24751 from krousey/meta_unstructured
Automatic merge from submit-queue

Redo Unstructured to have accessor methods

Add accessor methods that implement pkg/api/unversioned.ObjectKind,
pkg/api/meta.Object, pkg/api/meta.Type and pkg/api/meta.List.

Removed the convenience fields since writing to them was not reflected
in serialized JSON.
2016-05-04 04:22:34 -07: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 b4c83022e3 Add NegotiatedSerializer to config 2016-05-04 10:02:58 +02:00
Kris 28132be07e Redo Unstructured to have accessor methods
Add accessor methods that implement pkg/api/unversioned.ObjectKind,
pkg/api/meta.Object, pkg/api/meta.Type and pkg/api/meta.List.

Removed the convenience fields since writing to them was not reflected
in serialized JSON.
2016-05-03 14:07:28 -07:00
Clayton Coleman 99430cf5de
Strip side-effect imports from generated protobuf 2016-05-02 18:12:20 -04: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
Clayton Coleman 8d0187add2
Generation changes 2016-04-29 17:12:09 -04:00
Clayton Coleman cf133ee03a
Convert remaining int types to fixed
Having internal and external integer types being different hides
potential conversion problems. Propagate that out further (which will
also allow us to better optimize conversion).
2016-04-29 17:12:04 -04:00
Random-Liu 7796b619fd Cleanup the code with new engine-api 2016-04-29 13:34:38 -07:00
Random-Liu 3876972d3f Clean up go-dockerclient reference. 2016-04-29 13:32:19 -07:00
k8s-merge-robot 46a6cae14e Merge pull request #24907 from smarterclayton/default_inliners
Automatic merge from submit-queue

Make all defaulters public

Will allow for generating direct accessors in conversion code instead of using reflection.

@wojtek-t
2016-04-29 06:36:09 -07:00
k8s-merge-robot ad67363c12 Merge pull request #24362 from ArtfulCoder/hostname-field
Automatic merge from submit-queue

Promote Pod Hostname & Subdomain to fields (were annotations)

Deprecating the podHostName, subdomain and PodHostnames annotations and created corresponding new fields for them on PodSpec and Endpoints types.

Annotation doc: #22564
Annotation code: #20688
2016-04-29 01:06:45 -07:00
k8s-merge-robot 8f9bff5b25 Merge pull request #24906 from smarterclayton/better_benchmark
Automatic merge from submit-queue

Slightly more effective conversion test (better variety)

Exercises more code paths for debugging memory allocations.
2016-04-28 23:17:57 -07:00
Abhishek Shah 8a3ed48808 Added Hostname and Subdomain field to Pod.Spec 2016-04-28 10:56:56 -07:00
Clayton Coleman 3e36dd62c6
Move defaulter functions to public methods with a convention
Preparing to generate direct defaulter access.
2016-04-28 12:20:13 -04:00
Jordan Liggitt 1e5815872e Validate deletion timestamp doesn't change on update 2016-04-28 11:50:48 -04:00
Clayton Coleman 9e3c2ee4ea
Optimize group version allocations 2016-04-28 10:53:42 -04:00
Clayton Coleman d0a7b93050 Slightly more effective conversion test (better variety) 2016-04-27 23:11:25 -04:00
Clayton Coleman 236925be87
Avoid allocations and a reflect.Call in conversion
reflect.Call is fairly expensive, performing 8 allocations and having to
set up a call stack. Using a fairly straightforward to generate switch
statement, we can bypass that early in conversion (as long as the
function takes responsibility for invocation). We may also be able to
avoid an allocation for the conversion scope, but not positive yet.

```
benchmark                    old ns/op     new ns/op     delta
BenchmarkPodConversion-8     14713         12173         -17.26%

benchmark                    old allocs     new allocs     delta
BenchmarkPodConversion-8     80             72             -10.00%

benchmark                    old bytes     new bytes     delta
BenchmarkPodConversion-8     9133          8712          -4.61%
```
2016-04-26 16:42:12 -04: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
jianhuiz 1c1ad1ad3f add cluster registry 2016-04-26 02:06:47 -07:00
jianhuiz fcb241d05c add api group 'federation' and 'cluster' object 2016-04-26 02:05:51 -07:00
k8s-merge-robot 293b0d0815 Merge pull request #23493 from soltysh/move_job_internals
Automatic merge from submit-queue

Move internal types of job from pkg/apis/extensions to pkg/apis/batch

This addressed the job part of #23216, this is still WIP. Will notify once finished. I'd like to have it in before starting working on ScheduledJob. 

@lavalamp @erictune fyi
2016-04-25 20:58:49 -07: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
Wojciech Tyczynski c0020aff59 Merge pull request #24539 from smarterclayton/unify_stream_and_serial
Unify Streaming and normal Serializers
2016-04-25 11:25:16 +02:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
k8s-merge-robot de9c1a2a51 Merge pull request #24247 from sdminonne/service_loadbalancer_quotas
Automatic merge from submit-queue

Adding loadBalancer services to quota system

@derekwaynecarr follow up to #22154.
2016-04-23 10:22:45 -07: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 66dc446ba0 Merge pull request #24347 from derekwaynecarr/fix_configmap
Automatic merge from submit-queue

Fix ConfigMapList.Items to not use omitempty

Fixes https://github.com/kubernetes/kubernetes/issues/24335
2016-04-22 04:07:44 -07:00
Wojciech Tyczynski 3f06755566 Regenerate protobuf files 2016-04-21 16:22:52 +02: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
derekwaynecarr fd04ff1bd1 Generated artifacts for ConfigMapList change 2016-04-21 02:07:45 -04:00
derekwaynecarr 155c1a4465 ConfigMapList.Items should not be omitempty 2016-04-21 02:07:45 -04:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
Clayton Coleman 86fb71aba7 Generated deep copies for new proto types 2016-04-20 12:13:09 -04:00
Clayton Coleman e16a7f2421 Initial protobuf generated files 2016-04-20 12:13:05 -04:00
Clayton Coleman cea4c010a6 Strip the proto build guard 2016-04-20 12:12:29 -04:00
AdoHe 16960d3ad2 fix reuse nodePort issue 2016-04-20 02:30:03 -04:00
k8s-merge-robot 6a7dcde2d5 Merge pull request #23955 from fejta/pkg-validation
Automatic merge from submit-queue

Use tagged gcr.io redis image for pkg/api tests

Migrate pkg/api/validation/testdata redis images to use tagged gcr.io version for https://github.com/kubernetes/kubernetes/issues/13288 and https://github.com/kubernetes/kubernetes/issues/20836
2016-04-19 16:37:13 -07:00
k8s-merge-robot 822618afb5 Merge pull request #23912 from smarterclayton/watch_until
Automatic merge from submit-queue

Add watch.Until, a conditional watch mechanism

A more powerful tool than wait.Poll, allows a watch interface to drive conditionals to react to changes on a resource or resources. Provide a set of standard conditions that are in common use in the code, and updates e2e to use a few of these.

Extracted from #23567
2016-04-16 21:05:40 -07:00
Clayton Coleman f89bde1415 Add watch.Until, a conditional watch mechanism
Also add helpers for collecting the events that happen during a watch
and a helper that makes it easy to start a watch from any object with
ObjectMeta.
2016-04-15 11:49:07 -04:00
Chakravarthy Nelluri f53bc4ebe0 Flexvolume: Add support for multiple secrets 2016-04-15 02:40:38 -07:00
nikhiljindal 6eae11e166 Updating the schema validation code 2016-04-14 18:07:00 -07:00
Erick Fejta eb0352cf2d Use fake images for pkg/api/validation unit tests 2016-04-14 17:13:15 -07:00
Daniel Smith 490c68dbe3 Merge pull request #23768 from wojtek-t/conversions_with_framework_6
Migrate to new conversions generator - part 2
2016-04-14 11:30:21 -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
Salvatore Dario Minonne f4ed4998ff Adding loadbalancer services to quota 2016-04-14 14:06:42 +02:00
k8s-merge-robot 20eccc24cd Merge pull request #24143 from goltermann/vetclean
Automatic merge from submit-queue

Final vet fixes; enabling vet checks in verify scripts.

Fixes #22523, #22524
2016-04-13 16:46:46 -07:00
Daniel Smith 4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -07:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
k8s-merge-robot 8eb19c7889 Merge pull request #22154 from sdminonne/service_nodeports_quotas
Automatic merge from submit-queue

Adding nodeports services to quota

To fix #21677
@derekwaynecarr
2016-04-13 05:50:27 -07: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 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
Salvatore Dario Minonne 15b7577454 Adding nodeports services to quota 2016-04-12 11:09:16 +02:00
Clayton Coleman 3474911736 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).
2016-04-11 11:22:05 -04:00
Wojciech Tyczynski 7448cc04e1 Switch to new generator 2016-04-11 08:04:45 +02:00
Wojciech Tyczynski cd2de7d4cd Merge pull request #23741 from wojtek-t/conversions_with_framework_5
Small improvements in conversion generator
2016-04-10 22:51:26 -07:00
Wojciech Tyczynski 6d954a1490 Merge pull request #23871 from smarterclayton/proto_timestamp
Implement a simpler unversioned.Time serialization
2016-04-10 22:47:49 -07:00
nikhiljindal b476ee4b12 Allowing type object in kubectl swagger validation 2016-04-08 17:26:35 -07:00
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Clayton Coleman 1f012a2bb3 Implement a simpler unversioned.Time serialization
Time is the number of seconds since the unix epoch and is consistent
with our JSON fields.
2016-04-05 11:19:24 -04:00
Wojciech Tyczynski 49d3c3962c Small improvements in conversion generator 2016-04-05 02:10:23 +02:00
Wojciech Tyczynski 53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02:00
k8s-merge-robot b1b58c4165 Merge pull request #23596 from deads2k/relax-case-in-restmapper
Automatic merge from submit-queue

relax restmapper resource matching

We were matching case insensitive on Kinds, not Resources, thus driving me insane.

@liggitt @caesarxuchao
2016-04-02 14:12:32 -07:00
k8s-merge-robot f5c93c8ddc Merge pull request #23472 from wojtek-t/fix_object_meta_for
Automatic merge from submit-queue

Switch from api.ObjectMetaFor to meta.Accessor in most of places

Fix #23278

@smarterclayton @lavalamp
2016-04-02 02:33:40 -07:00
k8s-merge-robot f8ea3fab53 Merge pull request #23427 from wojtek-t/conversions_with_framework_4
Automatic merge from submit-queue

Migrate to the new conversion generator - part1

This PR contains two commits:
- few more fixes to the generator
- migration of the pkg/api/v1 to use the new generator

The second commit is big, but I reviewed the changes and they contain:
- conversions between types that we didn't even generating conversion between
- changes in how we handle maps/pointers/slices - previously we were explicitly referencing fields, now we are using "shadowing in, out" to make the code more generic
- lack of auto-generated method for ReplicationControllerSpec (because these types are different (*int vs int for Replicas) and a preexisting conversion already exists

Most of issues in the first commit (e.g. adding references to "in" and "out" for slices/maps/points) were discovered by our tests. So I'm pretty confident that this change is correct now.
2016-03-31 17:28:36 -07:00
Wojciech Tyczynski 2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
Clayton Coleman f2139b186c Add an experimental protobuf serializer
Provide a core protobuf serializer that can either write objects with
an envelope (a 4 byte prefix and a runtime.Object) or raw to a byte
array.
2016-03-31 10:41:11 -04:00
deads2k 936421a4ab relax restmapper resource matching 2016-03-30 15:37:47 -04:00
Wojciech Tyczynski 700e459434 Regenerate conversions 2016-03-29 09:55:07 +02:00
Wojciech Tyczynski 9ee8278e4a Fix remaining issues with conversion generator. 2016-03-29 09:49:27 +02:00
Paul Morie b8db049358 Fix typo in PV reclaim policy API doc 2016-03-28 19:13:48 -04:00
Clayton Coleman 18906e0bcc Change PreferredSchedulingTerm to int32
Follow our external conventions and allow protobuf
2016-03-26 22:15:30 -04:00
k8s-merge-robot 1ad3049ed6 Merge pull request #23288 from smarterclayton/refactor_codec
Auto commit by PR queue bot
2016-03-26 10:47:58 -07:00
k8s-merge-robot 95e09e303f Merge pull request #22965 from caesarxuchao/delete-UID-precondition
Auto commit by PR queue bot
2016-03-26 09:36:28 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00