Commit Graph

6009 Commits

Author SHA1 Message Date
Omer Tuchfeld
eb317ecd40 Fix capture loop vars in parallel or ginkgo tests
Fixes instances of #98213 (to ultimately complete #98213 linting is
required).

This commit fixes a few instances of a common mistake done when writing
parallel subtests or Ginkgo tests (basically any test in which the test
closure is dynamically created in a loop and the loop doesn't wait for
the test closure to complete).

I'm developing a very specific linter that detects this king of mistake
and these are the only violations of it it found in this repo (it's not
airtight so there may be more).

In the case of Ginkgo tests, without this fix, only the last entry in
the loop iteratee is actually tested. In the case of Parallel tests I
think it's the same problem but maybe a bit different, iiuc it depends
on the execution speed.

Waiting for the CI to confirm the tests are still passing, even after
this fix - since it's likely it's the first time those test cases are
executed - they may be buggy or testing code that is buggy.

Another instance of this is in `test/e2e/storage/csi_mock_volume.go` and
is still failing so it has been left out of this commit and will be
addressed in a separate one
2022-08-15 16:28:50 +02:00
Alexander Zielenski
063ef090e7
switch listeners to use a map, adapt tests 2022-08-08 14:01:10 -07:00
Uwe Krueger
92f04baac9
apply desired changes for handler registration 2022-08-08 14:01:09 -07:00
Uwe Krueger
7054ac16d4
rename handle to registration 2022-08-08 14:01:09 -07:00
Alexander Zielenski
7436af3302
support removal of event handlers from SharedIndexInformers
To be able to implement controllers that are dynamically deciding
on which resources to watch, it is required to get rid of
dedicated watches and event handlers again. This requires the
possibility to remove event handlers from SharedIndexInformers again.
Stopping an informer is not sufficient, because there might
be multiple controllers in a controller manager that independently
decide which resources to watch.

Unfortunately the ResourceEventHandler interface encourages to use
value objects for handlers (like the ResourceEventHandlerFuncs
struct, that uses value receivers to implement the interface).
Go does not support comparison of function pointers and therefore
the comparison of such structs is not possible, also. To be able
to remove all kinds of handlers and to solve the problem of
multi-registrations of handlers a registration handle is introduced.
It is returned when adding a handler and can later be used to remove
the registration again. This handle directly stores the created
listener to simplify the deletion.
2022-08-08 14:01:09 -07:00
Kubernetes Prow Robot
759785ea14
Merge pull request #109090 from sarveshr7/multicidr-rangeallocator
Enhance NodeIPAM to support multiple ClusterCIDRs
2022-08-07 15:40:18 -07:00
Sarvesh Rangnekar
5b801ba9f9 Introduce MultiCIDRRangeAllocator
MultiCIDRRangeAllocator is a new Range Allocator which makes using
multiple ClusterCIDRs possible. It consists of two controllers, one for
reconciling the ClusterCIDR API objects and the other for allocating
Pod CIDRs to the nodes.

The allocation is based on the rules defined in
https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2593-multiple-cluster-cidrs
2022-08-06 00:10:39 +00:00
Aldo Culquicondor
c1e0dac461 Fix deleting UIDs tracking expectations
Change-Id: I5dad644cf5cb232ebed0950a14b35a781a38eeb0
2022-08-05 12:37:31 -04:00
Sarvesh Rangnekar
02d944d046 Add a priority queue to implement MultiCIDR tie-breaks
The Priority is determined as follows:
P0: ClusterCIDR with higher number of matching labels has highest
priority.
P1: ClusterCIDR having cidrSet with fewer allocatable Pod CIDRs has
higher priority.
P2: ClusterCIDR with a PerNodeMaskSize having fewer IPs has higher
priority.
P3: ClusterCIDR having label with lower alphanumeric value has higher
priority.
P4: ClusterCIDR with a cidrSet having a smaller IP address value has
higher priority.
2022-08-05 01:06:43 +00:00
Sarvesh Rangnekar
b6392a4b07 Add cidrset to support multiple CIDRs
Add a new cidrset named `multicidrset` which extends the current
cidrset mechanism to track allocatable Pod and Service CIDRs.
multicidrset stores the info about allocated CIDRs in a Map as opposed
to the current cidrset implementation where it is stored in a bitmap.
2022-08-05 01:06:43 +00:00
Kubernetes Prow Robot
eefcf6aa80
Merge pull request #111113 from mimowo/retriable-pod-failures-job-controller
Support handling of pod failures with respect to the configured rules
2022-08-04 13:35:46 -07:00
Michal Wozniak
bf9ce70de3 Support handling of pod failures with respect to the specified rules 2022-08-04 18:39:08 +02:00
piroux
34b54e7646 Add struct keys in PV controller tests
Signed-off-by: piroux <pierre.roux01@gmail.com>
2022-08-04 17:01:36 +02:00
Jan Safranek
cdb3ead5a9 Add SupportsSELinuxContextMount
Add a new call to VolumePlugin interface and change all its
implementations.

Kubelet's VolumeManager will be interested whether a volume supports
mounting with -o conext=XYZ or not to hanle SetUp() / MountDevice()
accordingly.
2022-08-04 10:51:28 +02:00
lucming
a6f75d8ded code cleanup 2022-08-04 11:16:52 +08:00
Kubernetes Prow Robot
4b6134b6dc
Merge pull request #111090 from kinvolk/rata/userns-support-2022
Add support for user namespaces phase 1 (KEP 127)
2022-08-03 13:05:47 -07:00
Rodrigo Campos
d07c2688fe kubelet: add GetHostIDsForPod()
In future commits we will need this to set the user/group of supported
volumes of KEP 127 - Phase 1.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-08-03 19:53:22 +02:00
kerthcet
b4277e7ce4 Fix potential goroutine leakages in taint manager tests
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-08-04 00:00:48 +08:00
Kubernetes Prow Robot
cb41d5002c
Merge pull request #111061 from pacoxu/key-encipherment-optional
modify the signing/approving controller to tolerate either set of usages for kubelet client and serving certificates
2022-08-02 18:55:51 -07:00
Kubernetes Prow Robot
182e0989ec
Merge pull request #111646 from alculquicondor/fix_failed_suceeded
Fix JobTrackingWithFinalizers when a pod succeeds after the job fails
2022-08-02 17:45:52 -07:00
Aldo Culquicondor
ca8cebe5ba Fix JobTrackingWithFinalizers when a pod succeeds after the job fails
Change-Id: I3be351fb3b53216948a37b1d58224f8fbbf22b47
2022-08-02 19:33:06 -04:00
Kubernetes Prow Robot
90f9a52db6
Merge pull request #111467 from RomanBednar/retro-sc-assignment
Allow retroactive storage class assigment to PVCs
2022-08-02 15:05:57 -07:00
Paco Xu
e6176c28b7 modify the signing/approving controller to tolerate either set of usages for kubelet client and serving certificates
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-08-03 05:12:04 +08:00
Kubernetes Prow Robot
369a465fae
Merge pull request #111301 from mattcary/migration-feature
Upgrade CSIMigrationGCE feature gate to GA
2022-08-02 13:58:57 -07:00
Roman Bednar
2f533cd572 add tests for pv controller 2022-08-02 20:52:04 +02:00
Roman Bednar
a0a5aa3680 allow retroactive storage class assignment in pv controller 2022-08-02 20:52:04 +02:00
Matthew Cary
e5d387c5d6 Upgrade CSIMigrationGCE feature gate to GA
Change-Id: I620bc4913765c0d6562eb1008216a72e8b0a2970
2022-08-02 09:14:27 -07:00
Aldo Culquicondor
4188d9b646 Add worker to clean up stale DisruptionTarget condition
Change-Id: I907fbdf01e7ff08d823fb23aa168ff271d8ff1ee
2022-08-02 11:25:01 -04:00
Aldo Culquicondor
dad8454ebb Add clock interface to disruption controller
To be able to write more precise unit tests in the future

