Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: support getting CLI-created clusters on apiserver #3866

Merged
merged 1 commit into from
May 12, 2022

Conversation

Somefive
Copy link
Collaborator

@Somefive Somefive commented May 11, 2022

Description of your changes

This PR extends the Get/List interface for clusters in apiserver. The Get/List interface will search the cluster in control plane and match the data in apiserver datastore, which will allow users to see clusters created by CLI on VelaUX.

When Get request happens, the retrieved cluster from CLI will also be synced to apiserver database.

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.

This PR depends on #3849

How has this code been tested

Special notes for your reviewer

@Somefive Somefive changed the title Apiserver/cluster Feat: support getting CLI-created clusters on apiserver May 11, 2022
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #3866 (e34b86a) into master (a8ad79b) will decrease coverage by 0.04%.
The diff coverage is 78.57%.

❗ Current head e34b86a differs from pull request most recent head f0eb4c6. Consider uploading reports for the commit f0eb4c6 to get more accurate results

@@            Coverage Diff             @@
##           master    #3866      +/-   ##
==========================================
- Coverage   64.14%   64.09%   -0.05%     
==========================================
  Files         312      312              
  Lines       29717    29762      +45     
==========================================
+ Hits        19061    19077      +16     
- Misses       8205     8222      +17     
- Partials     2451     2463      +12     
Flag Coverage Δ
apiserver-unittests 35.23% <55.71%> (+0.11%) ⬆️
core-unittests 56.70% <78.26%> (-0.05%) ⬇️
e2e-multicluster-test 26.49% <52.17%> (+0.05%) ⬆️
e2e-rollout-tests 23.53% <4.34%> (-0.01%) ⬇️
e2etests 31.11% <4.34%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/multicluster/cluster_management.go 38.93% <33.33%> (ø)
pkg/multicluster/utils.go 66.66% <66.66%> (ø)
pkg/apiserver/rest/usecase/cluster.go 41.20% <74.46%> (+5.22%) ⬆️
pkg/multicluster/virtual_cluster.go 92.68% <100.00%> (-0.82%) ⬇️
pkg/resourcetracker/tree.go 73.68% <100.00%> (ø)
pkg/utils/common/common.go 48.06% <100.00%> (ø)
pkg/multicluster/cluster_metrics_management.go 89.58% <0.00%> (-4.17%) ⬇️
pkg/cue/definition/template.go 63.22% <0.00%> (-2.07%) ⬇️
pkg/resourcekeeper/gc.go 76.30% <0.00%> (-1.90%) ⬇️
...dev/v1alpha2/application/application_controller.go 83.63% <0.00%> (-1.82%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8ad79b...f0eb4c6. Read the comment docs.

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Copy link
Collaborator

@barnettZQG barnettZQG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@barnettZQG barnettZQG merged commit 0d3d75f into kubevela:master May 12, 2022
@Somefive Somefive mentioned this pull request May 23, 2022
3 tasks
@Somefive Somefive deleted the apiserver/cluster branch June 20, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants