Commit Graph

55 Commits

Author SHA1 Message Date
Mohamed Awnallah 6ae8cfd3e9 pkg/karmadactl/util: unit test apiclient
In this commit, we unit test apiclient on creating restconfig.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-12-11 08:57:27 +02:00
Mohamed Awnallah fc28676516 pkg/karmadactl/cmdinit: unit test clusterinfo
In this commit, we unit test clusterinfo on creating
bootstrap configmap and creating cluster info RBAC rules.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-12-05 09:19:33 +02:00
zhzhuang-zju af90640361 minimize the RBAC permissions for the pull mode cluster
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-11-20 15:44:01 +08:00
zhzhuang-zju 1eb2f9ec31 enhanced forced deletion on karmadactl unjoin
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-11-04 09:59:11 +08:00
wulemao e0017b6ba4 cleanup: change *kubeclient.Clientset to kubeclient.Interface in unregister module
Signed-off-by: wulemao <1194736083@qq.com>
2024-10-29 15:32:12 +08:00
wulemao f803efe492 support unregister cluster in karmada
Signed-off-by: wulemao <1194736083@qq.com>
2024-10-28 20:25:28 +08:00
karmada-bot 29c97e9848
Merge pull request #5602 from mohamedawnallah/dependOnAggregatorInterface
operator/pkg: depend on `aggregator.Interface` instead of `*aggregator.Clientset`
2024-10-17 11:58:28 +08:00
karmada-bot 59e302558d
Merge pull request #5616 from mohamedawnallah/dependOnClientSetInterface
operator+pkg:  depend on `clientset.Interface` instead of `*clientset.Clientset`
2024-09-29 15:11:12 +08:00
Mohamed Awnallah a640f0969f operator+pkg: depend on clientset.Interface for DI
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-27 15:35:40 +03:00
Mohamed Awnallah 6c490dcefa operator: depend on aggregator.Interface for DI
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-27 15:16:25 +03:00
zhzhuang-zju a684edd354 Implementing autocompletion for karmadactl
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-20 09:42:40 +08:00
zhzhuang-zju d351e3dc72 add commandGroup annotation to ctl command
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-04 16:47:38 +08:00
Michael Grosser 13f0f6e6d8
add karmada.io/system label to created execution namespaces
Signed-off-by: Michael Grosser <michael@grosser.it>
2024-07-25 07:48:49 -07:00
Lan Liang 5a4539d404 migrate wait.PollImmediate to wait.PollUntilContextTimeout.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-05-22 05:51:49 +00:00
karmada-bot 774a2b1366
Merge pull request #4934 from zhzhuang-zju/G107
silence gosec warning G107
2024-05-20 10:05:23 +08:00
zhzhuang-zju 9960261c17 silence gosec warning G107
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-05-13 10:09:14 +08:00
zhzhuang-zju 309c67701b bump golangci to v1.58.0
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-05-13 09:32:13 +08:00
jwcesign 38b2cae7e1 cleanup: enable revive(exported rule) checking
Signed-off-by: jwcesign <jwcesign@gmail.com>
2024-01-09 09:41:47 +08:00
Lan Liang 59cd00d942 Cleanup: enable lint of revive(superfluous-else)
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-01-02 08:35:42 +00:00
Zhizhen He 25a62c6c57
fix typo
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-12-17 16:12:03 +08:00
zhy76 adef1e5974 feat: add license and verify license for code file
Signed-off-by: zhy76 <958474674@qq.com>
2023-11-16 11:11:21 +08:00
zhzhuang-zju db09a25821 add cluster flags for karmadactl top pod
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2023-11-14 17:36:50 +08:00
whitewindmills c8423cb237 fix spelling errors
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2023-09-04 10:22:39 +08:00
whitewindmills 89295f9606 Fix inspection errors
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2023-05-17 17:06:27 +08:00
lonelyCZ 59ef6279f3 Support to run karmadactl init within a pod
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2023-03-29 10:53:46 +08:00
xin.li 662be91548 feat: add param of force for addon disable
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-03-20 10:02:16 +08:00
huangyanfeng fd062cecab check deployment statefulset rollout not use check pod ready
Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
2023-03-16 16:39:43 +08:00
lonelyCZ 8b67d22786 Fix UpdateOrCreateToken get secrets err handling optimization
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2023-02-15 21:26:38 +08:00
Fish-pro 108afef91b Clean up the problem of repeated package import
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-09 15:58:22 +08:00
karmada-bot 051a0b35ee
Merge pull request #3041 from helen-frank/feature/UseUtilsEnvGetString
use k8s.io/utils/env GetString get env
2023-01-13 10:15:05 +08:00
helen cc759c6706 when UpdateOrCreateToken get secrets, if the error is not a NotFound, the error is thrown in time.
Signed-off-by: helen <haitao.zhang@daocloud.io>
2023-01-12 20:58:49 +08:00
helen d9aca2f458 use k8s.io/utils/env GetString get env
Signed-off-by: helen <haitao.zhang@daocloud.io>
2023-01-11 01:14:25 +08:00
Fish-pro 92c0f9c962 Use errors.Is to check for a specific error
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-01-03 09:44:51 +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
karmada-bot e6ba531a73
Merge pull request #2881 from ikaven1024/ut-interpret
[UT] add ut for interpret command
2022-12-07 10:29:18 +08:00
yingjinhui 36bc23183b ut for interpret command
Signed-off-by: yingjinhui <yingjinhui@didiglobal.com>
2022-12-06 12:30:44 +08:00
chen zechun 3c80772667 Modify error comparison
Signed-off-by: chen zechun <zechun.chen@daocloud.io>
2022-11-30 21:02:59 +08:00
yingjinhui 4a37e9ce91 add execute mode for karmadactl interpret subcommand
Signed-off-by: yingjinhui <yingjinhui@didiglobal.com>
2022-11-28 14:26:36 +08:00
lonelyCZ d398d630f4 Fix karmadactl register failed to read kubeconfig file
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-24 14:35:14 +08:00
jwcesign 2c3141980e Add more logs and delete some redundant code
Signed-off-by: jwcesign <jiangwei115@huawei.com>
2022-11-23 16:12:13 +08:00
cleverhu e1e1616197 unify namespace and name style
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-11-19 23:42:01 +08:00
lonelyCZ a239d538d1 Fix MutatingWebhookConfig and ValidateWebhookConfig aren't updated
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-18 20:30:20 +08:00
cleverhu 47117a27c1 optimize initAPIService
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-11-17 14:39:36 +08:00
karmada-bot a16710a94e
Merge pull request #2790 from lonelyCZ/pr-fix-idempotency
Fix some call errors of `idempotency.go`
2022-11-16 15:23:59 +08:00
lonelyCZ 3dd4f3a97b Fix some call errors of idempotency.go
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-16 11:22:40 +08:00
helen 3950562360 Karmadactl init use idempotency acceleration
Signed-off-by: helen <haitao.zhang@daocloud.io>
2022-11-14 18:10:26 +08:00
cleverhu 9b1baeb1d7 fix namespace already exist
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-11-09 10:15:52 +08:00
lonelyCZ 3dc11037cc karmadactl join/unjoin use factory to access control plane
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-07 16:02:45 +08:00
宋文杰 39e4b34fe8 karmadactl token:print correct register command according to the karmada-context flag
Signed-off-by: 宋文杰 <wenjie.song@daocloud.io>
2022-11-03 14:45:29 +08:00
lonelyCZ 0b535a4d12 Fix and unify CreateOrUpdateXXX functions for karmadactl
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-01 20:50:33 +08:00