kubernetes/pkg/controller
Joseph Burnett 1ccaaa768d Ignore deleted pods.
When a pod is deleted, it is given a deletion timestamp. However the
pod might still run for some time during graceful shutdown. During
this time it might still produce CPU utilization metrics and be in a
Running phase.

Currently the HPA replica calculator attempts to ignore deleted pods
by skipping over them. However by not adding them to the ignoredPods
set, their metrics are not removed from the average utilization
calculation. This allows pods in the process of shutting down to drag
down the recommmended number of replicas by producing near 0%
utilization metrics.

In fact the ignoredPods set is misnomer. Those pods are not fully
ignored. When the replica calculator recommends to scale up, 0%
utilization metrics are filled in for those pods to limit the scale
up. This prevents overscaling when pods take some time to startup. In
fact, there should be 4 sets considered (readyPods, unreadyPods,
missingPods, ignoredPods) not just 3.

This change renames ignoredPods as unreadyPods and leaves the scaleup
limiting semantics. Another set (actually) ignoredPods is added to
which delete pods are added instead of being skipped during
grouping. Both ignoredPods and unreadyPods have their metrics removed
from consideration. But only unreadyPods have 0% utilization metrics
filled in upon scaleup.
2020-10-14 16:45:06 +02:00
..
apis/config Move cmd/controller-manager to k8s.io/controller-manager and cloud specific configs to k8s.io/cloud-provider. 2020-10-08 13:23:16 -07:00
bootstrap Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
certificates Merge pull request #92983 from iotty/csr.clean 2020-08-27 19:08:23 -07:00
clusterroleaggregation Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
cronjob Use pager's context instead of TODO 2020-09-23 20:18:03 +02:00
daemon Merge pull request #89482 from renatoviana12/master 2020-10-05 20:00:19 -07:00
deployment Merge pull request #89482 from renatoviana12/master 2020-10-05 20:00:19 -07:00
disruption Fixed percentage behavior in instr 2020-09-30 21:23:05 +01:00
endpoint Fix lint errors in pkg/contoller/endpoint 2020-10-01 09:11:00 +02:00
endpointslice Merge pull request #94443 from aojea/slicesLabels 2020-10-02 18:23:04 -07:00
endpointslicemirroring find . -type f \( -name "*.go" -or -name "*.md" \) -print0 | xargs -0 gsed -i 's/the the /the /g' 2020-09-21 16:37:12 -04:00
garbagecollector Revert "Merge pull request #93156 from logicalhan/triage-api-machinery" 2020-07-24 13:01:02 +05:30
history automated refactor 2020-03-05 14:59:46 -08:00
job Number of failed jobs should exceed the backoff limit and not big equal. 2020-08-11 11:06:09 +03:00
namespace Fix namespace controller cleanup orphaning 2020-08-07 13:26:28 -04:00
nodeipam Add providerless tags 2020-07-30 13:48:40 -04:00
nodelifecycle Do not evict pods which tolerate all NoExecute taints 2020-08-05 12:50:43 -04:00
podautoscaler Ignore deleted pods. 2020-10-14 16:45:06 +02:00
podgc code clean for podgc 2020-07-04 23:01:16 +08:00
replicaset test: ensure WaitForCacheSync is called after starting sharedInformerFacotry 2020-09-15 16:02:35 +08:00
replication Run update-bazel.sh 2020-06-22 10:49:15 +09:00
resourcequota Add more tests for LRU cache lookup 2020-09-04 15:09:03 +02:00
serviceaccount Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
statefulset do not create StatefulSet pods when PVC is being deleted 2020-08-17 22:50:42 +00:00
testutil Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
ttl Lint ttl_controller 2020-09-28 14:22:37 +02:00
ttlafterfinished Replace StartLogging(klog.Infof) with StartStructuredLogging(0) 2020-06-15 17:48:35 +09:00
util Improve EndpointController's handling of headless services under dual-stack 2020-07-17 15:26:21 -04:00
volume Merge pull request #94527 from brahmaroutu/mount-utils-2 2020-09-21 17:46:47 -07:00
BUILD Move cmd/controller-manager to k8s.io/controller-manager and cloud specific configs to k8s.io/cloud-provider. 2020-10-08 13:23:16 -07:00
client_builder_dynamic.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
client_builder.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
controller_ref_manager_test.go remove unused code of (pkg/controller) 2018-10-09 08:15:30 +08:00
controller_ref_manager.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
controller_utils_test.go Do not swallow NotFound error for DeletePod in dsc.manage 2020-06-04 16:41:38 +08:00
controller_utils.go Migrate to log calls to klog.InfoS and klog.ErroS for pkg/controller 2020-06-05 13:23:01 +08:00
doc.go
informer_factory.go Use metadata informers instead of dynamic informers in controller manager 2019-07-11 12:18:52 -04:00
lookup_cache.go
OWNERS Adding cheftako to pkg/controller/OWNERS 2020-07-09 16:10:59 -07:00