-
Notifications
You must be signed in to change notification settings - Fork 33
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 the structure of the global hub agent #1156
Merged
openshift-merge-bot
merged 13 commits into
stolostron:main
from
yanmxa:br_agent_refactor
Oct 15, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9c61303
spec
yanmxa a8421c5
fix the integration test
yanmxa e78b07f
fix the ut
yanmxa fc3f963
fix the sonar
yanmxa c82e9d9
fix the sonar
yanmxa 0f19755
build error for konflex
yanmxa 2b6d533
inventory controller
yanmxa 5f5d6d4
fix the e2e build
yanmxa 64b98e1
remove replciate
yanmxa 470dec6
rebase
yanmxa b06e2d2
rebase build
yanmxa d865212
fix ut
yanmxa 00cf4d4
add version
yanmxa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Multicluster Global Hub Agent | ||
|
||
The **Global Hub Agent** component is responsible for applying resources to the hub cluster (spec path) and reporting the resource status to the Global Hub Manager via Kafka. It also synchronizes events with the Inventory API (status path). Additionally, the agent can be run in [standalone mode](./../doc/event-exporter/README.md), which only enables the status path feature. | ||
|
||
## Structure | ||
|
||
- **agent** | ||
- **cmd**: Command-line utilities for the agent. | ||
- **pkg**: Contains the core logic and functionalities. | ||
- **configs**: Holds configurations, schemas, and related assets. | ||
- **controllers**: Common controllers, including initialization, cluster claim, and lease controllers. | ||
- **inventory**: The controllers that report resources via the inventory API. | ||
- **spec**: | ||
- **rbac**: Manages role-based access control. | ||
- **syncers**: Syncs resources and signals from the Global Hub Manager. | ||
- **workers**: Backend goroutines that execute tasks received from the spec syncers. | ||
- **status**: | ||
- **filter**: Deduplicates events when reporting resource statuses. | ||
- **generic**: Common implementations for the status syncer. | ||
- **controller**: Specifies the types of resources to be synced. | ||
- **handler**: Updates the bundle synced to the manager by the watched resources. | ||
- **emitter**: Sends the bundle created/updated by the handler to the transport layer (e.g., via CloudEvents). | ||
- **multi-event syncer**: A template for sending multiple events related to a single object, such as the policy syncer. | ||
- **multi-object syncer**: A template for sending one event related to multiple objects, such as the managedhub info syncer. | ||
- **interfaces**: Defines the behaviors for the Controller, Handler, and Emitter. | ||
- **syncers**: Specifies the resources to be synced, following templates provided by the generic syncers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Need to update the downstream for this change