kubernetes/pkg/controller
Joseph Burnett 80e279d353 Ignore pending pods.
This change adds pending pods to the ignored set first before
selecting pods missing metrics. Pending pods are always ignored when
calculating scale.

When the HPA decides which pods and metric values to take into account
when scaling, it divides the pods into three disjoint subsets: 1)
ready 2) missing metrics and 3) ignored. First the HPA selects pods
which are missing metrics. Then it selects pods should be ignored
because they are not ready yet, or are still consuming CPU during
initialization. All the remaining pods go into the ready set. After
the HPA has decided what direction it wants to scale based on the
ready pods, it considers what might have happened if it had the
missing metrics. It makes a conservative guess about what the missing
metrics might have been, 0% if it wants to scale up--100% if it wants
to scale down. This is a good thing when scaling up, because newly
added pods will likely help reduce the usage ratio, even though their
metrics are missing at the moment. The HPA should wait to see the
results of its previous scale decision before it makes another
one. However when scaling down, it means that many missing metrics can
pin the HPA at high scale, even when load is completely removed. In
particular, when there are many unschedulable pods due to insufficient
cluster capacity, the many missing metrics (assumed to be 100%) can
cause the HPA to avoid scaling down indefinitely.
2019-07-10 12:16:33 +02:00
..
apis/config auto-generated file 2019-03-02 12:55:26 +08:00
bootstrap Fix lint warnings in pkg/controller/bootstrap 2019-03-19 14:36:26 -04:00
certificates fix golint failures of pkg/controller/certificates/approver 2019-05-02 10:37:38 +08:00
cloud Migrate fake cloud provider to staging 2019-05-14 13:32:18 -07:00
clusterroleaggregation Move from glog to klog 2018-11-10 07:50:31 -05:00
cronjob fix the metainternalversion.List change error 2019-05-07 10:35:04 +08:00
daemon fix daemon set rolling update hang 2019-05-16 10:52:48 +08:00
deployment change preempting to PreemptionPolicy 2019-05-31 12:42:05 +08:00
disruption Support scale subresource for PDBs (#76294) 2019-05-23 22:24:17 -07:00
endpoint auto-generated file 2019-03-02 12:55:26 +08:00
garbagecollector Fix TestStressingCascadingDeletion flake 2019-06-04 17:26:36 -04:00
history Merge pull request #72525 from justinsb/owners_should_not_be_executable 2019-02-14 23:55:45 -08:00
job Add pending status for pastBackoffLimitOnFailure 2019-05-21 09:45:29 +08:00
namespace fix golint failures of pkg/controller/namespace/deletion pkg/controller/serviceaccount 2019-05-23 12:09:01 +08:00
nodeipam Staging the GCE Cloud Provider 2019-05-07 13:17:52 -07:00
nodelifecycle duplicated klog.V(5) when had a if klog.V(5) 2019-05-24 00:49:38 +08:00
podautoscaler Ignore pending pods. 2019-07-10 12:16:33 +02:00
podgc auto-generated file 2019-03-02 12:55:26 +08:00
replicaset Updates OWNERS files and OWNERS_ALIASES for SIG Apps to make reviewers 2019-04-16 11:35:21 -07:00
replication Updates OWNERS files and OWNERS_ALIASES for SIG Apps to make reviewers 2019-04-16 11:35:21 -07:00
resourcequota Merge pull request #76927 from mrkm4ntr/unnecessary-goroutine 2019-05-06 21:31:53 -07:00
route route controller: respect rate limit for delete 2019-05-31 08:26:36 -04:00
service Don't mask k8s error returned from patch 2019-06-04 16:40:51 -07:00
serviceaccount fix golint failures of pkg/controller/namespace/deletion pkg/controller/serviceaccount 2019-05-23 12:09:01 +08:00
statefulset Updates OWNERS files and OWNERS_ALIASES for SIG Apps to make reviewers 2019-04-16 11:35:21 -07:00
testutil go-1.12: fix 'go vet' failures 2019-03-01 18:48:17 +02:00
ttl Move from glog to klog 2018-11-10 07:50:31 -05:00
ttlafterfinished This commit does two things in pkg package: 2019-04-09 10:56:35 +08:00
util/node update LastTransitionTime for pod ready condition when node become notready 2019-05-21 17:20:08 +08:00
volume Merge pull request #78061 from yuxiangqian/metrics 2019-05-31 20:45:13 -07:00
.import-restrictions change preempting to PreemptionPolicy 2019-05-31 12:42:05 +08:00
BUILD Refactor PV scheduling library into separate package 2019-05-02 14:45:52 +08:00
client_builder_dynamic.go Migrate the controller to use TokenRequest and rotate token periodically 2019-03-25 14:54:22 +08:00
client_builder.go Migrate the controller to use TokenRequest and rotate token periodically 2019-03-25 14:54:22 +08:00
controller_ref_manager_test.go remove unused code of (pkg/controller) 2018-10-09 08:15:30 +08:00
controller_ref_manager.go Move from glog to klog 2018-11-10 07:50:31 -05:00
controller_utils_test.go Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
controller_utils.go Switched to use dynamic shared informer for Garbage Collector. 2019-05-17 15:41:36 -07:00
doc.go
informer_factory.go resourcequota: use dynamic informer 2019-03-27 11:08:24 -07:00
lookup_cache.go
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00