Commit Graph

313 Commits

Author SHA1 Message Date
Garrybest b1de17b3d7 block start in cluster health monitor
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-07-01 10:41:45 +08:00
lihanbo a7f950766a resolve the 'AlreadyExist' conflicts in a 'Create' process
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-07-01 08:54:06 +08:00
RainbowMango 831ac18b18 Added mcs API schemes
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-06-28 09:54:56 +08:00
changzhen 47bb9b04d0 Cleanup cyclomatic complexity with function retainServiceFields
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-06-28 09:49:26 +08:00
karmada-bot e1db428290
Merge pull request #454 from Garrybest/cluster-lifecycle
monitor cluster health in cluster_controller
2021-06-28 09:18:12 +08:00
Garrybest d434a4d57e monitor cluster health in cluster_controller
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-27 16:43:29 +08:00
lihanbo f45147a9ce adopt applying manifest to member cluster when resource with the same name and kind already exists
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-06-26 16:25:10 +08:00
karmada-bot d982bea021
Merge pull request #468 from pigletfly/fix-sync-work
Fix sync work status
2021-06-25 21:51:09 +08:00
shinytang6 3ad39af5cd fix(controller): rm sub-resources from cluster api enablement list
Signed-off-by: shinytang6 <1074461480@qq.com>
2021-06-24 21:06:09 +08:00
pigletfly 46e587e5ad Fix sync work status
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2021-06-24 16:44:53 +08:00
karmada-bot c053b6c8b3
Merge pull request #462 from vincent-pli/extend-cluster-status
Extend cluster.status.APIEnablements.Resources to struct with Kind
2021-06-24 15:15:08 +08:00
pengli d5ee4e64cd Extend cluster.status.APIEnablements.Resources to struct with Kind
Signed-off-by: pengli <justdoit.pli@gmail.com>
2021-06-24 13:40:52 +08:00
karmada-bot 83b9682fd2
Merge pull request #456 from Garrybest/resource
add ScalarResources in cluster ResourceSummary
2021-06-23 15:56:07 +08:00
Garrybest 24ca29017e add ScalarResources into cluster
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-23 15:27:34 +08:00
RainbowMango a81c714afc Enable gocyclo static check
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-06-22 21:38:07 +08:00
karmada-bot 26b9fcb272
Merge pull request #453 from lfbear/issues-450
Change APIEnablement.Resources to an optional field
2021-06-21 15:55:16 +08:00
shinytang6 ee04a566ab fix(controller): rm useless subresource status
Signed-off-by: shinytang6 <1074461480@qq.com>
2021-06-20 21:31:06 +08:00
Garrybest e08029ade4 use meta.IsStatusConditionTrue in cluster.go
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-19 21:27:21 +08:00
lfbear 442cfa2dd4 change APIEnablement.Resources to optional
Signed-off-by: lfbear <lfbear@gmail.com>
2021-06-19 12:38:47 +08:00
karmada-bot fa3ac4888e
Merge pull request #421 from Garrybest/cluster-lifecycle-manager
add cluster lease controller
2021-06-18 17:50:12 +08:00
karmada-bot 3f99da3024
Merge pull request #442 from vincent-pli/no-informer-for-member-cluster-when-applied-faied
No informer for sync status back when k8s resource applied failed to member clusters
2021-06-18 12:51:25 +08:00
pengli b602aaf868 no informer for sync status back when k8s resource applied failed to member cluster
Signed-off-by: pengli <justdoit.pli@gmail.com>
2021-06-18 12:00:28 +08:00
karmada-bot c6000efe6b
Merge pull request #444 from Garrybest/init-container
modify pending pods resource calculation
2021-06-17 10:13:08 +08:00
Rohan Sharma cd00c7c73c Fix redundant log
Signed-off-by: Rohan Sharma <rhnsharma5113@gmail.com>
2021-06-16 20:25:31 +05:30
Garrybest b9010cfe9b add cluster lease controller
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-16 21:19:43 +08:00
Garrybest 207eb1677f add pending pods resource calculation
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-16 21:13:46 +08:00
Garrybest 7bc0d00e61 clean up cluster resource calculation
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-15 20:15:04 +08:00
Garrybest cd6ba3558f calculate ResourceSummary in new cluster API
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-15 15:03:06 +08:00
RainbowMango 17804ac550 Split listNodesAndPods function
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-06-11 17:13:42 +08:00
karmada-bot 738c148401
Merge pull request #417 from Garrybest/cluster-api
make cluster represents more precise resources
2021-06-11 16:15:02 +08:00
Garrybest 7632300761 change legacy code to adopt new cluster API
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-10 19:44:58 +08:00
Garrybest 045e4ad3cf cluster code generate
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-10 17:40:07 +08:00
Garrybest f0a59ce4de modify cluster api according to #344
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-10 17:29:03 +08:00
RainbowMango 89f3569147 Making resource selector required
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-06-10 17:15:35 +08:00
lihanbo aa4baa12a2 clean up works when resource binding has been removed
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-06-10 10:00:54 +08:00
huiwq1990 d96ac4e222 remove unused code
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2021-06-07 21:47:14 +08:00
lihanbo 280abfe468 Introduce --karmada-context flag to karmada-agent to select context in
kubeconfig file

Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-06-07 20:01:03 +08:00
karmada-bot 552e75a2b9
Merge pull request #404 from RainbowMango/pr_fix_Stringer
Change the receiver of Stringer interface implementation
2021-06-05 14:17:45 +08:00
Garrybest 0331f8c6df modify hard code in cluster_status_controller
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-04 20:51:16 +08:00
garfcat 02893e1746 fix #402 replicaschedulingpolicy does not take effect
Signed-off-by: garfcat <xiefei_mvp@163.com>
2021-06-03 20:41:57 +08:00
Garrybest 26085fcd6f feat(cluster-status-controller): use cached lister for getting node summary
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-06-03 11:54:44 +08:00
RainbowMango 0f7c9f7738 Change Stringer interface implementation from pointer receiver to value receiver.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-06-02 15:45:15 +08:00
changzhen 5473488c04 fix golangci-lint: Implicit memory aliasing in for loop(G601)
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-06-01 16:42:57 +08:00
Wang Bing 40e7a6eff9
Add kubebuilder shortName tag (#376)
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2021-05-28 11:36:21 +08:00
Hanbo Li 0122d36d82
reschedule resource bindings when reference cluster propagation policy update (#381)
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-05-28 09:32:07 +08:00
Hongcai Ren 6fa33a1071
Cleanup resource bindings when cluster propagation policy has been removed (#380)
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2021-05-27 19:11:32 +08:00
Peng Li ec97ab4089
fix issue that Scheduler do not schedule resourcebinding generated from clusterpropagationpolicy (#374)
Signed-off-by: pengli <justdoit.pli@gmail.com>
2021-05-27 15:31:11 +08:00
changzhen 4ae750b65d add UT of imageOverrider
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-05-26 18:16:44 +08:00
changzhen fa9a2ea662 ImageOverrider Implementation
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-05-26 18:16:44 +08:00
lihanbo 7e1e7b9726 add e2e test for scheduling base on cluster provider/region
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-05-25 09:11:57 +08:00
lihanbo b565cc0caa support schedule based on cluster provider/region/zone
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-05-25 09:11:57 +08:00
Iceber Gu 196c394d88
karmadactl: fix join in dry-run mode (#355)
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-05-24 10:47:00 +08:00
lihanbo 9834f8b981 add e2e test for taint toleration schedule
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-05-21 09:20:03 +08:00
lihanbo 483d5d9fa0 support schedule based on cluster taint toleration
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-05-21 09:20:03 +08:00
Rui Fang bbcf69f368
work: fix workload name conflicts (#358) (#359)
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-05-20 10:34:27 +08:00
Wang Bing 7a0d6c9b8c
Remove cluster namespace (#352)
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2021-05-18 23:42:07 +08:00
Iceber Gu 831dfe27bc
scheduler: fix the handling of the *PropatationPolicy updates (#351)
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-05-18 18:10:37 +08:00
Iceber Gu 4b5ec0c637
scheduler: fix the schedule function error return (#346)
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-05-18 00:51:31 +08:00
gy95 92c5df6c35 add linter whitespace and fix linter errors
Signed-off-by: gy95 <guoyao17@huawei.com>
2021-05-17 14:23:24 +08:00
Rui Fang f598cb4365
scheduler: fix bug of plugin invalid memory address (#341)
Signed-off-by: Garrybest <garrybest@foxmail.com>
2021-05-17 14:11:49 +08:00
yuhang 76429c6516
Fix panic when no clusters specified (#340)
Signed-off-by: futuretea <1913508671@qq.com>
2021-05-17 11:59:19 +08:00
gy95 6a2ade4512
use const string instead of string literal (#335)
Signed-off-by: gy95 <guoyao17@huawei.com>
2021-05-17 09:16:42 +08:00
gy95 d33ae3818c
fix blank lines of import packages and repeated import problems (#337)
Signed-off-by: gy95 <guoyao17@huawei.com>
2021-05-16 19:01:11 +08:00
Zhen Chang 54e198eaa9
sort OverridePolicy/ClusterOverridePolicy by name when more than one policy matched (#316)
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-05-13 16:12:44 +08:00
futuretea 39d1a3a636 Fix goimports
Signed-off-by: futuretea <1913508671@qq.com>
2021-05-13 11:31:19 +08:00
Peng Li e0f725ca2d
generate resourcebinding from clusterpropagationpolicy based on the "namespace" exist of the comming object (#315)
Signed-off-by: pengli <justdoit.pli@gmail.com>
2021-05-13 10:20:14 +08:00
Hongcai Ren 24ab1993ee
Added more clear description for override API (#318)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-05-12 20:12:07 +08:00
liufen90 d91f7868d0
support proxy (#307)
Signed-off-by: liufen90 <564795204@qq.com>
2021-05-12 10:51:15 +08:00
Zhen Chang 6a2588245d
match the first PropagationPolicy/ClusterPropagationPolicy in alphabetical order (#306)
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-05-11 11:23:38 +08:00
RainbowMango 0203c60ab7 Add image parser utils
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-05-10 09:50:26 +08:00
RainbowMango 763c2a10e7 Adopt Reconcile() method signature change
Adopt MapOjbect removing change
Adopt event handling object changes
Adopt ToRequestsFunc to MapFunc change
Adopt EnqueueRequestsFromMapFunc change
Adopt runerable interface change
Adopt using admission review version v1

Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-05-08 19:12:35 +08:00
Hongcai Ren 5652fc54c6
enable cluster proxy that karmada control plane used to talk to clusters (#302)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-05-08 10:25:56 +08:00
gy95 46de97140e remove unnecessary todo
Signed-off-by: gy95 <guoyao17@huawei.com>
2021-04-29 21:27:43 +08:00
Jackson ee4392cc19
feature: support version command for karmadactl (#285)
* feature: support version command for karmadactl

Signed-off-by: pingstar <kubeshared.com@gmail.com>
2021-04-27 17:13:26 +08:00
Hongcai Ren fe2efa6139
Retry collect cluster status in case of cluster offline. (#275)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-20 09:16:54 +08:00
Hongcai Ren 71f4ddeb81
Add --cluster-status-update-frequency flag for karmada-agent (#272)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-17 18:38:24 +08:00
Hanbo Li 28e6d3ff71
support ReplicaSchedulingPolicy (#269)
Signed-off-by: lihanbo <lihanbo2@huawei.com>
Signed-off-by: Lihanbo (Hampo <l00512446@china.huawei.com>
2021-04-15 17:37:38 +08:00
tinyma123 d4d63038ed
Modify some log details of scheduler. (#263)
Signed-off-by: mabotao <1397247577@qq.com>
2021-04-13 16:25:24 +08:00
RainbowMango 12a19ab5e5 Deal with auto-generated files.
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-13 14:57:48 +08:00
RainbowMango d870a2d85c Introduce ImageOverrider to handle image override.
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-13 14:57:48 +08:00
Hongcai Ren 9d7f6d4b0c
Add ReplicaSchedulingPolicy API. (#267)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-13 09:51:59 +08:00
Hongcai Ren fd5aeb8cf5
Introduce federated object key for refactor status clollection (#266)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-12 15:12:16 +08:00
Hongcai Ren 062fd41cb0
Cleanup status from resource template after binding object removed. (#259)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-07 10:34:44 +08:00
yangcheng-icbc c4acba97aa
update workload's labels when it's policy has been deleted (#251)
Signed-off-by: icbc-yangcheng <shineus1996@gmail.com>
2021-04-06 10:50:37 +08:00
Hanbo Li a3ebc74cde
trigger resync for override policy changes (#250)
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-04-02 17:34:04 +08:00
Hanbo Li dcad956744
optimize karmadactl unjoin command (#254)
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-04-02 10:14:07 +08:00
Hongcai Ren 3b3fde5ccd
remove useless karmada.io/executionspace label from cluster object. (#253)
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-04-01 17:08:42 +08:00
yangcheng-icbc c77304df01
PropagationPolicy and ClusterPropagationPolicy name should be no more than 63 characters (#249)
Signed-off-by: icbc-yangcheng <shineus1996@gmail.com>
2021-04-01 14:55:07 +08:00
yangcheng-icbc 3c193e1760
the binding name for any resource template should be a name-kind format (#248)
Signed-off-by: icbc-yangcheng <shineus1996@gmail.com>
2021-03-31 16:33:45 +08:00
Zhen Chang 986bcbcd29
add judgment with work label when joining binding queue (#246)
Signed-off-by: changzhen <changzhen5@huawei.com>
2021-03-31 09:24:02 +08:00
RainbowMango 4bba4df183 deprecated karmada.io/override and karmada.io/cluster-override label
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-03-30 16:13:58 +08:00
RainbowMango f1777392f9 record applied override items for work object
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-03-30 16:13:58 +08:00
lihanbo d69f65479d fix the failure of getting namespace in cluster controller
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-03-27 20:26:37 +08:00
lihanbo e7aeb332ad add e2e test for karmada agent
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-03-27 17:58:55 +08:00
RainbowMango 7448989f55 Move cluster wide key to dedicade pakage
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-03-27 16:08:24 +08:00
RainbowMango ada0dba34d minor improvement for cluster wide key
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-03-27 11:42:00 +08:00
RainbowMango 538462e74d Cleanup workload deletionTimestamp before write to work.
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-03-26 11:29:52 +08:00
RainbowMango 4696f7800d Fix non-operation update block status reflect issue
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2021-03-25 21:29:15 +08:00
Hanbo Li 65a4f32e3e
generate work name based on different resource (#232)
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-03-25 11:59:06 +08:00
Hanbo Li 59a02e0030
add karmada agent (#226)
Signed-off-by: lihanbo <lihanbo2@huawei.com>
2021-03-24 14:51:13 +08:00