Commit Graph

4417 Commits

Author SHA1 Message Date
matte21
b4fed83a4a PVC protection controller: get rid of PVC leaks
Make the PVC protection controller robust to cases where a Pod X is deleted,
then a Pod Y with the same namespaced name is created and the two events are
delivered via a single update notification. Both pods should be processed,
because X might be blocking deletion of a PVC which is not referenced by Y.
Prior to this commit only the newer pod is processed, which means that it
is possible to leak PVCs.

Also, add unit tests to reflect the change.
2019-07-26 11:17:17 +02:00
Kubernetes Prow Robot
664edf8327
Merge pull request #79408 from seans3/move-kubectl-scheme
Move kubectl scheme
2019-07-19 16:08:55 -07:00
Kubernetes Prow Robot
49f6510d9a
Merge pull request #80277 from draveness/feature/revert-cleanup-critical-pod
Revert "feat: cleanup pod critical pod annotations feature"
2019-07-18 19:31:37 -07:00
Sean Sullivan
67140f13fe Updated dependencies: BUILD/modules.txt 2019-07-18 15:43:26 -07:00
Sean Sullivan
140c62cd4c Update all imports to scheme in staging 2019-07-18 15:32:27 -07:00
Kubernetes Prow Robot
8d4c49faae
Merge pull request #80088 from ZP-AlwaysWin/dev01
Fix golint failure in pkg/controller/volume/expand
2019-07-18 09:52:12 -07:00
draveness
d83526d253 Revert "feat: cleanup pod critical pod annotations feature"
This reverts commit b6d41ee5cc.
2019-07-18 13:31:12 +08:00
Kubernetes Prow Robot
91e17af5ff
Merge pull request #80263 from tedyu/job-ctrl-early
Skip unnecessary operations if diff is <= 0
2019-07-17 21:28:48 -07:00
Kubernetes Prow Robot
c23a031bb4
Merge pull request #79060 from tedyu/dc-check-err
Check error return from MetaNamespaceKeyFunc
2019-07-17 19:34:10 -07:00
Ted Yu
898f099346 Skip unnecessary operations if diff is less than 0 2019-07-17 14:03:08 -07:00
Kubernetes Prow Robot
601b7935ff
Merge pull request #79971 from mrkm4ntr/fix-pv-existence-check
Add check to reduce orphaned volume
2019-07-17 12:20:12 -07:00
Ted Yu
c429b7d3e4 Handle error return from MetaNamespaceKeyFunc 2019-07-17 10:52:23 -07:00
ZP-AlwaysWin
1573be94ae fix pkg/controller/volume/expand/pvc_populator.go 2019-07-17 09:00:24 +08:00
Kubernetes Prow Robot
5ece88c4c8
Merge pull request #74526 from DXist/feature/hpa-scale-to-zero
Support scaling HPA to/from zero pods for object/external metrics
2019-07-16 10:11:24 -07:00
Rinat Shigapov
d55f037b7d HPA scale-to-zero for custom object/external metrics
Add support for scaling to zero pods

minReplicas is allowed to be zero

condition is set once

Based on https://github.com/kubernetes/kubernetes/pull/61423

set original valid condition

add scale to/from zero and invalid metric tests

Scaling up from zero pods ignores tolerance

validate metrics when minReplicas is 0

Document HPA behaviour when minReplicas is 0

Documented minReplicas field in autoscaling APIs
2019-07-16 08:46:21 -05:00
Kubernetes Prow Robot
12f36302f9
Merge pull request #78361 from tedyu/stateful-get-rev
Break out of loop when currentRevision is found in defaultStatefulSetControl#getStatefulSetRevisions
2019-07-15 12:37:23 -07:00
Joseph Burnett
7382fa464d Add josephburnett to podautoscaler OWNERS. 2019-07-12 10:20:16 +02:00
Kubernetes Prow Robot
642a06e552
Merge pull request #79554 from draveness/feature/remove-critical-pod-annotation
feat: cleanup pod critical pod annotations feature
2019-07-11 22:03:04 -07:00
Kubernetes Prow Robot
3dd8add5d2
Merge pull request #79549 from liggitt/admission-webhooks-v1
Promote admission webhook API to v1
2019-07-11 17:01:34 -07:00
Clayton Coleman
d631f9b7e9
Use metadata informers instead of dynamic informers in controller manager
All controllers in controller-manager that deal with objects generically
work with those objects without needing the full object. Update the GC
and quota controller to use PartialObjectMetadata input objects which
is faster and more efficient.
2019-07-11 12:18:52 -04:00
Clayton Coleman
637cc83341
Switch the garbage collector to use metadata client and protobuf 2019-07-11 12:18:51 -04:00
Kubernetes Prow Robot
b500c740ee
Merge pull request #79859 from sukeesh/hpa-error-log-fix
HPA incorrectly reported condition status
2019-07-11 07:28:55 -07:00
Shintaro Murakami
7c0b33e012 Add check to reduce orphaned volume 2019-07-11 16:31:56 +09:00
Kubernetes Prow Robot
ca6cc69bd4
Merge pull request #78744 from smarterclayton/client_ns
Update namespace controller to use the metadata client
2019-07-10 18:48:53 -07:00
draveness
b6d41ee5cc feat: cleanup pod critical pod annotations feature 2019-07-11 08:54:19 +08:00
Kubernetes Prow Robot
57eef32041
Merge pull request #79657 from josephburnett/hpastuck
Ignore unschedulable pods
2019-07-10 11:34:29 -07:00
Clayton Coleman
50fd47258d
Switch the namespace controller to use the metadata client
The metadata client uses protobuf and returns only a subset of object
data (the metadata) which allows operations that act only on objects
generically to work much faster. Use the metadata client in the
namespace controller to reduce the amount of work the namespace controller
has to do in large namespaces.
2019-07-10 14:31:18 -04:00
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
Kubernetes Prow Robot
abe94ce9b3
Merge pull request #79937 from mm4tt/deployment_improve
Deployment Controller - avoid unnecessary copying of pod objects in getPodMapForDeployment
2019-07-10 01:24:25 -07:00
Matt Matejczyk
8140bbc4f5 Deployment Controller - don't copy pods in getPodMapForDeployment
As the benchmark shows it speeds up the method~x4 and reduces memory
consumption ~x20.

