Commit Graph

991 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
aeed1d0e1a
Merge pull request #124842 from carlory/honor-pv-reclaim-policy-e2e
Promote HonorPVReclaimPolicy to beta and enable it by default
2024-06-19 13:26:41 -07:00
carlory
4058178b8c Promote HonorPVReclaimPolicy to beta and enable it by default 2024-06-19 13:51:37 +08:00
carlory
214287b370 kube-controller-manager removed deprecated command flags: --volume-host-cidr-denylist and --volume-host-allow-local-loopback 2024-05-27 10:59:09 +08:00
carlory
9c92b37d4e remove clusterName from VolumeOptions 2024-05-10 16:42:31 +08:00
Alvaro Aleman
6d0ac8c561 Use the generic/typed workqueue throughout
This change makes us use the generic workqueue throughout the project in
order to improve type safety and readability of the code.
2024-05-04 14:33:12 -04:00
Kubernetes Prow Robot
dbb7004385
Merge pull request #121256 from liyuerich/workqueue
drop deprecated workqueue NewNamed package
2024-04-29 09:33:05 -07:00
Kubernetes Prow Robot
38c2a963b4
Merge pull request #123984 from carlory/volume-remove-cloud-provider
Remove cloud provider dependency from volume host and volume controllers
2024-04-28 02:54:14 -07:00
liyuerich
98dfaed4be drop deprecated workqueue NewNamed package
Signed-off-by: liyuerich <yue.li@daocloud.io>
2024-04-28 14:04:51 +08:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
carlory
9ec6ee539a Remove cloud provider dependency from volume host and volume controllers 2024-04-18 19:00:37 +08:00
Kubernetes Prow Robot
854af6aba6
Merge pull request #122411 from huww98/lift-mountedByNode
ad controller: lift nodeAttachedTo.mountedByNode
2024-04-18 00:00:14 -07:00
Kubernetes Prow Robot
ef2c682635
Merge pull request #122082 from carlory/remove-keep-terminated-pod-volumes
keep-terminated-pod-volumes flag on kubelet is removed
2024-04-17 23:59:54 -07:00
huweiwen
3a71fe57f7 ad controller: lift nodeAttachedTo.mountedByNode
optimize adc.nodeUpdate(). Time complexity reduced from O(n) to O(1), where n is the number of nodes.

Data stored in nodeAttachedTo.mountedByNode is now at actualStateOfWorld.inUseVolumes.

This refactor also ensures that we can record the state update even if the volume is not present in ASW yet.

The added BenchmarkNodeUpdate result is reduced from 28076923 to 16030 ns/op.
The previous BenchmarkPopulateActualStateOfWorld result is also reduced from 13s to 8s.
2024-04-11 15:35:17 +08:00
Kubernetes Prow Robot
611dbaa055
Merge pull request #122790 from carlory/fix-121696
Fix flaky test: Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce
2024-03-10 19:23:40 -07:00
carlory
b47c73ee26 keep-terminated-pod-volumes flag on kubelet is removed 2024-03-01 18:42:15 +08:00
Mengjiao Liu
b584b87a94 kube-controller-manager: readjust log verbosity
- Increase the global level for broadcaster's logging to 3 so that users can ignore event messages by lowering the logging level. It reduces information noise.
- Making sure the context is properly injected into the broadcaster, this will allow the -v flag value to be used also in that broadcaster, rather than the above global value.
- test: use cancellation from ktesting
- golangci-hints: checked error return value
2024-02-26 14:51:56 +08:00
Kubernetes Prow Robot
31a482a149
Merge pull request #120344 from rohitssingh/disable_force_detach
Add a flag to disable force detach behavior in kube-controller-manager
2024-02-22 13:02:38 -08:00
Rohit Singh
13dddca6a2 Add "disable-force-detach-on-timeout" flag to kube-controller-manager 2024-02-22 18:31:52 +00:00
carlory
0cd9d40a65 Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce use
waitForAttachStateToNode instead of time.Sleep
2024-02-04 16:57:55 +08:00
Kubernetes Prow Robot
0209c546fd
Merge pull request #121824 from carlory/clean-112
adc remove stale comments
2024-01-29 14:13:17 -08:00
Kubernetes Prow Robot
9e34bac02a
Merge pull request #119395 from carlory/patch-expand-001
getPersistentVolume remove reduant deep copy
2024-01-29 05:40:40 -08:00
Kubernetes Prow Robot
eb1ae05cf0
Merge pull request #122030 from carlory/121799
fix issue with using feature HonorPVReclaimPolicy in csi-provisioner
2024-01-19 04:35:48 +01:00
carlory
5ff42b2368 fix issue with using feature HonorPVReclaimPolicy in csi-provisioner 2024-01-17 10:57:30 +08:00
carlory
8af9a177b2 If a pvc has an empty storageclass name, don't try to assign a default StorageClass to it. 2024-01-13 21:25:43 +08:00
Kubernetes Prow Robot
5cf72fbfae
Merge pull request #121713 from carlory/adc
adc remove redundant check
2023-12-28 21:47:19 +01:00
Kubernetes Prow Robot
755b4e2bc4
Merge pull request #121576 from huww98/opti-aswp
ad controller: optimize populateActualStateOfWorld
2023-12-19 17:43:45 +01:00
Kubernetes Prow Robot
c24e8ee403
Merge pull request #121697 from carlory/clean-111
add comments for switch case of syncUnboundClaim
2023-12-13 22:35:00 +01:00
huweiwen
a3e27aa1ad ad controller: optimize populateActualStateOfWorld
Reduce overall complexity from O(n^2) to O(n)
Run time of the new benchmark is reduced from hours to 13s
2023-11-17 16:48:30 +08:00
huweiwen
854347ac81 ad controller populator: check for inUse sync in test 2023-11-17 16:48:30 +08:00
carlory
4a4940694f remove stale comments 2023-11-09 11:58:50 +08:00
carlory
ae24846c48 add comments for switch of syncUnboundClaim 2023-11-08 17:15:27 +08:00
carlory
957e9a7f1a adc remove redundant check 2023-11-03 16:17:39 +08:00
carlory
58236aa3eb remove EventRecorder from ControllerParameters of pv base controller 2023-11-01 17:54:00 +08:00
carlory
5a20ff1617 fix wrong controller name for ephemeralController 2023-10-30 18:45:13 +08:00
huweiwen
63b3085f2a fix ad controller populators test
The informer is not initialized, so no assertion performed before. Fixed this now.