Change-Id: I8f45947dfacca501acd856849bd978fad0f735cd
2022-08-02 11:17:29 -04:00
ZhangKe10140699
186ddce07b Fix problem in updating VolumeAttached in node status 2022-08-02 19:01:57 +08:00
Michal Wozniak
04fcbd721c Introduction of a pod condition type indicating disruption. Its reason field indicates the reason:
- PreemptionByKubeScheduler (Pod preempted by kube-scheduler)
- DeletionByTaintManager (Pod deleted by taint manager due to NoExecute taint)
- EvictionByEvictionAPI (Pod evicted by Eviction API)
- DeletionByPodGC (an orphaned Pod deleted by PodGC)PreemptedByScheduler (Pod preempted by kube-scheduler)
2022-08-02 11:12:16 +02:00
Quan Tian
f40067a8cc Remove duplicate and unused index from PodIndexer
DaemonSetsController adds a "nodeName" index to PodIndexer, which is
redundant with the "spec.nodeName" index of NodeLifecycleController.
However, DaemonSetsController hasn't been using this index since #86730.
This patch removes the redundant and unused index to reduce memory and
CPU spent on it.

Signed-off-by: Quan Tian <qtian@vmware.com>
2022-08-02 10:53:54 +08:00
Kubernetes Prow Robot
1e18ff5b37
Merge pull request #111479 from wongma7/migrationawsga
Promote CSIMigrationAWS to GA
2022-08-01 13:18:29 -07:00
Kubernetes Prow Robot
42b6b2887c
Merge pull request #110888 from likakuli/feature_ignoreeventforgc
feat: ignore all event resource for gc
2022-08-01 12:10:28 -07:00
Brian Pursley
a29fb9abae Add logging for reconciler unit test 2022-07-30 10:33:27 -04:00
Matthew Wong
777f43062c Remove unit tests that set & test CSIMigrationAWS false since it's now locked to true 2022-07-29 13:52:06 -07:00
Jakub Przychodzeń
7dd4e89a99 Enable 'running_managed_controllers' for KCM nodeipam controller 2022-07-27 14:30:40 +00:00
Piotr Betkier
f428705ec6 Fix comment in HPA's scale event replicaChange
The field replicaChange in timestampedScaleEvent was wrongly described
as either positive or negative depending on the scale direction. In
fact the change is set as unsigned, positive or 0 even for downscales.
2022-07-27 15:28:09 +02:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Kubernetes Prow Robot
7156c96e5d
Merge pull request #111194 from ravisantoshgudimetla/promote-maxSurge-ga
Promote DS max surge to GA
2022-07-25 06:20:46 -07:00
Kubernetes Prow Robot
a6afdf45dd
Merge pull request #110359 from MadhavJivrajani/remove-api-call-under-lock
controller/nodelifecycle: Refactor to not make API calls under lock
2022-07-25 06:20:34 -07:00
Madhav Jivrajani
3c0bc26d90 controller/nodelifecycle: Refactor to not make API calls under lock
The evictorLock only protects zonePodEvictor and zoneNoExecuteTainter.
processTaintBaseEviction showed indications of increased lock contention
among goroutines (see issue 110341 for more details).

The refactor done is to ensure that all codepaths in that function that
hold the evictorLock AND make API calls under the lock, are now making
API calls outside the lock and the lock is held only for accessing either
zonePodEvictor or zoneNoExecuteTainter or both.

