Commit Graph

163 Commits (52ef3e6e94b0f6b98098dbe2943ad4426ed10308)

Author SHA1 Message Date
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Andy Goldstein e3af3451c8
ObjectMeta, ListMeta, and TypeMeta should implement their interfaces
Make unversioned.ListMeta implement List. Update all the *List types so they implement GetListMeta.
This helps avoid using reflection to get list information.

Remove all unnecessary boilerplate, move the interfaces to the right
places, and add a test that verifies that objects implement one, the
other, but never both.
2016-06-10 13:28:54 -04:00
Clayton Coleman e1dc3ef933
Remove unused deep_copies 2016-06-06 17:18:22 -04: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 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 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
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
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
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
Wojciech Tyczynski 9d52822377 Reproduce time issue with protobufs. 2016-05-11 09:34:29 +02:00
Tim Hockin 72955770f3 Make IsQualifiedName return error strings 2016-05-10 11:23:23 -07: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
Kevin 82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00:00
Clayton Coleman 5622c8a471
Generated files 2016-05-05 12:08:23 -04:00
Clayton Coleman 99430cf5de
Strip side-effect imports from generated protobuf 2016-05-02 18:12:20 -04:00
Clayton Coleman 9e3c2ee4ea
Optimize group version allocations 2016-04-28 10:53:42 -04:00
jianhuiz fcb241d05c add api group 'federation' and 'cluster' object 2016-04-26 02:05:51 -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
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 700e459434 Regenerate conversions 2016-03-29 09:55:07 +02:00
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Wojciech Tyczynski 7e2fdeae7b Regenerate autogenerate files 2016-03-17 15:22:19 +01:00
Wojciech Tyczynski e610c137c0 Regenerate auto-generated files 2016-03-17 09:30:02 +01:00
deads2k 5bd161a9cc allow resource.version.group in kubectl 2016-03-11 10:21:50 -05:00
Madhusudan.C.S fe26381c90 Support for both map-based and set-based selectors in extensions/v1beta1.Scale
Here are a list of changes along with an explanation of how they work:
1. Add a new string field called TargetSelector to the external version of
   extensions Scale type (extensions/v1beta1.Scale). This is a serialized
   version of either the map-based selector (in case of ReplicationControllers)
   or the unversioned.LabelSelector struct (in case of Deployments and
   ReplicaSets).
2. Change the selector field in the internal Scale type (extensions.Scale) to
   unversioned.LabelSelector.
3. Add conversion functions to convert from two external selector fields to a
   single internal selector field. The rules for conversion are as follows:
   i.   If the target resource that this scale targets supports LabelSelector
        (Deployments and ReplicaSets), then serialize the LabelSelector and
        store the string in the TargetSelector field in the external version
        and leave the map-based Selector field as nil.
   ii.  If the target resource only supports a map-based selector
        (ReplicationControllers), then still serialize that selector and
	store the serialized string in the TargetSelector field. Also,
	set the the Selector map field in the external Scale type.
   iii. When converting from external to internal version, parse the
        TargetSelector string into LabelSelector struct if the string isn't
	empty. If it is empty, then check if the Selector map is set and just
	assign that map to the MatchLabels component of the LabelSelector.
   iv.  When converting from internal to external version, serialize the
        LabelSelector and store it in the TargetSelector field. If only
	the MatchLabel component is set, then also copy that value to
	the Selector map field in the external version.
4. HPA now just converts the LabelSelector field to a Selector interface
   type to list the pods.
5. Scale Get and Update etcd methods for Deployments and ReplicaSets now
   return extensions.Scale instead of autoscaling.Scale.
6. Consequently, SubresourceGroupVersion override and is "autoscaling"
   enabled check is now removed from pkg/master/master.go
7. Other small changes to labels package, fuzzer and LabelSelector
   helpers to piece this all together.
