Commit graph

5055 commits

Author SHA1 Message Date
Kubernetes Prow Robot
1cb6d75f5e
Merge pull request #104512 from dntosas/automated-cherry-pick-of-#100720-upstream-release-1.19
Automated cherry pick of #100720: Fix buckets initialization
2021-09-10 11:07:23 -07:00
dntosas
6b51169005 Fix buckets initialization
This metrics is measured in seconds so it makes no sense starting from
1000 as init value. This breaks also the scheduler e2e metric thus make
users unable to compute, for example, their SLO for the scheduler.
Even if this metric is deprecated, it should behave correctly until it is
completely removed to avoid user confusion.

For example, for each volume created, the minimum value exposed
as a metric is 16.6min (1000sec/60) which is obviously wrong as logic.

In this commit, we migrate bucket creation to start from reasonable
numbers, copying the incrementation from the conventions that the
scheduler follows itself.

Signed-off-by: dntosas <ntosas@gmail.com>
2021-08-23 11:55:33 +03:00
Adhityaa Chandrasekar
ae5dbdba9e job controller: don't mutate shared cache object
Cherry pick of 0a21157c96
2021-08-04 18:56:28 +00:00
Jordan Liggitt
f9d896fa8b Fix race in attachdetach tests 2021-07-03 11:26:14 +02:00
Tim Ebert
e58f614f4b
Fix VolumeAttachment garbage collection for migrated PVs 2021-06-02 09:22:54 +02:00
Jiawei Wang
b51e0ad44b Use CSI driver to determine unique name for migrated in-tree plugins 2021-05-10 10:12:11 -07:00
Kubernetes Prow Robot
3f263e1b1e
Merge pull request #101764 from aojea/automated-cherry-pick-of-#101763-upstream-release-1.19
Automated cherry pick of #101763: Updating EndpointSlice controllers to avoid duplicate
2021-05-07 01:55:03 -07:00
Rob Scott
7b3b4fb805 Updating EndpointSlice controllers to avoid duplicate creations
This updates the StaleSlices() method in EndpointSliceTracker to also
ensure that the tracker does not have more slices than have been
provided.

Co-Authored-By: Swetha Repakula <srepakula@google.com>
2021-05-06 19:44:51 +02:00
andyzhangx
66a0b61664 fix: azure file namespace issue in csi translation
fix build failure

fix comments
2021-04-22 03:05:20 +00:00
Kubernetes Prow Robot
9011760751
Merge pull request #98732 from andyxning/automated-cherry-pick-of-#93457-origin-release-1.19
do not create StatefulSet pods when PVC is being deleted
2021-04-08 00:22:56 -07:00
Antonio Ojea
e743efc6af slice mirroring controller mirror annotations
Add support to the endpoint slice mirroring controller to mirror
annotations, in addition to labels, but don´t mirror endpoint
triggertime annotation.

Also, fix a bug in the endpointslice mirroring controller, that
wasn't updating the mirrored slice with the new labels, in case
that only the endpoint labels were modified.
2021-03-23 22:07:49 +01:00
Kubernetes Prow Robot
ef6e345286
Merge pull request #100114 from robscott/automated-cherry-pick-of-#99345-release-1.19
Automated cherry pick of #99345: Updating EndpointSlice controller to wait for cache to be
2021-03-12 12:49:03 -08:00
Rob Scott
7588eca27e
Updating EndpointSliceMirroring controller to wait for cache to be updated
This matches the recent updates to the EndpointSliceTracker for the
EndpointSlice controller in #99345 that accomplished the same thing.
2021-03-11 09:36:06 -08:00
Rob Scott
95ceaca482
Updating EndpointSlice controller to wait for cache to be updated
This updates the EndpointSlice controller to make use of the
EndpointSlice tracker to identify when expected changes are not present
in the cache yet. If this is detected, the controller will wait to sync
until all expected updates have been received. This should help avoid
race conditions that would result in duplicate EndpointSlices or failed
attempts to update stale EndpointSlices. To simplify this logic, this
also moves the EndpointSlice tracker from relying on resource versions
to generations.
2021-03-10 21:24:52 -08:00
Kubernetes Prow Robot
a0b74236a9
Merge pull request #98140 from CKchen0726/cherry-pick-96876-1.19
Cherry pick #96876 in controller to 1.19: fix nodelifecyle controller not add NoExecute taint bug
2021-03-05 12:47:42 -08:00
Morten Torkildsen
53b4c8095e Fix nil pointer dereference in disruption controller 2021-02-04 22:49:18 +02:00
ymmt
6770739604 do not create StatefulSet pods when PVC is being deleted
Pod with PVC will not be scheduled if the PVC is being deleted.
This can happen when the PVC has finalizers of storage plugins.