Two other places where the refactor was done is the doEvictionPass and
doNoExecuteTaintingPass functions which make multiple API calls under
the evictorLock.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2022-07-25 15:16:26 +05:30
BinacsLee
ae0c7b1ffb cleanup: use sets.Clone() to avoid interim slice 2022-07-21 20:21:01 +08:00
Michal Wozniak
2f61b6105c Add integration tests for podgc 2022-07-20 15:17:14 +02:00
Kubernetes Prow Robot
ddeb3ab90b
Merge pull request #111084 from mimowo/retriable-pod-failures-refactor-taint-mngr
Refactor taint_manager to do not use getPod and getNode stubs
2022-07-19 06:54:06 -07:00
Kubernetes Prow Robot
9cf4f15884
Merge pull request #110633 from wojtek-t/fix_leaking_goroutines_10
Fix leaking goroutines in multiple integration tests
2022-07-18 21:56:05 -07:00
Kubernetes Prow Robot
1c1efde70d
Merge pull request #109639 from Abirdcfly/fixduplicateimport
cleanup: remove all duplicate import
2022-07-18 16:55:23 -07:00
Ravi Gudimetla
7397c029e8 Promote DS MaxSurge to GA 2022-07-18 07:54:59 -04:00
lucming
fba637c33d code clean up 2022-07-18 16:06:20 +08:00
Kubernetes Prow Robot
3987c8ad91
Merge pull request #111134 from ldsdsy/modify1
Improve the accuracy of output msg in pkg/controller/endpoint/endpoints_controller.go
2022-07-17 23:51:15 -07:00
lucming
e536d565ea clean up code 2022-07-15 20:22:37 +08:00
PingWang
565d60ff15 HandleError of updateStatusIfNeeded in func reconcileAutoscaler
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2022-07-15 14:12:13 +08:00
Kubernetes Prow Robot
e5f4f8d71b
Merge pull request #110896 from ravisantoshgudimetla/promote-minReadySec-sts-update-ga
Promote minReadySeconds to GA
2022-07-14 09:45:09 -07:00
Michal Wozniak
4ec8cf08da This PR refactors taint_manager to eliminate the getPod and getNode stubs. 2022-07-14 18:00:44 +02:00
Kubernetes Prow Robot
27110bd821
Merge pull request #111070 from mimowo/retriable-pod-failures-refactor-gc-controller
Refactor gc_controller to do not use the deletePod stub
2022-07-14 06:11:09 -07:00
Wojciech Tyczyński
13e4f2b554 Clean shutdown of volume integration tests 2022-07-14 11:25:57 +02:00
ldsdsy
eacddf9f28 Optimising print information 2022-07-14 15:03:03 +08:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Ravi Gudimetla
9144250a92 Promote minReadySeconds to GA 2022-07-13 11:37:10 -04:00
Michal Wozniak
778b8300bc fix nits 2022-07-12 10:16:00 +02:00
Michal Wozniak
2730d285cf do not store context 2022-07-12 10:13:47 +02:00
Michal Wozniak
4a3d51359a Refact GC controller to do not use stub deletePod 2022-07-12 10:13:47 +02:00
Andy Goldstein
a899441484
quota: add an update filter
Fix a TODO to plumb an update filter from above in the resource quota
monitor code that was handling update events for quota-able objects,
instead of hard-coding the logic in the resource quota monitor.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-07-08 18:39:55 -04:00
Aldo Culquicondor
b492f49c9f Do not skip job requeue in conflict error
Change-Id: Ie97977887a1cc3de58922d73dce92ae1965965bf
2022-07-08 16:14:32 +00:00
Kubernetes Prow Robot
b3be343bc8
Merge pull request #110811 from Abirdcfly/clock
Update golangci-lint to 1.46.2 and fix errors
2022-07-06 16:03:32 -07:00
likakuli
74a3b8f4a9 feat: fix a bug thaat not all event be ignored by gc controller
Signed-off-by: likakuli <1154584512@qq.com>
2022-07-04 18:00:54 +08:00
0xff-dev
0a77a9122f convert int32 to pointer using library function 2022-07-01 14:58:26 +08:00
Harsha Narayana
c3cbc443ef
structured-logging: replace KObjs with KObjSlice for logging 2022-07-01 09:52:07 +05:30
Abirdcfly
2bca77a3d9 Update golangci-lint to 1.46.2 and fix errors
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-29 17:42:46 +08:00
Kubernetes Prow Robot
7f920da442
Merge pull request #110827 from Abirdcfly/simple2
cleanup:use append other than for loop
2022-06-28 19:58:15 -07:00
Kubernetes Prow Robot
6269784cd0
Merge pull request #109250 from d-honeybadger/fix-cronjob-scheduling-every-syntax
Fix requeueing of cronjobs with every-style schedule
2022-06-28 04:37:57 -07:00
Abirdcfly
8e9a896483
cleanup:use append other than for loop
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-28 16:31:59 +08:00
Kubernetes Prow Robot
aefb71d7ef
Merge pull request #110721 from jsafrane/fix-force-detach
Don't force detach volume from healthy nodes
2022-06-27 07:49:12 -07:00
Kubernetes Prow Robot
11686e1386
Merge pull request #110771 from alculquicondor/increase_timeout
Wait for cache sync in TestSyncPastDeadlineJobFinished
2022-06-24 13:28:59 -07:00
Aldo Culquicondor
62a25920e6 Wait for cache sync in TestSyncPastDeadlineJobFinished
Change-Id: I6f023ca6999108f4f86a0f57831d47704cdbb42b
2022-06-24 09:22:59 -04:00
Jan Safranek
3b94ac228a Don't force detach volume from healthy nodes
6 minute force-deatch timeout should be used only for nodes that are not
healthy. 

In case a CSI driver is being upgraded or it's simply slow, NodeUnstage
can take more than 6 minutes. In that case, Pod is already deleted from the
API server and thus A/D controller will force-detach a mounted volume,
possibly corrupting the volume and breaking CSI - a CSI driver expects
NodeUnstage to succeed before Kubernetes can call ControllerUnpublish.
2022-06-24 12:51:41 +02:00
Kubernetes Prow Robot
ae3537120b
Merge pull request #110639 from aojea/slice_no_node
EndpointSlice with Pods without an existing Node
2022-06-22 10:43:42 -07:00
Kubernetes Prow Robot
b60978629d
Merge pull request #110700 from alculquicondor/increase_timeout
Increase timeout for TestSyncPastDeadlineJobFinished
2022-06-22 08:23:56 -07:00
Kubernetes Prow Robot
18b5efceda
Merge pull request #110410 from Jiawei0227/master
CSIMigration feature gate to GA
2022-06-22 04:05:48 -07:00
Antonio Ojea
b8ba6ab005 endpointslices: node missing on Pod scenario
When a Pod is referencing a Node that doesn't exist on the local
informer cache, the current behavior was to return an error to
retry later and stop processing.
However, this can cause scenarios that a missing node leaves a
Slice stuck, it can no reflect other changes, or be created.
Also, this doesn't respect the publishNotReadyAddresses options
on Services, that considers ok to publish pod Addresses that are
known to not be ready.

The new behavior keeps retrying the problematic Service, but it
keeps processing the updates, reflacting current state on the
EndpointSlice. If the publishNotReadyAddresses is set, a missing
node on a Pod is not treated as an error.
2022-06-22 09:45:16 +02:00
Antonio Ojea
baecb1981e fix metrics for placeholder slice
There is always a placeholder slice.

The ServicePortCache logic was considering always one endpointSlice
per Endpoint, but if there are multiple empty Endpoints, we just
use one placeholder slice, not multiple placeholder slices.
2022-06-22 09:45:02 +02:00
Antonio Ojea
0d9689a55d fix a bug on endpointslices tests comparing the wrong metrics 2022-06-22 09:40:18 +02:00
Aldo Culquicondor
817c8bbf59 Increase timeout for TestSyncPastDeadlineJobFinished
To mitigate flakiness

Change-Id: I1d0286d16d2b7dd3a605690e9a2d4d2f954701ff
2022-06-21 14:49:10 -04:00
lokichoggio
a86f1672c3
code optimization 2022-06-21 23:36:07 +08:00
Kubernetes Prow Robot
375fd32b9f
Merge pull request #109957 from adammw/adammw/disruption-implements-scale
disruptioncontroller: check for scale subresource correctly
2022-06-21 08:00:26 -07:00
Adam Malcontenti-Wilson
af3594dfa5 disruptioncontroller: check for scale subresource correctly 2022-06-15 08:52:47 +10:00
Kubernetes Prow Robot
10066243df
Merge pull request #110365 from spencerhance/epslice-recycle-bug
Fix unnecessary recreation of placeholder EndpointSlice
2022-06-14 13:15:34 -07:00
Spencer Hance
5f8dc48fbe Fix unnecessary recreation of placeholder EndpointSlice
Fixes Issue 108231 by checking `slicesToDelete` in the EndpointSlice
reconciler for a pre-existing placeholder slice.

