Conversation
135c312 to
b35a790
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements a VNIC rule transfer feature that adds infrastructure to sync Tower VM NIC (VNIC) configurations and create corresponding Kubernetes Rule resources. The implementation includes a controller that watches Tower VNIC events and manages Rule CRDs based on DPI enablement status.
- Adds Tower client integration for querying VNIC data
- Creates a controller that syncs VNIC configurations to Kubernetes Rules
- Updates API types to use simplified
Optionstructure for Tower VM references
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/tower/datamodel/ | Defines Tower API data models for VNIC and common interfaces |
| pkg/tower/client/ | Implements Tower GraphQL client with authentication and change watching |
| pkg/controller/vnic/ | Contains the main controller logic and helper functions for VNIC-to-Rule conversion |
| api/trafficredirect/v1alpha1/ | Updates Rule CRD structure replacing TowerOption with simplified Option |
| pkg/config/config.go | Adds Tower configuration parameters |
| cmd/controller/main.go | Integrates the new VNIC controller into the application |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "github.com/everoute/trafficredirect/pkg/tower/client" | ||
| ) | ||
|
|
||
| // mockStatusWriter 实现 client.StatusWriter 接口 |
There was a problem hiding this comment.
The comment contains Chinese text that should be in English: '实现 client.StatusWriter 接口' should be 'implements client.StatusWriter interface'.
| // mockStatusWriter 实现 client.StatusWriter 接口 | |
| // mockStatusWriter implements client.StatusWriter interface |
| return nil | ||
| } | ||
|
|
||
| // 辅助函数:创建测试用的 Rule 对象 |
There was a problem hiding this comment.
The comment contains Chinese text that should be in English: '辅助函数:创建测试用的 Rule 对象' should be 'Helper function: create test Rule object'.
| // 辅助函数:创建测试用的 Rule 对象 | |
| // Helper function: create test Rule object |
6942079 to
4279e84
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
4279e84 to
6f2ae08
Compare
6f2ae08 to
945bc27
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // 验证 ingress rule | ||
| ingressKey := types.NamespacedName{ |
There was a problem hiding this comment.
The comment contains Chinese characters. It should be in English: '// Verify ingress rule'
No description provided.