Such a pod becomes pending.  Unfortunately, after the finalizer
finishes and PVC is deleted, the pod remains pending forever.
The StatefulSet controller does nothing for this pending pod.

This commit prevents the StatefulSet controller from creating
such pods when PVC is to be deleted.
2021-02-04 03:17:56 +08:00
Vladimir Nachev
d4cc37c3e3
Fix build after cherry-picking 2021-01-30 22:40:09 +02:00
Jayasekhar Konduru
66cc4bb7ea
Recover CSI volumes from dangling attachments
Change-Id: I72105d67d8a4069ab19bfa4638a7ac365cf4194c
2021-01-30 22:37:17 +02:00
Cheng Xing
200c9b11d5
IsVolumeAttachedToNode() renamed to GetAttachState(), and returns 3 states instead of combining "uncertain" and "detached" into "false" 2021-01-30 22:36:32 +02:00
Cheng Xing
4db5b3476b
Fixes Attach Detach Controller reconciler race reading ActualStateOfWorld and operation pending states; fixes reconciler_test mock detach to account for multiple attaches on a node 2021-01-30 22:36:16 +02:00
Kubernetes Prow Robot
958c54ccab Merge pull request #96876 from howieyuen/no-execute-taint-missing
fix nodelifecyle controller not add NoExecute taint bug
2021-01-20 09:39:33 +08:00
Kubernetes Prow Robot
217fdf6b8c
Merge pull request #96801 from hvenev-vmware/automated-cherry-pick-of-#96417-upstream-release-1.19
Automated cherry pick of #96417: Fix double counting of IP addresses
2020-11-30 00:17:20 -08:00
Hristo Venev
d4bac6673f range_allocator: Test (lack of) double counting 2020-11-23 00:10:35 -08:00
Hristo Venev
9e4ac6493c cidrset: Add test for double counting 2020-11-23 00:10:35 -08:00
Hristo Venev
708da4b6dc Fix double counting of IP addresses
The range allocator in pkg/controller/nodeipam/ipam/range_allocator.go
may call Occupy() on the same range twice:

