Commit Graph

545 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
5cd78a1e9d
Merge pull request #123233 from marshallbrekka/bugfix/daemonset-update-old-ready
Fix daemonset to ensure old unhealthy pods are counted towards max unavailable budget.
2024-05-13 09:53:53 -07:00
Kubernetes Prow Robot
de7d9a9897
Merge pull request #108349 from LastNight1997/optimize-dedup
optimize dedupCurHistories func in DaemonSetsController
2024-05-08 15:13:17 -07: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
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02: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
Marshall Brekka
9b300c978b
Fix daemonset to ensure old unhealthy pods are counted towards max unavailable budget. 2024-02-10 13:10:35 -08:00
weilaaa
eb8f3f194f use build-in max and min func to instead of k8s.io/utils/integer funcs 2023-12-15 15:09:11 +08:00
xigang
6b3476b79f node labels and taints do not change, node events are ignored in daemonset controller
Signed-off-by: xigang <wangxigang2014@gmail.com>
2023-11-02 17:53:44 +08:00
LastNight1997
153dca4832 optimize dedupCurHistories func in DaemonSetsController
Signed-off-by: LastNight1997 <934104625@qq.com>
2023-10-12 12:29:59 +08:00
mochizuki875
2a82776745 change rolling update logic to exclude sunsetting nodes 2023-09-19 11:39:32 +00:00
git-jxj
a5b3a4b738
cleanup: Update deprecated FromInt to FromInt32 (#119858)
* redo commit

* apply suggestions from liggitt

* update Parse function based on suggestions
2023-08-16 09:33:01 -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
Kubernetes Prow Robot
74bd77a9df
Merge pull request #118917 from kmala/daemonsetfix
increase the log level for the GetTargetNodeName error message
2023-06-28 00:08:32 -07:00
Aldo Culquicondor
a4519665fe
Skip terminal Pods with a deletion timestamp from the Daemonset sync (#118716)
* Skip terminal Pods with a deletion timestamp from the Daemonset sync

Change-Id: I64a347a87c02ee2bd48be10e6fff380c8c81f742

* Review comments and fix integration test

Change-Id: I3eb5ec62bce8b4b150726a1e9b2b517c4e993713

* Include deleted terminal pods in history

Change-Id: I8b921157e6be1c809dd59f8035ec259ea4d96301
2023-06-27 08:56:33 -07:00
Keerthan Reddy Mala
0033f65808 increase the log level for the GetTargetNodeName error message 2023-06-26 17:31:50 -07:00
Kante Yin
a7035f5459 Pass Context to StartTestServer
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:25:09 +08:00
Stephen Kitt
5bfe738af2
apps: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-05-01 09:17:05 +02:00
Michal Wozniak
b5dd5f1f3a Investigate and fix the handling of Succeeded pods in DaemonSet 2023-04-04 19:21:15 +02:00
mantuliu
0567c93b2a Improve the performance of map usage
Signed-off-by: mantuliu <240951888@qq.com>
2023-03-21 20:37:53 +08:00
Patrick Ohly
99151c39b7 kube-controller-manager: convert to structured logging
Most of the individual controllers were already converted earlier. Some log
calls were missed or added and then not updated during a rebase. Some of those
get updated here to fill those gaps.

Adding of the name to the logger used by each controller gets
consolidated in this commit. By using the name under which the
controller is registered we ensure that the names in the log
are consistent.
2023-03-14 19:16:32 +01:00
ZhangKe10140699
7198bcffcd daemonset: use contextual logging 2023-03-14 08:50:27 +08:00
Gunju Kim
69fcde750a
Update daemonSet status even if syncDaemonSet fails
This ensures that the daemonset controller updates daemonset statuses in
a best-effort manner even if syncDaemonSet fails.

In order to add an integration test, this also replaces
`cmd/kube-apiserver/app/testing.StartTestServer` with
`test/integration/framework.StartTestServer` and adds
`setupWithServerSetup` to configure the admission control of the
apiserver.
2022-12-10 11:45:56 +09:00
Kubernetes Prow Robot
da3d98277b
Merge pull request #111839 from ialidzhikov/cleanup/pkg-controller
pkg/controller: Replace deprecated func usage from the `k8s.io/utils/pointer` pkg
2022-12-09 15:42:37 -08:00
Kubernetes Prow Robot
5fe12aae11
Merge pull request #111207 from lucming/code-cleanup2
Reduce indentation in daemonset controller code
2022-12-09 15:41:41 -08:00
ialidzhikov
aede3fbf40 pkg/controller: Replace deprecated func usage from the k8s.io/utils/pointer pkg 2022-11-23 17:40:23 +02:00
Maciej Szulik
3c93d540c6
Revert "Update daemonSet status even if syncDaemonSet fails"
This reverts commit 2ee024a4df.
2022-11-08 15:01:09 +01:00
Kubernetes Prow Robot
b4f42864f5
Merge pull request #112127 from gjkim42/update-status-despite-error
Update daemonSet status even if syncDaemonSet fails
2022-11-07 16:00:28 -08:00
Kubernetes Prow Robot
20ffe3bbf9
Merge pull request #111607 from tnqn/reduce-redundant-index
Remove duplicate and unused index from PodIndexer
2022-11-04 09:36:16 -07:00
Han Kang
2bbd445f50 remove rate limiter metric as it is not in use
Change-Id: I91157653e3860eeecc3f572aee88da6ffc65faed
2022-10-13 13:07:11 -07:00
Gunju Kim
2ee024a4df
Update daemonSet status even if syncDaemonSet fails 2022-10-11 22:55:50 +09: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
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
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
Wojciech Tyczyński
11b679c66a Fix event broadcaster shutdown in multiple controllers 2022-05-17 22:14:19 +02:00
Kubernetes Prow Robot
c3e3f6cd4d
Merge pull request #107241 from houjun41544/20211228-ds
pointer usage error
2022-03-26 11:45:33 -07:00
Bartłomiej Wróblewski
b2e2fb8d89 Make daemon.NodeShouldRunDaemonPod function public 2022-03-08 11:32:17 +00: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
houjun
de6fc49a99 pointer usage error 2022-01-02 13:55:53 +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
Mike Dame
80c01707e0
Wire contexts to Batch controllers (#105491)
* Wire contexts to Batch controllers

* (hold) feedback + updates that overlap with Apps controllers

* fixup errors
2021-11-10 14:56:46 -08:00
evertrain
9ceb226c06 Bugfix prevent daemon controller to adopt controller revisions of other namespaces 2021-11-02 00:14:26 +08:00
Shuanglu
9bcfa71e31
Fix Daemonset controller role missing 'update pod' permission (#104758)
* fix_dsc_rbac_pod_update

* add test for DaemonSet Controller updates label of the pod after "DedupCurHistories"

* rebase

* update parameter of dsc.Run
2021-10-28 05:24:26 -07:00
Mike Dame
41fcb95f2f Wire contexts to Apps controllers 2021-10-13 16:32:13 -04:00
wojtekt
e233feb99b Migrate to k8s.io/utils/clock in pkg/controller 2021-09-10 11:42:32 +02:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Raymonder jin
03f9f75e88
fix typo for daemon_controller_test.go 2021-06-28 04:54:09 -07:00
Aldo Culquicondor
d8aad7944c Remove unused util CreatePods
And rename CreatePodsWithControllerRef to simply CreatePods
2021-05-20 20:27:21 +00:00
Kubernetes Prow Robot
9558d0c5c2
Merge pull request #101984 from ravisantoshgudimetla/fix-ds-units
[daemonSet]: Fix unit tests
2021-05-18 23:32:51 -07:00
Kubernetes Prow Robot
89e0b2d185
Merge pull request #99398 from tnqn/ds-update-retry
Fix DaemonSet status update retry
2021-05-18 22:32:50 -07:00