Also adds a helper function for comparing the slices.
2022-06-14 09:24:38 -07:00
Kubernetes Prow Robot
5503bb0570
Merge pull request #110529 from wojtek-t/fix_leaking_goroutines_7
Fix leaking goroutines in multiple integration tests
2022-06-14 09:09:54 -07:00
Wojciech Tyczyński
8a87681a39 Clean shutdown of resourcequota integration tests 2022-06-14 13:55:31 +02:00
Harsha Narayana
eea7dca085
GIT-110239: fix activeDeadlineSeconds enforcement bug
GIT-110239: add additional tests with preset Status.StartTime

GIT-110239: add additional tests with preset Status.StartTime
2022-06-13 20:06:44 +05:30
Wojciech Tyczyński
32cbd77121 Clean shutdown of garbagecollector integration tests 2022-06-13 00:14:19 +02:00
ZhangYu
0be333dd7d modify incorrect words 2022-06-10 09:18:42 +08:00
Kubernetes Prow Robot
6cd258f9f5
Merge pull request #110292 from mimowo/109904-avoid-duplicate-conditions
Avoid duplicate Failed conditions in job status
2022-06-09 14:01:45 -07:00
Kubernetes Prow Robot
e8d6b76f8b
Merge pull request #109624 from aryan9600/fix-endpointslice-deletion
Ignore EndpointSlices that are marked for deletion
2022-06-09 00:11:42 -07:00
Kubernetes Prow Robot
39b6e6c6a0
Merge pull request #110362 from wojtek-t/fix_leaking_goroutines_5
Fix leaking goroutines in multiple integration tests
2022-06-07 08:44:55 -07:00
Jiawei Wang
760365d5c9 CSIMigration feature gate to GA 2022-06-06 21:19:19 +00:00
Wojciech Tyczyński
006ff4510b Clean shutdown of nodecontroller integration tests 2022-06-06 20:33:20 +02:00
Sanskar Jaiswal
4314e58ae5 move the ignore logic higher up to the reconciler
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-06 09:49:57 +05:30
Wojciech Tyczyński
d9d46d5326 Clean shutdown of certificates integration tests 2022-06-02 21:02:04 +02:00
Wojciech Tyczyński
783da34f54 Clean shutdown of disruption integration tests 2022-06-02 21:02:04 +02:00
Kubernetes Prow Robot
9f82d81e55
Merge pull request #110286 from FillZpp/add-test-for-statefulset-maxunavailable
A calculation function for StatefulSet maxUnavailable and some tests for it
2022-06-02 10:46:07 -07:00
Kubernetes Prow Robot
03d0e2c338
Merge pull request #110264 from wojtek-t/fix_leaking_goroutines_4
Fix leaking goroutines in multiple integration tests
2022-06-02 03:59:47 -07:00
Kubernetes Prow Robot
22fda4e7ee
Merge pull request #108232 from qmloong/qmloong/chore
fix: remove the redundant count variable
2022-06-01 10:53:40 -07:00
Michal Wozniak
e298649b6c Avoid duplicate conditions by updating the pre-existing failed condition
in case its status is False or Unknown.

In case the status of the pre-existing condition is true we ignore the new
condition. If there is no pre-existing failed condition, then append
the new failed condition as before.

Also, make the condition comparisons less hacky by ignoring timestamp fields
in tests.
2022-06-01 19:32:53 +02:00
FillZpp
1818a9a36a A calculation function for StatefulSet maxUnavailable and some tests for it
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2022-05-31 16:45:19 +08:00
Wojciech Tyczyński
c20f7cc4e1 Clean shutdown of endpoints/endpointslice integration tests 2022-05-30 20:17:35 +02:00
Kubernetes Prow Robot
8b6dd065d7
Merge pull request #110255 from robscott/fix-pod-eviction-ip
Endpoints and EndpointSlices should not publish IPs for terminal pods
2022-05-27 16:24:42 -07:00
Rob Scott
aa02b7a434
Updating e2e test to check EndpointSlices and Endpoints as well 2022-05-27 21:10:59 +00:00
Kubernetes Prow Robot
ad06854e5e
Merge pull request #110228 from mysunshine92/HPA-log-optimization
Error message optimization for podautoscaler controller
2022-05-27 05:13:18 -07:00
Antonio Ojea
aa35f6f160 endpoints controller: don't consider terminal endpoints
Terminal pods, whose phase its Failed or Succeeded, are guaranteed
to never regress and to be stopped, so their IPs never should
be published on the Endpoints.
2022-05-27 06:42:58 +02:00
Antonio Ojea
b905c2870b endpointslices: terminal pods doesn't receive enpoints 2022-05-27 06:42:52 +02:00
wangyamei
187dcb5a59 Error message optimization for podautoscaler controller 2022-05-26 23:40:34 +08:00
lokichoggio
57d1c2d5cd
complete doc 2022-05-24 11:26:15 +08:00
Kubernetes Prow Robot
fbb5717279
Merge pull request #110069 from FillZpp/fix-statefulset-maxunavailable-less-than-one
Fix maxUnavailable of StatefulSet should not less than 1
2022-05-20 16:50:12 -07:00
Wojciech Tyczyński
11b679c66a Fix event broadcaster shutdown in multiple controllers 2022-05-17 22:14:19 +02:00
FillZpp
85e3194cf6 Fix maxUnavailable of StatefulSet should not less than 1
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2022-05-16 16:58:19 +08:00
Kubernetes Prow Robot
b91c5263f5
Merge pull request #109947 from alculquicondor/fix-job-orphan-pod-ut
Wait for cache to sync in job's TestWatchOrphanPods
2022-05-11 10:47:13 -07:00
Kubernetes Prow Robot
b74d023e70
Merge pull request #109694 from RyanAoh/fix-108837
Be sure to update the status of StatefulSet even if the new replica creation fails
2022-05-10 21:28:50 -07:00
Aldo Culquicondor
a5f5eab5fd Wait for cache to sync in job's TestWatchOrphanPods
Otherwise the event handler might not be called.

