Commit Graph

117 Commits

Author SHA1 Message Date
Mike Dame
41fcb95f2f Wire contexts to Apps controllers 2021-10-13 16:32:13 -04: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
89e0b2d185
Merge pull request #99398 from tnqn/ds-update-retry
Fix DaemonSet status update retry
2021-05-18 22:32:50 -07:00
Kubernetes Prow Robot
5779fec3c4
Merge pull request #99959 from AliceZhang2016/nodeaffinity-cleanup
Move nodeaffinity helpers to component-helpers package
2021-04-21 17:03:53 -07:00
Kubernetes Prow Robot
e7dc0df323
Merge pull request #97650 from ialidzhikov/cleanup/redundant-imports
Clean up some redundant imports
2021-04-08 14:27:22 -07:00
Mengxue Zhang
bdda9728e7 move nodeaffinity helpers to component-helpers package 2021-03-10 20:19:25 +00:00
Quan Tian
60bb2a3a6f Fix DaemonSet status update retry
It's easy to get update conflict when processing a DaemonSet
continuously. storeDaemonSetStatus had a retry logic that it gets the
resource from apiserver to update the DaemonSet with the latest resource
version. However, it never really retried because of a wrong check and
always made an useless get call. This patch fixes the logic to allow
the function retry once on update error.
2021-03-09 00:39:25 +08:00
Clayton Coleman
8d8884a907
daemonset: Remove unnecessary error returns in strategy code
The nodeShouldRunDaemonPod method does not need to return an error
because there are no scenarios under which it fails. Remove the
error return path for its direct calls as well.
2021-03-01 13:23:18 -05:00
Clayton Coleman
18f43e4120
daemonset: Implement MaxSurge on daemonset update
If MaxSurge is set, the controller will attempt to double up nodes
up to the allowed limit with a new pod, and then when the most recent
(by hash) pod is ready, trigger deletion on the old pod. If the old
pod goes unready before the new pod is ready, the old pod is immediately
deleted. If an old pod goes unready before a new pod is placed on that
node, a new pod is immediately added for that node even past the MaxSurge
limit.