```
benchmark                              old ns/op     new ns/op     delta
BenchmarkGetPodMapForDeployment-12     276121        72591         -73.71%

benchmark                              old allocs     new allocs     delta
BenchmarkGetPodMapForDeployment-12     241            238            -1.24%

benchmark                              old bytes     new bytes     delta
BenchmarkGetPodMapForDeployment-12     554025        28956         -94.77%
```
2019-07-10 09:14:15 +02:00
Kubernetes Prow Robot
dc8829df5c
Merge pull request #75922 from humblec/stateful_set
Remove unwanted `else` block from statefulset controller.
2019-07-10 00:12:25 -07:00
Kubernetes Prow Robot
d59a603f1b
Merge pull request #78267 from mucahitkurt/cleanup/operation-generator-migration-scenarios-unit-tests
unit tests for operationGenerator.GenerateUnmapVolumeFunc
2019-07-09 18:20:25 -07:00
Matt Matejczyk
3e363c5c46 Add micro-benchmark for DeploymentController.getPodMapForDeployment method 2019-07-09 15:00:18 +02:00
Kubernetes Prow Robot
2cfd4a5eb9
Merge pull request #79168 from tnozicka/fix-sigapps-owners
Update Sig-Apps OWNERS to aliases in places that were missed in #76669
2019-07-08 17:30:01 -07:00
Jordan Liggitt
e24377f190 Install/register v1 admission registration types 2019-07-08 09:49:29 -04:00
Sukeesh
44c3f0105f fix incorrect hpa status 2019-07-08 17:27:38 +09:00
Kubernetes Prow Robot
a33840e023
Merge pull request #73977 from khenidak/ipv6dualstack
ipv6 dual stack (Phase 1 - ALPHA)
2019-07-02 18:07:12 -07:00
Khaled Henidak(Kal)
2b77667718 vendor updates 2019-07-02 22:26:26 +00:00
Kubernetes Prow Robot
cf7662d3a1
Merge pull request #79035 from josephburnett/hparunaway
Fix HPA feedback from writing status.replicas to spec.replicas.
2019-07-02 09:31:08 -07:00
Khaled Henidak(Kal)
a51b8ce456 route controller + azure v6 routes 2019-07-02 15:39:06 +00:00
Khaled Henidak(Kal)
584d7103e2 node ipam controller for ipv6 dualstack 2019-07-02 15:39:06 +00:00
Joseph Burnett
39c4875321 There are various reasons that the HPA will decide not the change the
current scale. Two important ones are when missing metrics might
change the direction of scaling, and when the recommended scale is
within tolerance of the current scale.

The way that ReplicaCalculator signals it's desire to not change the
current scale is by returning the current scale. However the current
scale is from scale.Status.Replicas and can be larger than
scale.Spec.Replicas (e.g. during Deployment rollout with configured
surge). This causes a positive feedback loop because
scale.Status.Replicas is written back into scale.Spec.Replicas,
further increasing the current scale.

This PR fixes the feedback loop by plumbing the replica count from
spec through horizontal.go and replica_calculator.go so the calculator
can punt with the right value.
2019-07-02 14:21:32 +02:00
Kubernetes Prow Robot
f56b336976
Merge pull request #79592 from tedyu/ctrl-exp-mutex
Move population of expectedUIDs outside lock
2019-07-01 09:43:34 -07:00
Ted Yu
6db618fa42 Move population of expectedUIDs outside lock 2019-07-01 21:26:34 +08:00
Kubernetes Prow Robot
b22e48f240
Merge pull request #79584 from tedyu/pv-ctrl-bind-vol
Drop unnecessary claim parameter from PersistentVolumeController#updateBindVolumeToClaim
2019-07-01 06:09:33 -07:00
Kubernetes Prow Robot
d48f123a40
Merge pull request #79591 from tedyu/ctrl-util-label
Simplify the check of presence of labels in createPods
2019-07-01 01:45:19 -07:00
Ted Yu
69aeabc397 Simplify the check of presence of labels in createPods 2019-07-01 15:32:28 +08:00
Ted Yu
a18633427b Drop unnecessary claim parameter from PersistentVolumeController#updateBindVolumeToClaim 2019-07-01 13:30:11 +08:00
Kubernetes Prow Robot
8865cb3c24
Merge pull request #78853 from tcmichael/bugfix
Fix a bug that StatefulSet applies the revision incorrectly
2019-06-29 20:43:21 -07:00
kanchairen
bf421ae560 Fix a bug that StatefulSet applies the revision incorrectly 2019-06-30 09:49:00 +08:00