Change-Id: I23c93c2251b411430a0f2469686db6355d84af2f
2022-05-10 14:18:21 -04:00
Aohan Yang
774df1b0af Be sure to update the status of StatefulSet even if the new replica creation fails 2022-05-10 10:25:26 +08:00
Kubernetes Prow Robot
fcffb6de7e
Merge pull request #108089 from mysunshine92/nodeController-20220212
fix typo for nodelifecycle controller
2022-05-07 03:33:18 -07:00
Marcel Zięba
47257b7613 Reduce number of buckets in ttl controller for 2k+ nodes clusters 2022-05-05 12:26:36 +00:00
Kubernetes Prow Robot
7adb7c1d06
Merge pull request #109612 from pandaamanda/remove_DeprecatedControllerOptions
refactor: remove deprecated `deleting-pods-qps` `deleting-pods-burst` `register-retry-count`  flags
2022-05-04 02:34:54 -07:00
Kubernetes Prow Robot
63a618a815
Merge pull request #109486 from alculquicondor/job-backofflimit
Fix job tracking leaving pods with finalizers
2022-05-04 01:28:14 -07:00
Tom Kerkhove
77efbc411a
feat: Provide previous replica count for deployment/replica set scale up/down event (#101142)
* feat: Provide previous replica count for deployment/replica set scale up/down event

Signed-off-by: GitHub <noreply@github.com>

* change format of event

Co-authored-by: Maciej Szulik <soltysh@gmail.com>

Co-authored-by: Maciej Szulik <soltysh@gmail.com>
2022-05-03 17:16:59 -07:00
Sanskar Jaiswal
7d8048dd59 Ignore EndpointSlices that are already marked for deletion
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-04-23 01:32:32 +05:30
熊中谅10171568
c4579165f1 refactor: remove deprecated flags
refactor: remove deprecated deleting-pods-qps deleting-pods-burst register-retry-count flags
2022-04-22 20:28:12 +08:00
Aldo Culquicondor
09caa36718 Fix removing finalizer from finished jobs
In some rare race conditions, the job controller might create new pods after the job is declared finished.

Change-Id: I8a00429c8845463259cd7f82bb3c241d0011583c
2022-04-20 16:39:10 -04:00
Aldo Culquicondor
53aa05df3a Don't mark job as failed until expectations are satisfied
Change-Id: I99206f35f6f145054c005ab362c792e71b9b15f4
2022-04-20 16:39:10 -04:00
Deepak Kinni
a7b1fcba40 Add or Remove PV deletion protection finalizer considering the recalimPolicy
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
2022-04-07 00:48:35 +05:30
Jordan Liggitt
495b01ef6c Move cron job feature gate to correct file 2022-04-03 22:56:01 -04:00
d-honeybadger
7ae21b9849 cronjob_controllerv2: fix requeueing of cronjobs with every-style schedule 2022-04-01 20:14:23 -04:00
SataQiu
9ac1b4b68f remove unused option deployment-controller-sync-period for deployment controller 2022-03-30 20:00:53 +08:00
Kubernetes Prow Robot
1266744002
Merge pull request #108693 from gnufied/enable-rwx-call-all-nodes
Enable node-expansion to be called on all nodes for RWX volumes
2022-03-29 17:35:05 -07:00
Kubernetes Prow Robot
0f2300575c
Merge pull request #108032 from deejross/kep3140-cronjob-timezone
KEP 3140: TimeZone support for CronJob
2022-03-29 17:34:20 -07:00
Ross Peoples
dbb3906a09 Fix for timeZone validation and strategy 2022-03-29 11:40:34 -05:00
Aldo Culquicondor
8c00f510ef Graduate JobReadyPods to beta
Set podUpdateBatchPeriod to 1s

Change-Id: I8a10fd8f8559adad9df179b664b8c82851607855
2022-03-29 10:07:41 -04:00
Ross Peoples
f3b928a23d Import tzdata in apiserver, CronJob.timeZone fixes 2022-03-28 16:33:05 -05:00
Ross Peoples
98837de446 TimeZone support for CronJobs 2022-03-28 16:33:00 -05:00
Mayank Kumar
2733b66e80 add maxUnavailable implementation and UT 2022-03-28 11:01:05 -07:00
Hemant Kumar
a99466ca86 check existing size before querying new size from api-server 2022-03-28 11:32:49 -04:00
Hemant Kumar
ed217f4140 rename SetVolumeSize to InitializeVolumeSize 2022-03-28 11:32:49 -04:00
Hemant Kumar
7a43406138 Do not update PVC if it already has updated size 2022-03-28 11:32:49 -04:00
Hemant Kumar
e4f62d6c41 Modify code to use new interface functions 2022-03-28 11:32:49 -04:00
Olivier Michaelis
3c07d3a20c
Fix replica calculation at start of HPA scaling policy period
When calculating the scale-up/scale-down limit, the number of replicas
at the start of the scaling policy period is calculated correctly by
taken into account the number of scaled-up and scaled-down replicas.

Signed-off-by: Olivier Michaelis <38879457+oliviermichaelis@users.noreply.github.com>
2022-03-27 12:34:32 +02:00
Kubernetes Prow Robot
25957117c2
Merge pull request #108443 from Monokaix/remove-redundant-SetNamespace-for-pvc
Test: remove redundant SetNamespace() for pvc
2022-03-26 11:45:40 -07:00
Kubernetes Prow Robot
c3e3f6cd4d
Merge pull request #107241 from houjun41544/20211228-ds
pointer usage error
2022-03-26 11:45:33 -07:00
Kubernetes Prow Robot
13ebb2e757
Merge pull request #99488 from chymy/rc-test-bug
Fix pkg/controller/replicaset/replica_set_test.go variable reference error
2022-03-26 11:45:21 -07:00
Kubernetes Prow Robot
83988399e8
Merge pull request #106109 from h4ghhh/sts_klog_InfoS
Migrate statefulset files to structured logging
2022-03-26 10:37:20 -07:00
Ashutosh Kumar
c00975370a
Handle Non-graceful Node Shutdown (#108486)
Signed-off-by: Ashutosh Kumar <sonasingh46@gmail.com>

Co-authored-by: Ashutosh Kumar <sonasingh46@gmail.com>

Co-authored-by: xing-yang <xingyang105@gmail.com>
2022-03-26 09:23:21 -07:00
Kubernetes Prow Robot
78889cd1bb
Merge pull request #109035 from deepakkinni/enable_def_v1
Default enable flag for beta feature HonorPVReclaimPolicy
2022-03-26 08:03:21 -07:00
Kubernetes Prow Robot
0b79a791ed
Merge pull request #107180 from ardaguclu/remove-deprecated-serverresource
Remove deprecated discovery/ServerResources function
2022-03-25 23:45:21 -07:00
Deepak Kinni
836ace46a0 Default enable flag for beta feature HonorPVReclaimPolicy
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
2022-03-26 06:48:28 +05:30
Aldo Culquicondor
8776931abb Remove finalizer when orphaned
Change-Id: Id88a28755660812a274dffab2693cb8a0ef4235c
2022-03-24 11:57:51 -04:00
Aldo Culquicondor
211e33d93f Fix: Clean job tracking finalizer from orphan pods
Change-Id: I04cd70725fd1830be8daf2dca53f67bc10a379b7
2022-03-24 11:57:51 -04:00
Kubernetes Prow Robot
4e8b2ff023
Merge pull request #106844 from atiratree/gc_metrics
add gc metrics and collect sync errors
2022-03-24 04:40:42 -07:00
Kubernetes Prow Robot
f97825e1ce
Merge pull request #107395 from alculquicondor/indexed-job
Graduate IndexedJob to stable
2022-03-23 17:44:41 -07:00
Kubernetes Prow Robot
2d46f1bc30
Merge pull request #103062 from ikeeip/component_helper_storage
Move volume helpers to "k8s.io/component-helpers/storage/volume".
2022-03-23 13:21:20 -07:00
Kubernetes Prow Robot
14e8db067e
Merge pull request #108191 from ravisantoshgudimetla/wire-cert-contexts
Wire cert contexts
2022-03-23 11:20:17 -07:00
Ryan Richard
e29ac0f8be Promote CertificateSigningRequest's Spec.ExpirationSeconds field to GA
Remove the comment "As of v1.22, this field is beta and is controlled
via the CSRDuration feature gate" from the expirationSeconds field's
godoc.

Mark the "CSRDuration" feature gate as GA in 1.24, lock its value to
"true", and remove the various logic which handled when the gate was
"false".

Update conformance test to check that the CertificateSigningRequest's
Spec.ExpirationSeconds field is stored, but do not check if the field
is honored since this functionality is optional.
2022-03-18 14:41:43 -07:00
Kubernetes Prow Robot
f979b4094e
Merge pull request #99292 from yangjunmyfm192085/run-test23
replace all occurrences of "node", nodeName to "node", klog.KRef("", nodeName)
2022-03-17 12:22:42 -07:00
Konstantin Misyutin
438d224f0e Cleanup k8s.io/component-helpers/storage/volume package
Signed-off-by: Konstantin Misyutin <konstantin.misyutin@huawei.com>
2022-03-16 15:43:09 +08:00
Konstantin Misyutin
4ba98a8610 cleanup: remove unnecessary import aliases 2022-03-16 15:43:09 +08:00
Konstantin Misyutin
1d7cefe9c4 Move volume helpers to "k8s.io/component-helpers/storage/volume".
This patch aims to simplify decoupling "pkg/scheduler/framework/plugins"
from internal "k8s.io/kubernetes" packages. More described in
issue #89930 and PR #102953.

Some helpers from "k8s.io/kubernetes/pkg/controller/volume/persistentvolume"
package moved to "k8s.io/component-helpers/storage/volume" package:

- IsDelayBindingMode
- GetBindVolumeToClaim
- IsVolumeBoundToClaim
- FindMatchingVolume
- CheckVolumeModeMismatches
- CheckAccessModes
- GetVolumeNodeAffinity

Also "CheckNodeAffinity" from "k8s.io/kubernetes/pkg/volume/util"
package moved to "k8s.io/component-helpers/storage/volume" package
to prevent diamond dependency conflict.

Signed-off-by: Konstantin Misyutin <konstantin.misyutin@huawei.com>
2022-03-16 15:43:09 +08:00
Aldo Culquicondor
2c5d0a273c Graduate IndexedJob to stable
- Lock feature gate to true and schedule for deletion in 1.26
- Remove checks on feature gate
- Graduate E2E test to Conformance

Change-Id: I6814819d318edaed5c86dae4055f4b050a4d39fd
2022-03-15 13:41:06 -04:00
Kubernetes Prow Robot
02b1ec5b0b
Merge pull request #108485 from BigDarkClown/master
Make daemon.NodeShouldRunDaemonPod function public
2022-03-15 00:30:21 -07:00
Deepak Kinni
d37f14d0ae Support for in-tree PV Deletion protection finalizer
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
2022-03-10 21:37:43 -08:00
Bartłomiej Wróblewski
b2e2fb8d89 Make daemon.NodeShouldRunDaemonPod function public 2022-03-08 11:32:17 +00:00
Kubernetes Prow Robot
34a6a7ca11
Merge pull request #108316 from hyschumi/fix_unnecessary_handlecrash
endpointslice: remove unnecessary HandleCrash
2022-03-07 18:20:34 -08:00
Ravi Gudimetla
72a62f47f7 Wire context for cert controllers
All the controllers should use context for signalling termination of communication with API server. Once kcm cancels context all the cert controllers which are started via kcm should cancel the APIServer request in flight instead of hanging around.
2022-03-07 10:19:45 -05:00
Kubernetes Prow Robot
da23196df6
Merge pull request #108450 from tnqn/stop-setting-rv-in-endpoints
Stop publishing Pod ResourceVersion in Endpoints and EndpointSlice API
2022-03-04 17:23:04 -08:00
Kubernetes Prow Robot
88f9728339
Merge pull request #108309 from zshihang/token
no auto-generation of secret-based service account token
2022-03-02 06:19:15 -08:00
Quan Tian
906e6d4670 Stop publishing Pod ResourceVersion in Endpoints and EndpointSlice API
The field is not used anywhere and its value may be stale as Endpoints
and EndpointSlice won't be updated if there is only Pod ResourceVersion
change..
2022-03-02 22:12:35 +08:00
Kubernetes Prow Robot
0dc83fe696
Merge pull request #108078 from tnqn/endpoints-resync
Skip updating Endpoints if no relevant fields change
2022-03-01 23:23:13 -08:00
XuzhengChang
d1ea5d07a9 Test: remove redundant SetNamespace() for pvc 2022-03-02 14:10:46 +08:00
Kubernetes Prow Robot
66daef4aa7
Merge pull request #108167 from jfremy/fix-107973
Fix nodes volumesAttached status not being updated
2022-03-01 12:49:54 -08:00
wangyamei
3808e193d9 fix typo for nodelifecycle controller 2022-02-28 14:30:28 +08:00
Kubernetes Prow Robot
06e107081e
Merge pull request #104732 from mengjiao-liu/remove-flag-experimental-check-node-capabilities-before-mount
kubelet: Remove the deprecated flag `--experimental-check-node-capabilities-before-mount`
2022-02-24 07:56:30 -08:00
hyschumi
d8536122b9 endpointslice: remove unnecessary HandleCrash 2022-02-24 09:59:09 +08:00
Shihang Zhang
fb6c727fde no auto-generation of secret-based service account token 2022-02-23 14:17:30 -08:00
Kubernetes Prow Robot
343125cc6c
Merge pull request #107997 from d-honeybadger/fix-tracking-cronjob-owned-jobs
Fix cronjob status reconciliation when job template labels change
2022-02-23 07:14:18 -08:00
d-honeybadger
fb094dc44e cronjob_controllerv2: do not filter jobs to be reconciled by labels 2022-02-23 09:10:33 -05:00
Jean-Francois Remy
e83184568d Add unit tests
- actual_state_of_world_test.go: test the new method GetVolumesToReportAttachedForNode
  for an existing node and a non-existing node
- node_status_updater_test.go: test UpdateNodeStatuses and UpdateNodeStatuses in nominal
  case with 2 nodes getting one volume each. Test UpdateNodeStatuses with the first call
  to node.patch failing but the following one succeeding
- add comment in node_status_updater.go
- fix log line in reconciler.go
- rename variable in actual_state_of_world.go
2022-02-22 12:21:58 -08:00
Jean-Francois Remy
f1717baaaa Fix nodes volumesAttached status not updated
The UpdateNodeStatuses code stops too early in case there is
an error when calling updateNodeStatus. It will return immediately
which means any remaining node won't have its update status put back
to true.

Looking at the call sites for UpdateNodeStatuses, it appears this is
not the only issue. If the lister call fails with anything but a Not Found
error, it's silently ignored which is wrong in the detach path.
Also the reconciler detach path calls UpdateNodeStatuses but the real intent
is to only update the node currently processed in the loop and not proceed
with the detach call if there is an error updating that specifi node volumesAttached
property. With the current implementation, it will not proceed if there is
an error updating another node (which is not completely bad but not ideal) and
worse it will proceed if there is a lister error on that node which means the
node volumesAttached property won't have been updated.

To fix those issues, introduce the following changes:
- [node_status_updater] introduce UpdateNodeStatusForNode which does what
  UpdateNodeStatuses does but only for the provided node
- [node_status_updater] if the node lister call fails for anything but a Not
  Found error, we will return an error, not ignore it
- [node_status_updater] if the update of a node volumesAttached properties fails
  we continue processing the other nodes
- [actual_state_of_world] introduce GetVolumesToReportAttachedForNode which
  does what GetVolumesToReportAttached but for the node whose name is provided
  it returns a bool which indicates if the node in question needs an update as
  well as the volumesAttached list. It is used by UpdateNodeStatusForNode
- [actual_state_of_world] use write lock in updateNodeStatusUpdateNeeded, we're
  modifying the map content
- [reconciler] use UpdateNodeStatusForNode in the detach loop
2022-02-22 12:20:53 -08:00
menglong.qi
a1269198ec fix: remove the redundant count variable 2022-02-21 00:32:21 +08:00
Quan Tian
38966453ce Skip updating Endpoints and EndpointSlice if no relevant fields change
When comparing EndpointSubsets and Endpoints, we ignore the difference
in ResourceVersion of Pod to avoid unnecessary updates caused by Pod
updates that we don't care, e.g. annotation update.

Otherwise periodic Service resync would intensively update Endpoints or
EndpointSlice whose Pods have irrelevant change between two resyncs,
leading to delay in processing newly created Services. In a scale
cluster with thousands of such Endpoints, we observed 2 minutes of
delay when the resync happens.
2022-02-18 20:47:27 +08:00
Kubernetes Prow Robot
8a6439d2b1
Merge pull request #108129 from ahg-g/ahg-suspend
Graduate SuspendJob to GA
2022-02-17 19:36:23 -08:00
Abdullah Gharaibeh
b2d2ec9e76 Graduate SuspendJob to GA 2022-02-15 10:46:13 -05:00
Quan Tian
5bd9892c94 Fix incorrect parameters in EndpointsEqualBeyondHash 2022-02-15 21:30:28 +08:00
Kubernetes Prow Robot
dea5589b1b
Merge pull request #107701 from kinderyj/perf/new-logic-optimiz-for-DetermineVolumeAction
perf:logic-optimiz-for-DetermineVolumeAction
2022-02-14 10:59:45 -08:00
Antonio Ojea
60502c9b32 endpointslice: don't try to update topology cache if node informer error 2022-02-11 12:14:01 +01:00
Kubernetes Prow Robot
49dc226381
Merge pull request #108020 from tossmilestone/remove-tolerate-unready-ep-annotation
Remove tolerate-unready-endpoints annotation
2022-02-11 01:40:04 -08:00
Kubernetes Prow Robot
973e77ceb1
Merge pull request #102330 from tnqn/replicaset-optimization
Add controllerUID index to improve ReplicaSetController performance
2022-02-10 10:15:46 -08:00
Kubernetes Prow Robot
dd3a30fdbb
Merge pull request #106398 from shawnhanx/controller_utils
should omit comparison to bool constant in pkg/controller/controller_utils.go
2022-02-10 07:17:46 -08:00
He Xiaoxi
ae9f117387 Remove tolerate-unready-endpoints annotation
Remove `tolerate-unready-endpoints` annotation in Service deprecated

from 1.11, use `Service.spec.publishNotReadyAddresses` instead.

Signed-off-by: He Xiaoxi <tossmilestone@gmail.com>
2022-02-09 17:17:29 +08:00
atiratree
2fc401d0a2 add gc metrics and collect sync errors 2022-02-04 20:21:30 +01:00
ravisantoshgudimetla
65ff81757d Wire contexts to Disruption controllers 2022-02-04 10:32:04 -05:00
jlsong01
d66b3edd65 allocate a unique scheme for each test to fix concurrent usage issue 2022-02-02 15:22:59 +08:00
jlsong01
d281e25426 Optimize cronjob controller status updates 2022-01-27 17:09:47 +08:00
Kubernetes Prow Robot
876d4e0ab0
Merge pull request #107659 from jlsong01/readability_ut_cj_controller
readability enhancement for cj controller unit test
2022-01-26 21:12:49 -08:00
00255991
cc2b2cda18 Migrate statefulset pkg files to structured logging 2022-01-26 10:47:24 +08:00
yujunwang
8f96600907 perf:logic-optimiz-for-DetermineVolumeAction 2022-01-22 23:45:29 +08:00
jlsong01
79d921e040 readability enhancement for cj controller unit test 2022-01-20 23:10:10 +08:00
Kubernetes Prow Robot
184daed0db
Merge pull request #107559 from liggitt/invalid-selectors
Handle invalid selectors properly
2022-01-19 14:49:31 -08:00
Kubernetes Prow Robot
9d41c13348
Merge pull request #107443 from mattcary/no-watch
Turn off informer for statefulset unit tests
2022-01-19 01:28:18 -08:00
Matthew Cary
f2861d7876 Turn off informer for statefulset unit tests
Change-Id: I353a2d5bd59963d5d2308eaf7d0e6f77d969fc25
2022-01-15 20:29:19 +00:00
Jordan Liggitt
c0af728f43 Handle invalid selectors properly 2022-01-14 12:11:02 -05:00
Wojciech Tyczyński
551790729f Remove selflink references in different testing-related files 2022-01-14 12:58:05 +01:00
Kubernetes Prow Robot
3bd422dc76
Merge pull request #107293 from dims/jan-1-owners-cleanup
Cleanup OWNERS files - Jan 2021 Week 1
2022-01-13 10:30:30 -08:00
Andrew Sy Kim
845d4a4304 add myself as approver to pkg/controller
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2022-01-12 19:33:02 -05:00
Patrick Ohly
9eaa2dc554 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.
2022-01-12 07:48:36 +01:00
Kubernetes Prow Robot
1f382b171e
Merge pull request #107080 from sivchari/fix-misspell
fix curent to current
2022-01-11 13:56:53 -08:00
Kubernetes Prow Robot
ccccd90bbc
Merge pull request #107389 from jlsong01/refine_comments_quota_monitor
refine comments of quota monitor
2022-01-10 13:34:25 -08:00
Davanum Srinivas
ba1f853b5a
Add mwielgus back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 09:02:53 -05:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
astraw99
a5a54754d5 refactor garbagecollection controllers to make forget impossible to forget 2022-01-09 15:19:10 +08:00
Kubernetes Prow Robot
3bebe8f6b5
Merge pull request #105264 from devincd/fix_typo
fix the log description
2022-01-06 17:40:29 -08:00
jlsong01
d6bf04d85f refine comments of quota monitor 2022-01-06 23:08:53 +08:00
JUN YANG
13fa2b1949 replace all occurrences of "node", nodeName to "node", klog.KRef("", nodeName) 2022-01-06 21:19:29 +08:00
Kubernetes Prow Robot
65378e7747
Merge pull request #102636 from charlesxsh/svcacct-ctrl-test
fix a potential deadlock
2022-01-05 21:12:27 -08:00
Mengjiao Liu
beda4cafb6 kubelet: Remove the deprecated flag --experimental-check-node-capabilities-before-mount 2022-01-06 11:47:11 +08:00
Kubernetes Prow Robot
abfe397ceb
Merge pull request #107166 from jsafrane/fix-pv-controller-tests
Fix PV controller unit test 5-7
2022-01-04 23:03:27 -08:00
Jan Safranek
0f9832d095 Fix PV name in unit test
Test 5-5 should use PV with "5-5"i in the name. It makes log analysys
much easier.
2022-01-03 15:20:12 +01:00
houjun
de6fc49a99 pointer usage error 2022-01-02 13:55:53 +08:00
Kubernetes Prow Robot
f0dbc32ed9
Merge pull request #106853 from gnufied/disable-exp-backoff-volume-not-inuse
When volume is not marked in-use, do not backoff
2021-12-22 19:46:37 -08:00
Arda Güçlü
ef39a89142 Remove deprecated discovery/ServerResources function
ServerResources function was deprecated and instead ServerGroupsAndResources
function is suggested.

This PR removes ServerResources function and move every place to use ServerGroupsAndResources.
2021-12-22 11:14:09 +03:00
Jan Safranek
045ca75c03 Deflake PV metrics unit test
Test 5-7 tries to delete a PVC at the very same time when it detects that
the PV controller started processing the PVC. The controller then sometimes
can't update the PVC and generate an event for it that the test expects.

From PV controller logs (not shown in CI):
> I1221 14:36:34.548160  104481 pv_controller.go:815] updating PersistentVolumeClaim[default/claim5-7] status: set phase Lost failed: cannot update claim claim5-7: claim not found

Typical error in CI:
> FAIL: TestControllerSync (83.22s)
> framework_test.go:202: Event "Warning ClaimLost" not emitted

Therefore wait for the PVC to be fully processed before deleting the PVC to
avoid races.
2021-12-21 15:36:44 +01:00
Jan Safranek
e323306ce0 Add new watchers to PV controller tests
Add fake Pod and Node watchers to the tests. It only reduces test noise:

Failed to watch *v1.Pod: unhandled watch: testing.WatchActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"watch", Resource:schema.GroupVersionResource{Group:"", Version:"v1", Resource:"pods"}, Subresource:""}, WatchRestrictions:testing.WatchRestrictions{Labels:labels.internalSelector(nil), Fields:fields.andTerm{}, ResourceVersion:""}}
2021-12-21 15:36:34 +01:00
Kubernetes Prow Robot
13e97453f9
Merge pull request #107091 from robscott/endpointslice-metrics-perf
Improving performance of EndpointSlice controller metrics cache
2021-12-21 01:08:45 -08:00
Rob Scott
242c33615e
Improving performance of EndpointSlice controller metrics cache 2021-12-20 10:26:47 -08:00
Hemant Kumar
7989f27044 use node informer to check volumes attachment status before backoff
fix unit tests
2021-12-20 11:57:05 -05:00
Kubernetes Prow Robot
8ade75465a
Merge pull request #104799 from RyanAoh/cronjob_dev
fix the error when cleaning up finished jobs for cronjob
2021-12-17 13:23:53 -08:00
sivchari
a5c5acf56e fix curent to current 2021-12-17 03:33:22 +09:00
Kubernetes Prow Robot
1426587e08
Merge pull request #106436 from dims/cleanup-owners-files-no-activity-in-a-year
Cleanup OWNERS files (No Activity in the last year)
2021-12-15 12:07:51 -08:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05:00
Kubernetes Prow Robot
8324868f89
Merge pull request #106950 from sunzhaochang/fix-unexpected-end-test
Fix unexpected end of TestDependentsRace
2021-12-14 15:16:49 -08:00
Kubernetes Prow Robot
ba200841fd
Merge pull request #106366 from cyclinder/evictions_number_stable
adding evictions_total metric and marking evictions_number deprecated
2021-12-12 23:19:59 -08:00
cyclinder
b88b51c6e5 adding evictions_total metric and marking evictions_number deprecated
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-13 10:36:02 +08:00
sunzhaochang
f0e74bfb7f Fix unexpected end of TestDependentsRace 2021-12-10 20:07:37 +08:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Kubernetes Prow Robot
d16a5e5feb
Merge pull request #106673 from qmloong/qmloong/master
refactor: use utilerrors instead of join error msg
2021-12-07 18:27:22 -08:00
Kubernetes Prow Robot
12901b95c9
Merge pull request #106344 from ikeeip/fix_import_formatting
Fix golang imports in k8s.io/pkg/controller/volume/persistentvolume package
2021-12-07 17:26:40 -08:00
menglong.qi
ea31d7b813 refactor: use utilerrors instead of join error msg 2021-11-28 17:16:17 +08:00
Matthew Cary
0e2b901762 Clean up deep copy needed for UpdateStatefulSet
Change-Id: Id732358183d682d1a945cfee56f83bcaac0d7c31
2021-11-23 06:48:54 -08:00
Aohan Yang
ad4fe13528 fix the error when cleaning up jobs for cronjob 2021-11-22 17:06:22 +08:00
Kubernetes Prow Robot
084b28f6d5
Merge pull request #106510 from robscott/topology-ready-fix-controller
Updating TopologyCache to disregard unready endpoints in calculations
2021-11-19 17:07:11 -08:00
Rob Scott
9813ec7e8a
Updating TopologyCache to disregard unready endpoints in calculations 2021-11-18 13:54:09 -08:00
Matthew Cary
53b3a6c1d9 controller change for statefulset auto-delete (tests)
Change-Id: I16b50e6853bba65fc89c793d2b9b335581c02407
2021-11-17 16:48:50 -08:00
Matthew Cary
bce87a3e4f controller change for statefulset auto-delete (implementation) 2021-11-17 16:48:50 -08:00