Then fixed the test failure by using NewAttachDetachController to initialize adc.
2023-10-27 23:35:45 +08:00
Kubernetes Prow Robot
07029999f9
Merge pull request #120666 from b8kings0ga/feature/fix-comment-correction
AttachDetachControllerConfiguration.ReconcilerSyncLoopPeriod default value comment fix
2023-10-11 22:51:49 +02:00
Kubernetes Prow Robot
d3559bf77f
Merge pull request #120595 from jsafrane/fix-detach-uncertain
Mark a volume as uncertain-attached after detach error
2023-10-08 05:54:01 +02:00
b8kings0ga
9345da51ac fix comment mistake, run "make update" 2023-09-22 16:37:55 +08:00
Jan Safranek
7fc11f47ff Mark a volume as uncertain-attached after detach error
Volume that failed Detach() should not be marked as attached, CSI
external-attacher is probably still trying to detach it.

Mark it uncertain instead and wait for Detach() to succeed.
2023-09-13 10:03:28 +02:00
kerthcet
6fbb8ec7e4 Move scheduler testing utils to /scheduler/testing
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-09-12 13:42:38 +08:00
Patrick Ohly
2472291790 api: introduce separate VolumeResourceRequirements struct
PVC and containers shared the same ResourceRequirements struct to define their
API. When resource claims were added, that struct got extended, which
accidentally also changed the PVC API. To avoid such a mistake from happening
again, PVC now uses its own VolumeResourceRequirements struct.

The `Claims` field gets removed because risk of breaking someone is low:
theoretically, YAML files which have a claims field for volumes now
get rejected when validating against the OpenAPI. Such files
have never made sense and should be fixed.

Code that uses the struct definitions needs to be updated.
2023-08-21 15:31:28 +02:00
carlory
ad0b671b56 getPersistentVolume remove reduant deep copy 2023-07-18 18:55:42 +08:00
Kubernetes Prow Robot
be2cfc9697
Merge pull request #118228 from carlory/move-non-graceful-node-shutdown-to-GA
move non-graceful node shutdown to GA
2023-07-13 15:47:37 -07:00
Patrick Ohly
7d064812bb kube-controller-manager: finish conversion to contextual logging
This removes all exceptions and fixes the remaining unconverted log calls.
2023-07-12 14:57:29 +02:00
carlory
f443c458af move non-graceful node shutdown to GA 2023-07-11 13:51:51 +08:00
xing-yang
cca6601106 Add reason to force detach metric 2023-07-10 06:30:05 +00:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
Kubernetes Prow Robot
960830bc66
Merge pull request #118102 from RomanBednar/retro-sc-assignment-ga
graduate RetroactiveDefaultStorageClass feature to GA in 1.28
2023-06-27 20:46:32 -07:00
Kubernetes Prow Robot
a48bcc06fe
Merge pull request #117064 from RomanBednar/multiple-defaults
storage class assignment should not ignore errors
2023-06-23 03:09:23 -07:00
Roman Bednar
1bd3f072fa stop ignoring storage class selection errors
The GetDefaultClass() was fixed in scope of this issue:
https://github.com/kubernetes/kubernetes/issues/110514

Before this change assignDefaultStorageClass() was ignoring errors from
this function since it could mean there are multiple defaults - assign
could safely continue and do nothing.

This is no longer true because we always choose one from multiple
defaults - any errors returned from GetDefaultClass() are real errors
and should not be ignored.
2023-06-21 13:09:05 +02:00