kubernetes/pkg/api
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
..
endpoints Specify hostname, subdomain via annotation on podspec. 2016-03-04 13:28:33 -08:00
errors Interpret etcd not found error on a update 2016-03-04 12:06:13 -08:00
install Support the subresource of service proxy 2016-02-18 15:16:05 +08:00
meta add a PriorityRESTMapper that can choose particular group/version of a resource 2016-02-25 07:35:23 -05:00
pod Specify hostname, subdomain via annotation on podspec. 2016-03-04 13:28:33 -08:00
resource Add or subtract from zero should not lose format 2016-02-04 13:16:47 -05:00
rest revert 20202 2016-02-28 19:03:22 -08:00
service LB Source Ranges: Move validation into API layer 2016-03-03 10:27:17 -05:00
testapi Teach serde test to deal with autoscaling group's duality. 2016-02-25 15:05:28 -08:00
testing Support for both map-based and set-based selectors in extensions/v1beta1.Scale 2016-03-09 17:54:17 -08:00
unversioned Support for both map-based and set-based selectors in extensions/v1beta1.Scale 2016-03-09 17:54:17 -08:00
util "experimental" -> "extensions" 2015-10-09 15:14:03 -07:00
v1 Merge pull request #22183 from pmorie/config-quota 2016-03-04 03:12:51 -08:00
validation Merge pull request #22420 from AdoHe/kubectl_swagger_cache 2016-03-07 15:18:56 -08:00
context_test.go rewrite go imports 2015-08-05 17:30:03 -07:00
context.go New etcd client modifications part 1 (context support) 2015-10-12 08:45:49 -05:00
conversion_test.go Move conversion.Scheme to runtime 2016-01-30 14:12:40 -05:00
conversion.go Fix sinceTime pod log options 2016-02-25 00:46:13 -05:00
copy_test.go Switch API objects to not register per version codecs 2016-01-22 01:10:21 -05:00
deep_copy_generated.go Generated code for ResourceQuota API change 2016-02-26 20:34:14 -05:00
deep_copy_test.go Switch API objects to not register per version codecs 2016-01-22 01:10:21 -05:00
doc.go Cleanup the content of deprecated V1beta1 2015-11-06 13:42:51 +08:00
field_constants.go Move restclient to its own package 2016-02-29 12:05:13 -08:00
generate_test.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
generate.go rewrite go imports 2015-08-05 17:30:03 -07:00
helpers_test.go implement Node affinity and NodeSelector 2016-02-04 01:53:14 +00:00
helpers.go Add resource quota for ConfigMap 2016-03-02 09:59:51 -05:00
mapper.go changed NewDefaultRESTMapper to check for a partial package path 2016-02-23 04:24:01 -08:00
meta_test.go Change runtime.Object signature 2015-12-15 13:36:25 -05:00
meta.go Change runtime.Object signature 2015-12-15 13:36:25 -05:00
node_example.json Updating scripts to use v1 instead of v1beta3 2015-07-01 00:23:16 -07:00
OWNERS Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
pod_example.json Updating scripts to use v1 instead of v1beta3 2015-07-01 00:23:16 -07:00
ref_test.go Change runtime.Object signature 2015-12-15 13:36:25 -05:00
ref.go Change runtime.Object signature 2015-12-15 13:36:25 -05:00
register.go Support the subresource of service proxy 2016-02-18 15:16:05 +08:00
replication_controller_example.json Merge pull request #10604 from nikhiljindal/v1 2015-07-01 15:54:17 -07:00
requestcontext.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
resource_helpers_test.go Make default format right for nil values 2016-02-15 13:55:33 -05:00
resource_helpers.go Make default format right for nil values 2016-02-15 13:55:33 -05:00
serialization_proto_test.go Add protobuf preparation objects, guarded by proto tag 2015-12-05 18:15:48 -05:00
serialization_test.go Teach serde test to deal with autoscaling group's duality. 2016-02-25 15:05:28 -08:00
types.generated.go Generated code for ResourceQuota API change 2016-02-26 20:34:14 -05:00
types.go Merge pull request #22183 from pmorie/config-quota 2016-03-04 03:12:51 -08:00