support new eflo instance#877
Conversation
- Update golang image from 1.24.4 to 1.25.0 in Terway Dockerfile - Update golang image from 1.24.4 to 1.25.0 in Terway control plane Dockerfile Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Implement DescribeNodeType method in EFLOControlService- Add corresponding mock function to EFLOControl interface - Update OpenAPI mock to include GetEFLOControl method- Refactor DescribeNodeResponse to use string instead of *string - Add new DescribeNodeTypeResponse struct Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new EFLO instance type by implementing ENO (Elastic Network Optimization) functionality and enhancing the existing infrastructure to handle different API backends.
Key changes include:
- Addition of new VfType enum to support different virtual function types (Default, VPC, ENO)
- Implementation of EFLO controller client for advanced node type detection and configuration
- Enhanced node controller logic to determine appropriate API backend based on node capabilities
Reviewed Changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| types/k8s.go | Adds API type constants for ECS and ENO backends |
| rpc/*.proto/pb.go | Introduces VfType enum and updates protobuf definitions |
| plugin/driver/vf/*.go | Enhances VF driver setup with autoprobe detection and driver override logic |
| plugin/terway/cni*.go | Updates CNI plugin to handle different VF types during network setup |
| pkg/eni/remote*.go | Adds VfType mapping logic based on ENO API annotations |
| pkg/controller/pod/*.go | Implements ENO API annotation propagation and backend selection |
| pkg/controller/pod-eni/*.go | Adds ECS high-density mode support with special trunk handling |
| pkg/controller/node/*.go | Implements comprehensive node capability detection and API backend selection |
| pkg/aliyun/client/*.go | Adds EFLO controller client with node type querying capabilities |
| tests/eflo/*.go | Updates integration tests for new API backends |
Comments suppressed due to low confidence (2)
go.mod:1
- Go version 1.25.0 does not exist. The latest stable Go version is 1.23.x. Please use a valid Go version.
module github.com/AliyunContainerService/terway
plugin/driver/vf/vf.go:1
- The warning message 'Warning: failed to check sriov_drivers_autoprobe for PF' should use a proper log level like Warn instead of Info, and should be more descriptive about the fallback behavior.
package vf
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
0f5fdca to
fad78b6
Compare
- Implement new logic to handle EFLO nodes with exclusive ENI mode - Add support for ECS High Density ENI configuration - Update node and pod controllers to manage EFLO nodes- Modify ENI controller to handle different API modes - Introduce new constants for ENO API types Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Refactor the GetLimit function to address potential deadlocks and improve error handling - Optimize the use of cache to reduce redundant API calls - Enhance the function's robustness by adding better error messages and checks Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
https://github.com/torvalds/linux/blob/07d9df80082b8d1f37e05658371b087cb6738770/drivers/pci/pci-driver.c\#L423 Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Add vfType parameter to prepareVF function - Implement support for VfTypeDefault and VfTypeVPC - Return error for unsupported vf types - Update function signature and logic in cni.go and cni_linux.go Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #877 +/- ##
==========================================
+ Coverage 45.90% 46.71% +0.80%
==========================================
Files 131 132 +1
Lines 19169 19447 +278
==========================================
+ Hits 8800 9084 +284
+ Misses 9445 9433 -12
- Partials 924 930 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.