The backoff clock is used consistently throughout the daemonset controller
as an injectable clock for the purposes of testing.
2021-03-01 13:21:12 -05:00
Mike Dame
578ff3ec34 Move Taint/Toleration helpers to component-helpers repo
This is part of the goal for scheduling to remove dependencies on internal
packages for the scheduling framework. It also provides these functions in an
external location for other components and projects to import.
2021-02-01 11:06:03 -05:00
ialidzhikov
1b74f28ed8 Clean up some redundant imports
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2021-01-02 01:09:22 +02:00
Kubernetes Prow Robot
00d6255f44
Merge pull request #91712 from KobayashiD27/structured-logging-in-event
Migrate log to klog.InfoS for staging/src/k8s.io/client-go
2020-06-22 23:53:40 -07:00
Tomas Nozicka
5cf3f8b79c Fix DS expectations on recreate 2020-06-17 09:22:17 +02:00
Kobayashi Daisuke
4ae11dac2e Replace StartLogging(klog.Infof) with StartStructuredLogging(0) 2020-06-15 17:48:35 +09:00
KeZhang
884f94ad92 Do not swallow NotFound error for DeletePod in dsc.manage 2020-06-04 16:41:38 +08:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Abdullah Gharaibeh
bed9b2f23b Cleanup obsolete NodeInfo methods 2020-04-12 18:13:46 -04:00
Kubernetes Prow Robot
62dc3ea6d1
Merge pull request #87368 from 928234269/fix_staticcheck01
fix staticcheck errors in pkg/controller/daemon.
2020-03-03 12:15:28 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Sakura
203c7b4731
fix staticcheck errors in pkg/controller/daemon.
Signed-off-by: Sakura <longfei.shang@daocloud.io>
2020-01-19 21:09:05 +08:00
Abdullah Gharaibeh
041e5b5560 addressed comments 2020-01-04 01:14:24 -05:00
Abdullah Gharaibeh
7d604c318c Break DS controller on scheduler predicates and predicate errors 2020-01-03 13:05:07 -05:00
Kubernetes Prow Robot
f67d3b1a7d
Merge pull request #86229 from ahg-g/ahg-ds
Remove daemonset controller's dependency on scheduler metadata
2019-12-13 00:26:54 -08:00
Abdullah Gharaibeh
288609ecf5 remove ds dependeny on scheduler metadata 2019-12-12 19:04:36 -05:00
Ted Yu
9cff345770 Do not swallow timeout in manageReplicas 2019-12-12 11:27:36 -08:00
Aldo Culquicondor
6a98c93f3c Add MetadataProducerFactory for predicates
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-11-11 11:27:44 -05:00
yuxiaobo
81e9f21f83 Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-06 20:25:19 +08:00
Kubernetes Prow Robot
6a19261e96
Merge pull request #84123 from smarterclayton/terminating_cause
Handle namespace deletion more gracefully in built-in controllers
2019-11-04 07:55:41 -08:00
draveness
dc437a7890 feat: remove suspendedDaemonPods from daemon controller 2019-10-25 09:16:48 +08:00
draveness
35d772e354 feat: graduate ScheduleDaemonSetPods to GA 2019-10-23 21:34:47 +08:00
Clayton Coleman
8f74c8970b
daemonset: Ignore namespace termination errors when creating pods
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. While we could technically
exit the entire processing loop early for very large daemon sets,
we should wait for more evidence that is an issue before changing
that logic substantially.
2019-10-20 18:39:00 -04:00
Yassine TIJANI
c1487840bc move util/metrics to component-base
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-08 14:42:31 +02:00
Yassine TIJANI
7e4c3096fe move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-22 16:13:41 +01:00
Kubernetes Prow Robot
368ee4bb8e
Merge pull request #79068 from tedyu/dc-skipped-pods
Remove unnecessary loop for lowering expectations
2019-07-26 14:01:59 -07:00
Kubernetes Prow Robot
bbdd0557b6
Merge pull request #78170 from DaiHao/daemon
ignore failed pods to not block rolling update daemonset
2019-07-23 21:36:14 -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
c429b7d3e4 Handle error return from MetaNamespaceKeyFunc 2019-07-17 10:52:23 -07:00
Ted Yu
9c5f311eff Remove unnecessary loop for lowering expectations 2019-06-15 08:11:46 -07:00
daihao
6c0e35d7b2 do not delete pods whose deletiontimestamp != nil 2019-06-13 17:47:52 +08:00
daihao
166147d5c4 ignore failed pods to not stuck rolling update daemonset 2019-05-21 17:38:53 +08:00
daihao
e25ff463ba fix daemon set rolling update hang 2019-05-16 10:52:48 +08:00
Kubernetes Prow Robot
d5245b9563
Merge pull request #74856 from draveness/fix/daemonset-controller-slow-batch-creation
fix(daemon): create more expections when skipping pods
2019-05-03 23:33:37 -07:00
draveness
5f8dfdc698 fix(daemon): create more expections when skipping pods 2019-05-04 08:15:49 +08:00
daihao
18ed2f6c54 Enqueue controllers after minreadyseconds when all pods are ready 2019-04-29 19:51:03 +08:00
Krzysztof Jastrzebski
9c142cf47b Delete only unscheduled pods if node doesn't exist anymore. 2019-04-03 00:24:26 +02:00
draveness
36c535cf42 fix: list nodes in sync daemonset 2019-04-02 13:54:28 +08:00
Krzysztof Jastrzebski
0087af78e2 Deleting pods assigned to not existing nodes only if
ScheduleDaemonSetPods is enabled.
2019-01-31 20:34:51 +01:00
Krzysztof Jastrzebski
7186d3ba8b Delete pods assigned to not existing nodes. 2019-01-28 14:38:09 +01:00
Andrew Kim
0bc5508aca replace client-go/util/integer with k8s.io/utils/integer 2019-01-24 15:34:21 -05:00