Commit Graph

207 Commits

Author SHA1 Message Date
whitewindmills c8423cb237 fix spelling errors
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2023-09-04 10:22:39 +08:00
lxtywypc 67de65d892 Revert "Merge pull request #3808 from ctripcloud/refactor-execution-workstatus"
This reverts commit 90ccbcdfce, reversing
changes made to 24bb582950.

Signed-off-by: lxtywypc <lxtywypc@gmail.com>
2023-08-31 14:23:58 +08:00
jwcesign 2c48bd7f99 cleanup: add uid in resource and owner information in annotations
Signed-off-by: jwcesign <jwcesign@gmail.com>
2023-08-26 17:02:13 +08:00
karmada-bot 3710dc4dab
Merge pull request #3948 from zishen/repair_ut
repair the cluster_status_controller_test
2023-08-21 21:59:01 +08:00
Tanggui Bian bc689e9142 repair the cluster_status_controller_test
Signed-off-by: Tanggui Bian <softwarebtg@163.com>
2023-08-19 18:03:19 +08:00
lxtywypc 89e3673fbb only update object in member cluster by execution controller
Signed-off-by: lxtywypc <lxtywypc@gmail.com>
2023-08-16 16:36:22 +08:00
RainbowMango 4ee4b22f05 Adopt Kubernetes breaking changes: PR 113542 which require singular names for core types
Adopt breaking change of contriller-runtime PR 2122
Adopt breaking change of contriller-runtime PR 2296
Adopt breaking change of controller-runtime PR 2139
Adopt breaking change of controller-runtime PR 2135
Adopt breaking change of Kubernetes PR 116218
Adopt breaking change of controller-runtime PR 2149
Adopt breaking change of controller-runtime PR 2150
Adopt breaking change of controller-runtime PR 2134
Adopt breaking change of controller-runtime PR 2293
Adopt breaking change of controller-runtime PR 2144
Adopt k8s feature: watch list. PR 115402
Adopt breaking change of Kubernetes PR 117102
Adopt Kubernetes change: disable staticcheck
Fix unit tests that failure due to fake-client behavior changes.

Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2023-07-29 16:47:38 +08:00
Poor12 e71a360f17 delete redundant deepcopy
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2023-06-09 17:37:12 +08:00
karmada-bot 527efd174f
Merge pull request #3621 from realnumber666/add-ut/crb_status_controller
Add ut for `pkg/controllers/applicationfailover` and `pkg/controllers/status`
2023-06-06 12:31:23 +08:00
rayywu e97d29500b Add UT for pkg/controllers/applicationfailover/common.go
Signed-off-by: rayywu <rayywu@tencent.com>
2023-06-02 00:26:49 +08:00
rayywu 8e0f186302 Add UT for pkg/controllers/status/rb_status_controller.go
Signed-off-by: rayywu <rayywu@tencent.com>
2023-06-01 20:41:18 +08:00
rayywu 0ee9be39bb Add UT for pkg/controllers/status/crb_status_controller.go
Signed-off-by: rayywu <rayywu@tencent.com>
2023-06-01 20:33:47 +08:00
karmada-bot d01ded2c2d
Merge pull request #3568 from realnumber666/add-ut/work_status_controller_0522
Add UT for pkg/controllers/status/work_status_controller.go
2023-05-23 21:03:55 +08:00
rayywu 1412b2d12c Add UT for pkg/controllers/status/work_status_controller.go
Signed-off-by: rayywu <rayywu@tencent.com>
2023-05-23 16:50:33 +08:00
karmada-bot 26b272aef8
Merge pull request #3535 from realnumber666/add-ut/cluster_status_controller
Add UT for pkg/controllers/status/cluster_status_controller_test.go
2023-05-22 16:17:54 +08:00
rayywu 0c9b8d9a1e Add UT for pkg/controllers/status/cluster_status_controller_test.go
Signed-off-by: rayywu <rayywu@tencent.com>
2023-05-18 16:12:14 +08:00
whitewindmills 89295f9606 Fix inspection errors
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2023-05-17 17:06:27 +08:00
rayywu 4335107894 Add UT for deploy.go and cluster_condition_cache.go
Signed-off-by: rayywu <rayywu@tencent.com>
2023-04-03 17:25:33 +08:00
xigang 4c38c4e6c1 Fix: remove the setTransitionTime method from the cluster status controller
Signed-off-by: xigang <wangxigang2014@gmail.com>
2023-03-23 09:55:07 +08:00
Poor12 e7f70a00b6 fix issue when cluster fails and recovers
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2023-03-07 15:39:25 +08:00
changzhen eecadfd43a add bindingStatus controller to aggregate work status and update the
status of resource template