8. Add unit tests to HPA targeting Deployments and ReplicaSets.
9. Add an e2e test to HPA targeting ReplicaSets.
2016-03-09 17:54:17 -08:00
Kris dbde4fd798 Move the discovery client to its own package 2016-03-04 13:44:52 -08:00
Abhi Shah b25a48d605 Revert "Move discovery client to its own package" 2016-03-04 09:24:54 -08:00
Kris f22664159e Move the discovery client to its own package 2016-02-29 15:37:21 -08:00
k8s-merge-robot c4ffcbdbaa Merge pull request #21398 from liggitt/time-param
Auto commit by PR queue bot
2016-02-27 03:37:07 -08:00
deads2k 9c42d219bc allow disambiguation of resouces 2016-02-25 07:35:23 -05:00
Jordan Liggitt ea59b4c741 Fix sinceTime pod log options 2016-02-25 00:46:13 -05:00
k8s-merge-robot aee2eb3977 Merge pull request #21434 from erictune/job-ga
Auto commit by PR queue bot
2016-02-22 00:12:54 -08:00
k8s-merge-robot 807344da0b Merge pull request #21235 from davidopp/affinity-docs
Auto commit by PR queue bot
2016-02-20 11:15:02 -08:00
Eric Tune b4d454e9d5 Autogenerate. 2016-02-19 09:48:03 -08:00
David Oppenheimer 053f1c6008 Update user guide and scheduler documentation to describe node affinity.
Register image priority locality function, which the original PR that introduced
it forgot to do. Change zone and region labels to beta.
2016-02-18 17:09:41 -08:00
nikhiljindal 20ce4aed0e Adding hostname to groups discovery information 2016-02-18 11:58:11 -08:00
k8s-merge-robot d6b4ff3884 Merge pull request #20909 from Clarifai/instance-type-label
Auto commit by PR queue bot
2016-02-13 18:51:42 -08:00
Rudi Chiarito b3863eae82 Add instance-type label to cloud providers
Fully implemented for AWS and GCE
2016-02-12 15:02:03 -05:00
deads2k 2d0fe7dbf1 let singularization handle non-conflicting ambiguity 2016-02-12 08:28:32 -05:00
Janet Kuo a86b30e7a8 Fix selector output when get/describe replicasets 2016-02-10 11:13:46 -08:00
mqliang b5e99be81c implement kubectl get/describe for ReplicaSet 2016-02-09 13:56:21 +08:00
Madhusudan.C.S 0bcab9ab11 Implement ReplicaSet registry. 2016-02-05 16:14:10 -08:00
Eric Tune eba2c56566 hack/update-generated-swagger-docs.sh 2016-02-04 13:46:34 -08:00
Eric Tune 6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
k8s-merge-robot 5914deeac8 Merge pull request #19380 from brendandburns/apiresource
Auto commit by PR queue bot
2016-02-03 00:49:47 -08:00
Clayton Coleman c1d932e44a Switch API objects to not register per version codecs
Remove Codec from versionInterfaces in meta (RESTMapper is now agnostic
to codec and serialization). Register api/latest.Codecs as the codec
factory and use latest.Codecs.LegacyCodec(version) as an equvialent to
the previous codec.
2016-01-22 01:10:21 -05:00
Brendan Burns 79533385cf Add kind to APIResource 2016-01-07 22:27:34 -08:00
Clayton Coleman 1220464f2a Exclude new groupversion types from protobuf 2016-01-05 22:57:33 -05:00
k8s-merge-robot 21c01c05e3 Merge pull request #18902 from deads2k/gv-partial
Auto commit by PR queue bot
2015-12-24 01:42:59 -08:00
k8s-merge-robot 16e1de6db6 Merge pull request #18859 from deads2k/gv-grab-bag
Auto commit by PR queue bot
2015-12-23 23:57:24 -08:00
Wojciech Tyczynski 4aa2121a8e Remove dead code 2015-12-22 11:07:22 +01:00
deads2k d41e7ecf53 miscellaneous group version updates 2015-12-21 09:52:50 -05:00
deads2k 20f9c2c545 find partial resource matches 2015-12-21 09:26:06 -05:00
Wojciech Tyczynski 58336829be Switch to versioned ListOptions in server. 2015-12-21 14:23:37 +01:00
Abhishek Shah 6f63875165 Reverting 18442 2015-12-17 16:57:29 -08:00
deads2k 9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
k8s-merge-robot 5c4479f542 Merge pull request #18442 from deads2k/gv-restmapper-10
Auto commit by PR queue bot
2015-12-17 06:06:43 -08:00
Brendan Burns 2efcccf981 Add a server side export facility 2015-12-16 15:01:13 -08:00
deads2k 41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
k8s-merge-robot 8d633458cd Merge pull request #18148 from feihujiang/addEnumTypeForStatusReansonConstants
Auto commit by PR queue bot
2015-12-09 03:35:55 -08:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
k8s-merge-robot ec1ba7438f Merge pull request #17796 from deads2k/gv-object-typer
Auto commit by PR queue bot
2015-12-07 12:34:55 -08:00
deads2k 3f045cf168 udpate admission for API groups 2015-12-07 08:55:01 -05:00
deads2k f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
k8s-merge-robot c6b59353e1 Merge pull request #18022 from deads2k/gv-request
Auto commit by PR queue bot
2015-12-05 22:38:40 -08:00
Clayton Coleman 9fea762917 Add protobuf preparation objects, guarded by proto tag 2015-12-05 18:15:48 -05:00
deads2k 0fd17b7b2e update client.Request for GroupVersion 2015-12-03 08:16:41 -05:00
feihujiang ad10ca1da8 Add type for StatusReason constants 2015-12-03 19:22:03 +08:00
k8s-merge-robot ee71ddcefe Merge pull request #17956 from deads2k/gv-requestscope
Auto commit by PR queue bot
2015-12-02 08:00:33 -08:00
deads2k a7dd09ec47 update requestScope to fully qualify kind and resource 2015-12-01 16:50:24 -05:00
k8s-merge-robot 55f5e48047 Merge pull request #16628 from caesarxuchao/change-error-type
Auto commit by PR queue bot
2015-11-30 17:21:52 -08:00
Clayton Coleman 1d592e4c28 Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).

