kubernetes/pkg/controller
Solly Ross 2c66d47786 HPA: Consider unready pods and missing metrics
Currently, the HPA considers unready pods the same as ready pods when
looking at their CPU and custom metric usage.  However, pods frequently
use extra CPU during initialization, so we want to consider them
separately.

This commit causes the HPA to consider unready pods as having 0 CPU
usage when scaling up, and ignores them when scaling down.  If, when
scaling up, factoring the unready pods as having 0 CPU would cause a
downscale instead, we simply choose not to scale.  Otherwise, we simply
scale up at the reduced amount caculated by factoring the pods in at
zero CPU usage.

The effect is that unready pods cause the autoscaler to be a bit more
conservative -- large increases in CPU usage can still cause scales,
even with unready pods in the mix, but will not cause the scale factors
to be as large, in anticipation of the new pods later becoming ready and
handling load.

Similarly, if there are pods for which no metrics have been retrieved,
these pods are treated as having 100% of the requested metric when
scaling down, and 0% when scaling up.  As above, this cannot change the
direction of the scale.

This commit also changes the HPA to ignore superfluous metrics -- as
long as metrics for all ready pods are present, the HPA we make scaling
decisions.  Currently, this only works for CPU.  For custom metrics, we
cannot identify which metrics go to which pods if we get superfluous
metrics, so we abort the scale.
2016-11-08 00:59:23 -05:00
..
certificates include multiple versions in clientset 2016-10-29 13:30:47 -07:00
cronjob Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
daemon Merge pull request #35465 from lukaszo/ds_event 2016-11-07 18:18:05 -08:00
deployment Merge pull request #36094 from janetkuo/overlapping-deployment-select 2016-11-05 21:04:58 -07:00
disruption Add more events to disruption controller 2016-11-07 00:07:52 +01:00
endpoint Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
garbagecollector Replace negotiation with a new method that can extract info 2016-10-28 11:30:11 -04:00
informers Switch to JobLister 2016-11-03 20:41:40 -04:00
job Switch to JobLister 2016-11-03 20:41:40 -04:00
namespace Fix possible race in operationNotSupportedCache 2016-11-04 14:11:54 -04:00
node Update bazel 2016-11-03 13:47:09 -07:00
petset implement statefulset update pet unit test 2016-11-05 19:47:01 +08:00
podautoscaler HPA: Consider unready pods and missing metrics 2016-11-08 00:59:23 -05:00
podgc addressing comments. 2016-10-27 13:30:04 -07:00
replicaset Replica set/rc controller changes for Conditions 2016-11-02 10:30:09 +01:00
replication Replica set/rc controller changes for Conditions 2016-11-02 10:30:09 +01:00
resourcequota quota controller uses informers if available for pod calculation 2016-10-31 11:38:22 -04:00
route autogenerated 2016-10-21 17:32:32 -07:00
service include multiple versions in clientset 2016-10-29 13:30:47 -07:00
serviceaccount convert SA controller to shared informers 2016-10-27 15:44:46 -04:00
volume Remove GetRootContext from VolumeHost 2016-11-03 12:21:19 -04:00
.import-restrictions add import restrictions 2016-10-13 16:10:24 -07:00
BUILD include multiple versions in clientset 2016-10-29 13:30:47 -07:00
client_builder.go move watch.ListWatchUntil to its own package to avoid future import cycle 2016-10-30 13:14:20 -07:00
controller_ref_manager.go fix tests; convert IsPodActive to operate on *Pod 2016-08-17 13:05:37 -07:00
controller_utils_test.go remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
controller_utils.go controller: support perma-failed deployments 2016-11-04 13:36:46 +01:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
lookup_cache.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
OWNERS Remove myself from a bunch of OWNERS files, as I am too overloaded 2016-05-11 13:34:51 -07:00