Commit Graph

53 Commits (73a3d48dc8e87cc75587b49bdf906e4c1b38c51e)

Author SHA1 Message Date
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -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
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04: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
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Chao Xu 49559a3332 Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
Marcin Wielgus c640256917 Shorten execution time of HPA tests 2016-03-25 13:02:55 +01: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
Filip Grzadkowski 69b3c6aa39 Add events to improve understandability of HPA controller decisions.
Fixes #22174
2016-03-03 12:05:51 +01:00
Filip Grzadkowski b5c9af9762 Use controller framework in HPA controller.
Ref #22174
2016-03-03 11:55:44 +01:00
Piotr Szczesniak 205e3e607d Added default cpu target for HPA 2016-03-02 09:38:26 +01:00
Chao Xu cf98bcb48a Merge pull request #21816 from caesarxuchao/fix-21763
Fix the EventSink in HPA controller
2016-02-24 14:09:02 -08:00
Chao Xu e20e295cbe fix Event broadcaster for HPA 2016-02-23 16:15:10 -08:00
Piotr Szczesniak 0dfeb81390 HPA update its status even if getting metrics failed 2016-02-23 14:30:03 +01:00
Piotr Szczesniak 762e155f3e Refactoring of pod autoscaler controller 2016-02-23 11:29:40 +01:00
k8s-merge-robot a6d855bf64 Merge pull request #21149 from mwielgus/hpa-rescale
Auto commit by PR queue bot
2016-02-20 01:51:08 -08:00
Marcin Wielgus 1d3891284e Handle scenarios when the replica count is outside of HPA replica range 2016-02-18 13:45:03 +01:00
Chao Xu 97aecd002a remove underscore in imported pkg names 2016-02-16 10:54:51 -08:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot e76caf43aa Merge pull request #20703 from mwielgus/hpa-cm-validation
Auto commit by PR queue bot
2016-02-06 21:16:51 -08:00
Marcin Wielgus 9a74a60413 Validation of HPA custom metrics annotation 2016-02-05 11:31:51 +01:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
k8s-merge-robot 843c11e06a Merge pull request #20452 from caesarxuchao/replace-client-kubelet
Auto commit by PR queue bot
2016-02-02 23:46:58 -08:00
Chao Xu fe7887f1ec replace the client with clientset in controllers 2016-02-02 20:28:45 -08:00
Marcin Wielgus 05565ff7e5 CustomMetrics in HPA controller 2016-02-01 13:45:45 +01:00
Solly Ross 15fc230a59 Make HPA Controller use Namespacers
The HPA controller had previously used a single Client
object to act as three different Namespacers.  To improve
ease of extensibility and to make it clearer what the HPA
controller actually needs to use from the client, it should
use separate Namespacers for each of its needs (Scales, HPAs,
and Events).
2015-12-14 11:41:00 -05:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Wojciech Tyczynski 342eee680c Revert "[hpa] Parameterize tolerance, downscale, and upscale into HPAController, and add corresponding unit test for backsolved tolerance." 2015-12-13 09:54:43 +01:00
Jay Vyas 5161d169ba Parameterization for downscale, upscale, and tolerance with backsolving
unit test for visible testing of tolerance algorithm expectations. Logs for dScale, uScale, tol creation.
2015-12-10 10:59:21 -05:00
Wojciech Tyczynski 6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
Marek Grabowski f633aa67b1 Merge pull request #18065 from jszczepkowski/hpa-fix
Fixed forbidden window enforcement in horizontal pod autoscaler.
2015-12-03 08:36:10 +01:00
Jerzy Szczepkowski 8cdda36b1e Fixed forbidden window enforcement in horizontal pod autoscaler.
Fixed forbidden window enforcement in horizontal pod autoscaler: time of the oldest report instead of now is taken into account. Fixes #17992.
2015-12-03 08:29:24 +01:00
Wojciech Tyczynski 8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
Avesh Agarwal 3d5207fd73 This commit adds type information to events.
This addresses issue #15624.
2015-11-24 09:59:54 -05:00
deads2k fd1c8e096a eliminate cross-namespace HPA escalation attack 2015-11-03 08:05:26 -05:00
Jerzy Szczepkowski de25a3bc08 Fixed resetting last scale time in HPA status.
Fixed resetting last scale time in HPA status. Fixes #16275.
2015-10-26 16:36:05 +01:00
Jerzy Szczepkowski df732f061a HorizontalPodAutoscaler API: removal of ResourceConsumption target, introduction of CPU request utilization & other cleanups. 2015-10-16 07:15:50 +02:00
Chao Xu 493d2b6920 grep sed Experimental() 2015-10-13 13:22:54 -07:00
derekwaynecarr 3c012db30f Add status subresource to HorizontalPodAutoscaler 2015-10-12 11:27:56 -04:00
Chao Xu 7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu 67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Jerzy Szczepkowski f8b18b0a4c Improved logging for horizontal pod autoscaler.
Improved logging for horizontal pod autoscaler. Disabled redundant e2e test.
2015-10-05 16:26:14 +02:00
Jerzy Szczepkowski a5194c5ff4 HorizontalPodAutoscaler.Status kept by value, not by pointer.
HorizontalPodAutoscaler.Status kept by value, not by pointer. Fixes #14567.
2015-09-29 14:25:46 +02:00
Jerzy Szczepkowski c8238c079a E2E tests for horizontal pod autoscaler.
Fixes & tuning in horiontal pod autoscaler and its e2e tests; two of the tests added to "Autoscaling suite".
2015-09-24 14:14:35 +02:00
k8s-merge-robot c2f76e4ce7 Merge pull request #14106 from jszczepkowski/hpa-api
Auto commit by PR queue bot
2015-09-19 22:23:06 -07:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
Jerzy Szczepkowski 7fcf7f1177 Cleanups in HorizontalPodAutoscaler API.
Cleanups in HorizontalPodAutoscaler API: renamed Min/MaxCount to Min/MaxReplicas as Replicas is the proper name used in other objects.
2015-09-17 14:16:43 +02:00
Jerzy Szczepkowski 722b0a6cf8 Unittests for horizontal pod autoscaler controller.
Unittests for horizontal pod autoscaler controller.
2015-09-17 09:32:05 +02:00
Jerzy Szczepkowski e8ceee0d6f Events for HorizontalPodAutoscalers.
Implemented events for reconcilation of HorizontalPodAutoscalers.
2015-09-14 16:00:31 +02:00