Skip to content

feat(omnicontrol): add resource topology aggregation backend#387

Open
sarthakkjha wants to merge 2 commits intokarmada-io:mainfrom
sarthakkjha:omnicontrol
Open

feat(omnicontrol): add resource topology aggregation backend#387
sarthakkjha wants to merge 2 commits intokarmada-io:mainfrom
sarthakkjha:omnicontrol

Conversation

@sarthakkjha
Copy link

/kind feature

What this PR does / why we need it:
Adds initial backend support for discovering relationships between
control plane resources in Karmada Dashboard, as groundwork for the
OmniControl feature.

Currently, users cannot easily trace how a resource template results
in associated Policy, ResourceBinding, and Work objects. This PR
introduces a new package, pkg/resource/omnicontrol, which aggregates
these related objects into a single ResourceTopology structure.

Which issue(s) this PR fixes:
Related to #227

Special notes for your reviewer:
This is a Phase 1 backend contribution as part of the LFX OmniControl project;
feedback on the API shape and approach is very welcome.

Does this PR introduce a user-facing change?:

NONE

@gemini-code-assist
Copy link

Summary of Changes

Hello @sarthakkjha, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes the foundational backend for the OmniControl feature in Karmada Dashboard. It introduces a new package designed to aggregate and visualize the complex propagation paths of resources, starting with Deployments. This enhancement aims to provide users with a clear understanding of how resources are distributed across clusters and to aid in identifying propagation issues.

Highlights

  • New omnicontrol Package: A new Go package, pkg/resource/omnicontrol, has been introduced to provide backend support for unified resource topology visualization in the Karmada Dashboard.
  • Resource Topology Aggregation: The core functionality includes the GetDeploymentTopology function, which aggregates a Kubernetes Deployment with its associated Karmada ResourceBinding, PropagationPolicy, and Work objects into a single ResourceTopology structure.
  • Documentation and Types: A README.md file has been added to document the package's purpose, usage, and current Proof-of-Concept (PoC) status. New types ResourceTopology and ClusterStatus are defined to represent the aggregated resource relationships and cluster-specific synchronization states.
  • Initial Deployment Support: The current implementation focuses specifically on tracing the propagation path for Deployment resources, laying the groundwork for broader resource type support in the future.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new backend package, omnicontrol, for resource topology aggregation, which is a great initiative for improving observability in Karmada Dashboard. The initial implementation for Deployments is a solid starting point. My review includes suggestions to improve robustness, adhere to best practices like context propagation, enhance logging for better debuggability, and increase test coverage. I've also pointed out a potential improvement in the API shape of the ResourceTopology struct to better reflect the relationships between resources.

Signed-off-by: Sarthak Jha <sarthak@Sarthaks-MacBook-Air.local>
Signed-off-by: Sarthak Jha <sarthak@Sarthaks-MacBook-Air.local>
@sarthakkjha
Copy link
Author

sarthakkjha commented Jan 26, 2026

Hi @warjiang @RainbowMango, I have added initial backend support for the resource topology (OmniControl) dashboard in this PR. Can you please review this and let me know if we are moving in the right direction?

@warjiang
Copy link
Contributor

@sarthakkjha 🆒 thanks for your contribution, sorry for late response, and I'll check your implementation later.
/assign

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.

2 participants