Did not change the metadata fields for now.
2015-11-26 11:45:25 -05:00
deads2k 8679925847 update RESTMapping API to be properly typed 2015-11-25 14:02:37 -05:00
Chao Xu a4700707b3 change the "too old resource version" error from InternalError to 410 Gone. 2015-11-25 10:27:03 -08:00
deads2k ed95a6d77f update scheme to use GroupVersion 2015-11-25 12:15:48 -05:00
deads2k 68b0572974 internal versions 2015-11-25 12:14:06 -05:00
deads2k 6231404682 update decoder to use GroupVersion 2015-11-25 12:14:06 -05:00
deads2k 94ad6aa0c4 make DefaultRESTMapper use GroupVersion 2015-11-24 14:17:37 -05:00
Wojciech Tyczynski f09e8d3eb0 ref 2015-11-23 09:56:25 +01:00
Wojciech Tyczynski 77fd936b5f Create unversioned.ListOptions object. 2015-11-23 09:55:33 +01:00
k8s-merge-robot 759df1ef6e Merge pull request #17569 from quinton-hoole/2015-11-19-fix-node-zone-labels
Auto commit by PR queue bot
2015-11-21 16:33:11 -08:00
Quinton Hoole bec4167525 Make zone and region node labels conformant.
Fixes #17506
2015-11-19 16:35:58 -08:00
Wojciech Tyczynski 975871e0a0 JSON marshaling/unmarshaling of label Selector 2015-11-19 16:44:48 +01:00
deads2k 303bcad398 use groupversion in RESTMapping 2015-11-16 09:22:11 -05:00
deads2k bf983e942c use GroupVersion in APIGroupVersion for api installer 2015-11-16 07:42:00 -05:00
David Eads 486103d887 Revert "use GroupVersion in APIGroupVersion for api installer" 2015-11-13 12:55:08 -05:00
deads2k 3c725f17ea use GroupVersion in APIGroupVersion for api installer 2015-11-13 09:00:04 -05:00
k8s-merge-robot e80dd6689f Merge pull request #16866 from justinsb/zone_labels_on_nodes
Auto commit by PR queue bot
2015-11-12 07:25:37 -08:00
k8s-merge-robot 354c6f3b12 Merge pull request #16834 from caesarxuchao/GroupVersion-Object
Auto commit by PR queue bot
2015-11-07 03:43:30 -08:00
Chao Xu 2f012ae036 run gen-swagger-docs 2015-11-05 15:49:52 -08:00
Chao Xu 15e6ca5ac5 rename to GroupVersion and rename the one in type.go to GroupVersionForDiscovery 2015-11-05 14:52:58 -08:00
Chao Xu fb360bca98 add comments 2015-11-05 14:15:01 -08:00