Signed-off-by: changzhen <changzhen5@huawei.com>
2023-02-23 16:08:36 +08:00
RainbowMango c07ad07f3b Adopt lease name change
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2023-01-29 18:08:19 +08:00
karmada-bot a20dd6e630
Merge pull request #2935 from jwcesign/code-review-fix-v2
Delete the redundant logic in func GenerateExecutionSpaceName
2022-12-29 15:39:50 +08:00
chen zechun 83d43235e8 Uniform error log output starts with uppercase
Signed-off-by: chen zechun <zechun.chen@daocloud.io>
2022-12-28 19:12:36 +08:00
jwcesign 8acd1a4503 Delete the redundant logic in func GenerateExecutionSpaceName
Signed-off-by: jwcesign <jiangwei115@huawei.com>
2022-12-28 15:59:24 +08:00
Poor12 7c4cd0b5b6 fix work status not sync to control plane
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-12-09 15:43:34 +08:00
karmada-bot 6ef120f6e1
Merge pull request #2496 from Poor12/controller-metrics
Add metrics for cluster
2022-11-25 09:25:08 +08:00
Poor12 22d372ba79 add metrics for cluster
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-11-23 16:32:26 +08:00
Poor12 5418b5d265 refactor events
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-11-15 15:34:22 +08:00
Poor12 840de4fc84 add reflectStatusToWork and InterpretHealth event
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-11-11 12:07:49 +08:00
yanggang a0a7674d26
reuse context for controller-manager base-context
Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-05 18:51:06 +08:00
lonelyCZ 3bcee9db07 Unify the dynamic client name for work_status_controller
Signed-off-by: lonelyCZ <531187475@qq.com>
2022-10-09 10:25:38 +08:00
Poor12 2e3e816ba2 Use transform func to save memory when large cluster
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-08-30 19:21:09 +08:00
changzhen cab85d967e fix error of reflectStatus failed when call resourceInterpreter
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-08-26 14:08:33 +08:00
karmada-bot bceea1635c
Merge pull request #2402 from Poor12/2367
Make changes to cluster-status-controller to adopt cluster resource models
2022-08-25 10:18:52 +08:00
Poor12 18c625e6a6 update cluster-status-controller to adopt cluster resource models
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-08-24 17:45:54 +08:00
changzhen afca732825 reflect health status for recording the healthy state of the current resource running in the member cluster
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-08-24 17:27:56 +08:00
RainbowMango 95036ffcda enable node pod list only when needed for better performance
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-08-17 16:33:38 +08:00
jingxueli b3ca4c2ee8 make buildInformerForCluster configurable
Signed-off-by: jingxueli <jingxueli@trip.com>
2022-08-16 21:03:09 +08:00
RainbowMango 8bb253a483 Start lease controller with separated context.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-08-16 11:15:57 +08:00
Poor12 1374169fe3 Rename package name of typedmanager
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-08-15 11:26:30 +08:00
charlie 34948b7c09 feat: update the dynamic informer in cluster status controller with typed informer
Signed-off-by: charlie <qianglin98@qq.com>
2022-08-11 13:00:31 +08:00
RainbowMango 8461e4fb8c rename and re-organize the informermanager
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-08-09 17:24:23 +08:00
karmada-bot 393bf843de
Merge pull request #2315 from yy158775/workstatus_sync
stop update status if Work object in terminating state
2022-08-04 15:37:05 +08:00
yy158775 e26c0880cd don't collect status data when the work to be deleted
Signed-off-by: yy158775 <1584616775@qq.com>
2022-08-04 14:29:39 +08:00
weilaaa 4ed701069d optimize unstructured convert methods
Signed-off-by: weilaaa <weilanidaye@gmail.com>
2022-08-04 11:38:25 +08:00
karmada-bot 5fcdafbcfe
Merge pull request #2033 from dddddai/lease
Skip updating lease for push mode clusters
2022-06-23 20:42:15 +08:00
dddddai 4e73056e51 skip updating lease for push mode clusters
Signed-off-by: dddddai <dddwq@foxmail.com>
2022-06-20 14:43:59 +08:00
karmada-bot 4c496a3a98
Merge pull request #1884 from dddddai/cluster-status
Add cluster success threshold
2022-06-17 15:46:09 +08:00
dddddai 1ebc680d16 add cluster success threshold
Signed-off-by: dddddai <dddwq@foxmail.com>
2022-06-16 18:02:17 +08:00
duanmeng 800107904e fix the incorrect use of ServerGroupsAndResources() in client-go
Signed-off-by: duanmeng <duanmeng_yewu@cmss.chinamobile.com>
2022-06-07 16:44:11 +08:00
Garrybest d1ce1a126d fix implicit issue for event filter
Signed-off-by: Garrybest <garrybest@foxmail.com>
2022-05-30 10:48:32 +08:00
karmada-bot 801d18767b
Merge pull request #1829 from dddddai/cluster-status
Add cluster failure threshold
2022-05-24 18:03:43 +08:00
dddddai 339f431673 add cluster failure threshold
Signed-off-by: dddddai <dddwq@foxmail.com>
2022-05-24 17:22:05 +08:00
karmada-bot b2ebfb6036
Merge pull request #1733 from XiShanYongYe-Chang/skip-reflect-status
Skip reflect work status when resource has empty status
2022-05-11 10:20:33 +08:00
lv 12d9023a5c [fix] delete work status 'Resource' field
Signed-off-by: lv <yanru.lv@daocloud.io>
2022-05-09 09:48:21 +08:00
changzhen d0dadb282a skip reflect work status when resource has empty status
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-05-07 11:02:22 +08:00
changzhen 0b985f4463 add default reflectstatus implementation with deployment kind
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-04-24 11:19:42 +08:00
changzhen ecc8ddbb02 add ReflectStatus ResourceInterperter interface to grab workload status
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-04-22 10:08:03 +08:00
RainbowMango 11fd0f935c Refactor ratelimit flags to make it easier to share with karmada-agent.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-03-18 17:25:13 +08:00
RainbowMango 8a402f8e94 chore: cleanup ratelimiter flags
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-03-08 08:57:01 +08:00
pigletfly 9e28d6c6e8 add ratelimiter flags
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2022-03-03 16:09:39 +08:00
karmada-bot d980eeac5d
Merge pull request #1321 from pigletfly/fix-worker-num
introduce concurrent flags to controllers
2022-02-25 15:17:06 +08:00
RainbowMango 3f0aa79948 Fix comments from myself.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-02-25 10:42:26 +08:00
pigletfly 957be91796 Fix controller reconcile concurrent
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2022-02-24 15:54:14 +08:00
Garrybest 85d8a6ccf4 add karmada-descheduler
Signed-off-by: Garrybest <garrybest@foxmail.com>
2022-02-24 11:43:28 +08:00
Garrybest 0777cf064c clean up GetObjectFromCache
Signed-off-by: Garrybest <garrybest@foxmail.com>
2022-02-23 14:19:38 +08:00
RainbowMango bff2eb9024 Adopt k/k API/interface changes
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-02-19 21:16:32 +08:00
karmada-bot 846b1aeb98
Merge pull request #1304 from pigletfly/fix-sort-apiResources
fixed apiEnablements unordered issue
2022-01-29 15:31:34 +08:00
karmada-bot 648e89ec45
Merge pull request #1328 from EvaDD/master
Update first in RetryOnConflict
2022-01-28 16:58:35 +08:00
libentai f853550111 Update first in RetryOnConflict
Signed-off-by: libentai <libentai@huawei.com>
2022-01-28 15:50:18 +08:00
c30013971 773de5e746 Update first in RetryOnConflict
Signed-off-by: c30013971 <cuidengdeng@huawei.com>
2022-01-28 14:44:07 +08:00
pigletfly 2d797acb23 Sort apiResources
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2022-01-24 14:57:00 +08:00
chen zechun 306d06a8ff change syncWorkStatus and reflectStatus function, modify comments and rename variable names.
Signed-off-by: chen zechun <zechun.chen@daocloud.io>
2022-01-12 12:05:32 +08:00
helenfrank 43036a9670 Replace all the retry.DefaultBackoff with retry.DefaultRetry from codebase
Signed-off-by: helenfrank <helenfrank@protonmail.com>
2022-01-11 10:28:59 +08:00
pigletfly 28f1fbf985 Retry on status update conflict
Signed-off-by: pigletfly wangbing.adam@gmail.com
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2022-01-10 17:44:29 +08:00
lihanbo 5290f07345 abort deleting workload when the member cluster is unready
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-12-19 14:29:12 +08:00
jingxueli 0aec855964 set default for clusterCacheSync timeout and make it configurable
Signed-off-by: jingxueli <jingxueli@trip.com>
2021-12-16 21:28:04 +08:00
Garrybest 7445bd90da fix slow enqueue of async worker
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-12-04 19:44:33 +08:00
karmada-bot 7e35f9cc26
Merge pull request #1031 from pigletfly/fix-retry-on-update-status
Add retry on update status
2021-11-26 17:02:05 +08:00
lihanbo 2131ec5189 add conditions for cluster status
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-11-25 21:23:15 +08:00
pigletfly 39985d5dbe Add retry on update status
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2021-11-25 19:55:03 +08:00
guoyao ae34e4d1b8 unify IsNodeReady function
Signed-off-by: guoyao <1015105054@qq.com>
2021-11-15 11:35:03 +08:00
karmada-bot 9d31827a4b
Merge pull request #925 from pigletfly/refactor-object-watcher
refactor object watcher interface
2021-11-08 11:39:42 +08:00
pigletfly dac00692e7 refactor object watcher interface
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2021-11-05 23:26:51 +08:00
karmada-bot 51c911a60b
Merge pull request #894 from mrlihanbo/cluster_status_bugfix
add Timeout in WaitForCacheSync
2021-11-05 15:48:04 +08:00
lihanbo ac3878ec03 add Timeout in WaitForCacheSync
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-11-05 13:50:30 +08:00
lihanbo cc0f6ed08b return nil when the obj not managed by Karmada in work status controller
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-11-05 11:33:58 +08:00
lihanbo abdfc61310 collect status even if cluster's deletionTimestamp is not zero
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-10-21 09:54:11 +08:00
Garrybest 08fa785670 run async worker with no intervals
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-10-18 10:58:49 +08:00
Garrybest e9a7a2a022 clean up unstructured conversion
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-09-29 11:33:19 +08:00
changzhen e118c7909e fix an error when karmada-controller-manager restart
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-09-26 20:39:51 +08:00
iawia002 61a946aff7 Move GenerateKey function out of the worker file
Signed-off-by: iawia002 <z2d@jifangcheng.com>
2021-09-24 10:53:38 +08:00
karmada-bot d67637c7f9
Merge pull request #723 from Garrybest/pr_pod
add resource pod in cluster.status.resourceSummary
2021-09-22 11:35:25 +08:00
esto a6165e47f9 update import-aliases
Signed-off-by: esto <1291156784@qq.com>
2021-09-15 15:13:14 +08:00
Garrybest 1ed38bffe9 add resource pod in cluster.status.resourceSummary
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-09-14 11:32:14 +08:00
Garrybest 16c1723fb4 stop the lease controller when cluster does not exist
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-08-24 14:48:17 +08:00
Garrybest e3f0b9b611 clean up AddPodRequest
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-08-22 11:25:37 +08:00
RainbowMango f824427351 Move QPS and Burst to cluster status controller.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-08-19 11:44:24 +08:00
karmada-bot 67ded1f9ed
Merge pull request #590 from Garrybest/informer-manager
informer-manager: stop the informer before deleting the cluster
2021-08-16 19:48:25 +08:00