1. Just before subscribing to the NodeInformer
2. From a callback given to the NodeInformer soon after registration
2020-11-23 00:10:35 -08:00
Yecheng Fu
ec495b31c9 report UnschedulableAndUnresolvable status instead of an error when PVCs can't find bound persistent volumes
This is an user error. We should't report an error.
2020-11-06 09:53:50 +08:00
Kubernetes Prow Robot
af7dbedbd7
Merge pull request #95651 from josephburnett/automated-cherry-pick-of-#95560-upstream-release-1.19
Automated cherry pick of #95560: Ignore deleted pods.
2020-11-05 07:34:54 -08:00
Kubernetes Prow Robot
6f58365c04
Merge pull request #95829 from arjunrn/automated-cherry-pick-of-#95647-upstream-release-1.19
Automated cherry pick of #95647: If we set SelectPolicy MinPolicySelect on scaleUp behavior or
2020-11-05 06:00:54 -08:00
weiwei
a9dd8f363d If we set SelectPolicy MinPolicySelect on scaleUp behavior or scaleDown behavior,Horizontal Pod Autoscaler doesn`t automatically scale the number of pods correctly
Signed-off-by: weiwei <weiwei@tenxcloud.com>
2020-10-23 14:46:11 +02:00
ialidzhikov
0ca175143c Do not assume storageclass is still in-tree after csi migration
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-10-20 13:17:56 +03:00
Joseph Burnett
e57e401192 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-16 14:44:36 +02:00
Kubernetes Prow Robot
9db2c28d93
Merge pull request #94948 from robscott/automated-cherry-pick-of-#94730-upstream-release-1.19
Automated cherry pick of #94730: Ensuring EndpointSlices are recreated after Service
2020-10-07 06:40:56 -07:00
Rob Scott
aadbc3a9f6
Ensuring EndpointSlices are recreated after Service recreation
This fixes a bug that occurred when a Service was rapidly recreated.
This relied on an unfortunate series of events:

1. When the Service is deleted, the EndpointSlice controller removes it
from the EndpointSliceTracker along with any associated EndpointSlices.
2. When the Service is recreated, the EndpointSlice controller sees that
there are still appropriate EndpointSlices for the Service and does
nothing. (They have not yet been garbage collected).
3. When the EndpointSlice is deleted, the EndpointSlice controller
checks with the EndpointSliceTracker to see if it thinks we should have
this EndpointSlice. This check was intended to ensure we wouldn't
requeue a Service every time we delete an EndpointSlice for it.

This adds a check in reconciler to ensure that EndpointSlices it is
working with are owned by a Service with a matching UID. If not, it will
mark those EndpointSlices for deletion (assuming they're about to be
garbage collected anyway) and create new EndpointSlices.
2020-09-21 13:48:50 -07:00
Mike Dame
4e100b9512 Remove HeadlessService label in endpoints controller before comparing 2020-09-21 11:03:03 -04:00
Rob Scott
3c804502d7
Updating EndpointSliceMirroring controller to listen for Service changes
This fixes a bug that could occur if a custom Endpoints resource was
created before a Service was created.
2020-08-24 17:09:42 -07:00
Rob Scott
9180cf2346
Updating EndpointSlice controller to wait for all caches to be synced
Previously the EndpointSlice controller was not waiting for
EndpointSlices or Nodes to be synced.
2020-08-18 12:11:44 -07:00
Rob Scott
4cfe4403b4
Updating EndpointSlice controllers to return if error encountered
Previously the controllers would proceed with additional creates,
updates, or deletes if 1 failed. That could potentially result in
scenarios where an EndpointSlice create or update failing while a delete
worked. This updates the logic so that removals will not happen if
additions fail.
2020-08-12 09:58:03 -07:00
Kubernetes Prow Robot
15a3d46db1
Merge pull request #93030 from swetharepakula/endpoint-tracker
Requeue Service after Endpoint Deletion
2020-08-10 18:28:16 -07:00
Kubernetes Prow Robot
37cda82c35
Merge pull request #93722 from liggitt/taint-evict
Do not evict pods which tolerate all NoExecute taints
2020-08-09 20:42:19 -07:00
Jordan Liggitt
648c591fff Fix namespace controller cleanup orphaning 2020-08-07 13:26:28 -04:00
Kubernetes Prow Robot
f5334fad48
Merge pull request #93617 from liggitt/deflake-ds-test
Deflake TestExpectationsOnRecreate
2020-08-06 09:35:43 -07:00
Kubernetes Prow Robot
382107e6c8
Merge pull request #93441 from robscott/endpointslicemirroring-tracker-fix
Fixing memory leak in EndpointSliceMirroring EndpointSlice tracker
2020-08-05 11:54:28 -07:00
Swetha Repakula
23a3353a6a Requeue service after endpoint deletion
- ensure endpoints that have been deleted and are desired are recreated
 despite a possibly out of date endpoint cache
2020-08-05 11:50:23 -07:00
Jordan Liggitt
892bdf9a15 Do not evict pods which tolerate all NoExecute taints 2020-08-05 12:50:43 -04:00
Kubernetes Prow Robot
9d8a87b5c7
Merge pull request #93442 from robscott/endpointslicemirroring-labels
Updating EndpointSliceMirroring controller to copy labels from Endpoints
2020-08-04 01:14:19 -07:00
Rob Scott
52894d7bfb
Updating EndpointSliceMirroring controller to copy labels from Endpoints
The KEP specifies that the controller will "mirror all labels from the
Endpoints resource and all endpoints and ports from the corresponding subset".
I'd missed that in my initial implementation, this should fix that.
2020-08-03 14:12:30 -07:00
Jordan Liggitt
c4c946d35d Deflake TestControllerSync 2020-08-03 11:56:14 -04:00
Jordan Liggitt
8e6a8669c0 Deflake TestExpectationsOnRecreate 2020-07-31 18:12:01 -04:00
Jordan Liggitt
1420b377e4 Add providerless tags 2020-07-30 13:48:40 -04:00