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

Refactor dashboard #41

Merged
merged 19 commits into from
Jun 12, 2024
Merged

Conversation

warjiang
Copy link
Contributor

@warjiang warjiang commented May 16, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:
review whether current implementation works as expected, make more suggestion and feedback

Which issue(s) this PR fixes:
Fixes #
None

Special notes for your reviewer:
@RainbowMango
@samzong

Does this PR introduce a user-facing change?:

- brand new structure for dashboard, including backend and frontend.
- management of clusters, including accessing new cluster、remove cluster from karmada contro-plane
- management of propagationpolicy, including create、delete、update propagationpolicy
- management of namepace, including create、delete namespace, support annotation of `skipAutoPropagation`
- management of workload  partially(only deployment now)
- new docs, including todos.md for recoding process of refactor,  DEVELOPMENT.md for new developers, meanwhile a user-guide for beginners, which will implement the quickstart tutorial mentioned on the karmada website

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. labels May 16, 2024
@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 16, 2024
@karmada-bot karmada-bot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label May 16, 2024
@RainbowMango
Copy link
Member

/assign
Is there a document or guide for people to test it?

@warjiang warjiang changed the title Refactor/dashboard WIP: Refactor/dashboard May 17, 2024
@karmada-bot karmada-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 17, 2024
@warjiang
Copy link
Contributor Author

Currently there is no guide for user, only one development guide. I've made this PR in WIP status, and user guide will be finished soon.

@RainbowMango
Copy link
Member

Oh, right, please cc me once it is ready for review.

Thanks for your hard work! Take care!

@RainbowMango
Copy link
Member

This comment is just for testing the new Prowbot, regarding to karmada-io/karmada#4637.

/priority important-soon

@karmada-bot karmada-bot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label May 23, 2024
@warjiang warjiang force-pushed the refactor/dashboard branch 2 times, most recently from 7424c54 to 961f5b6 Compare May 28, 2024 04:13
@warjiang
Copy link
Contributor Author

Oh, right, please cc me once it is ready for review.

Thanks for your hard work! Take care!

@RainbowMango hi, the ugly doc is comming 🤣 (The shell scripts only tested on debian12)

I've made a very simple user-guide(follow the link to have a preview version ) which do the same thing like karmada quickstart but all operations are finished in karmada dashboard. The new dashboard still have many works to do till now todos of dashboard .
Currently I've already finished overview of karmada,management of cluster、propagationpolicy and part of multicloud resource(like namespace、 deployment of workload). What need to note is that, I directly used the editor instead of forms in current implementation, but it will be gradually improved in subsequent iterations.

@RainbowMango
Copy link
Member

Just tried as per the linked user-guide, it looks great! Thanks you!
I can contribute to this user-guide as well after this PR, such as we probably need to forward the traffic from the machine to kind-cluster. Here is what we I did:

-bash-5.0# kubectl port-forward -n karmada-system services/karmada-dashboard-web --address 0.0.0.0 8000:8000
Forwarding from 0.0.0.0:8000 -> 8000
Handling connection for 8000
Handling connection for 8000
Handling connection for 8000

@RainbowMango
Copy link
Member

/retitle Refactor dashboard

@warjiang Seems we are ready to go?
Let me know if you are going to tidy your commits such as group them to meaningful commits.

@karmada-bot karmada-bot changed the title WIP: Refactor/dashboard Refactor dashboard Jun 5, 2024
@karmada-bot karmada-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 5, 2024
@warjiang
Copy link
Contributor Author

warjiang commented Jun 5, 2024

Just tried as per the linked user-guide, it looks great! Thanks you! I can contribute to this user-guide as well after this PR, such as we probably need to forward the traffic from the machine to kind-cluster. Here is what we I did:

-bash-5.0# kubectl port-forward -n karmada-system services/karmada-dashboard-web --address 0.0.0.0 8000:8000
Forwarding from 0.0.0.0:8000 -> 8000
Handling connection for 8000
Handling connection for 8000
Handling connection for 8000

Yeah, it seems that we do the same thing without any communication before 😆 . Maybe we should provide alternative ways for end-users, like ingress、nodeport or use port-forward as you metioned above.

@warjiang
Copy link
Contributor Author

warjiang commented Jun 5, 2024

/retitle Refactor dashboard

@warjiang Seems we are ready to go? Let me know if you are going to tidy your commits such as group them to meaningful commits.

I will rebase these commits this week.

@RainbowMango
Copy link
Member

Maybe we should provide alternative ways for end-users, like ingress、nodeport or use port-forward as you metioned above.

Yeah, we can talk about it after this PR.
The first thing we should decide is should we expose the dashboard by default, by leveraging ingress or node port.

In addition, Port-forward seems dedicated to developers who are using kind to host the dashboard. We just need to document it.

@RainbowMango
Copy link
Member

also cc @samzong

@karmada-bot karmada-bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jun 12, 2024
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jun 12, 2024
Signed-off-by: warjiang <1096409085@qq.com>

- add scripts for start minimal development clusters
- add ops scripts for dump and load docker images
- add artifacts fold from karmada main repo
Signed-off-by: warjiang <1096409085@qq.com>

- init backend(dashboard-api) project
- use cobra start main process of gin
- add client for kubernetes and karmada apiserver
- add environment pkg
- add support for generate rest.Config and kubeclient.Clientset according to kubeconfig content
- add ops for cluster resources
- ref pkgs(common,dataselect) from kubernetes/dashboard project
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>

- unstructrued data api is used for get/patch/delete k8s resources
Signed-off-by: warjiang <1096409085@qq.com>

- pkg for event resources
- api for deployments
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>

- ui for namespace management
- api for namespace management
- add samber/lo dependency
Signed-off-by: warjiang <1096409085@qq.com>

- ui for workload(deployment) management
- api for workload(deployment) management
- implemented groupVersionResourceFromUnstructured in verber.go
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>

- add kubernetes raw manifest for dashboard-api & web
- add helm charts
- add build target for dashboard-api & web
- some updates in .gitignore
Signed-off-by: warjiang <1096409085@qq.com>

- ui for cluster management
- api for cluster management
- clean code like rm unused import in ui and distinguish dev and prod mode in vite
- some ui improvement
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>

- add ci workflow, when pushing specific branches will invoke ci workflow
- update pnpm-lock
Signed-off-by: warjiang <1096409085@qq.com>

- ui for auth
- api for auth
- upgrade antd dependency in ui repo
Signed-off-by: warjiang <1096409085@qq.com>

- ui for overview
- api for overview
- typo error fix and add InClusterConfig for host cluster
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>
Signed-off-by: warjiang <1096409085@qq.com>
@warjiang
Copy link
Contributor Author

/retitle Refactor dashboard
@warjiang Seems we are ready to go? Let me know if you are going to tidy your commits such as group them to meaningful commits.

I will rebase these commits this week.

@RainbowMango Rebasing git commits and replacing personal info with karmada org info already done.

@RainbowMango
Copy link
Member

Here we go!
/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 12, 2024
@karmada-bot karmada-bot merged commit 71472ca into karmada-io:main Jun 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants