-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: support kubernetes as a backend engine #1340
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Kubernetes as a backend engine for Dubbo Admin, enabling pod-to-instance resource mapping through client-go's list-watch mechanism. The implementation transforms Kubernetes pods into RuntimeInstanceResources and maintains InstanceResource linkage via event-driven updates.
Key Changes
- Introduced Kubernetes engine with pod list-watcher that transforms pods to RuntimeInstanceResources
- Implemented event subscriber pattern to sync RuntimeInstance changes with Instance resources
- Refactored component ordering system and runtime startup to support concurrent component execution
Reviewed Changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/engine/kubernetes/factory.go | New factory for creating Kubernetes list-watchers with kubeconfig support |
| pkg/engine/kubernetes/engine.go | Pod list-watcher implementation with transformation logic for RuntimeInstance |
| pkg/core/engine/subscriber/runtime_instance.go | Event subscriber that syncs RuntimeInstance to Instance resources |
| pkg/core/engine/component.go | Enhanced engine component with subscriber initialization |
| pkg/core/events/eventbus.go | Refactored subscription to use Subscriber interface |
| pkg/core/runtime/runtime.go | Changed component startup to concurrent execution with reversed ordering |
| pkg/config/engine/config.go | Extended configuration with Kubernetes-specific properties |
| api/mesh/v1alpha1/runtime_instance.proto | Enhanced RuntimeInstance with workload, node, probe, and condition fields |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 51 out of 51 changed files in this pull request and generated 7 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 51 out of 51 changed files in this pull request and generated 7 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|



Please provide a description of this PR:
Using client-go to do list-watch to kubernetes and transformed the pod into admin
RuntimeInstanceResourrce, during the event processing, complete the linkage update of theInstanceResourceTo help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.