Skip to content

support new eflo instance#877

Merged
BSWANG merged 7 commits intoAliyunContainerService:mainfrom
l1b0k:feat/eni
Aug 29, 2025
Merged

support new eflo instance#877
BSWANG merged 7 commits intoAliyunContainerService:mainfrom
l1b0k:feat/eni

Conversation

@l1b0k
Copy link
Collaborator

@l1b0k l1b0k commented Aug 28, 2025

No description provided.

l1b0k added 2 commits August 28, 2025 22:56
- 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>
@l1b0k l1b0k requested a review from BSWANG August 28, 2025 15:04
@BSWANG BSWANG requested a review from Copilot August 29, 2025 01:34
Copy link

Copilot AI left a 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 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.

@l1b0k l1b0k force-pushed the feat/eni branch 2 times, most recently from 0f5fdca to fad78b6 Compare August 29, 2025 08:53
l1b0k and others added 5 commits August 29, 2025 18:41
- 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>
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
Copy link

codecov bot commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 45.50265% with 206 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.71%. Comparing base (7699b01) to head (a6219fb).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
pkg/aliyun/client/eflo_control.go 0.00% 71 Missing ⚠️
pkg/aliyun/client/options.go 0.00% 24 Missing ⚠️
pkg/controller/node/node.go 68.83% 17 Missing and 7 partials ⚠️
pkg/controller/pod/pod_controller.go 58.69% 16 Missing and 3 partials ⚠️
pkg/aliyun/client/limit.go 65.95% 10 Missing and 6 partials ⚠️
pkg/controller/pod-eni/eni_controller.go 58.82% 10 Missing and 4 partials ⚠️
plugin/driver/vf/vf.go 70.21% 14 Missing ⚠️
plugin/terway/cni_linux.go 0.00% 11 Missing ⚠️
pkg/aliyun/client/api_facade.go 0.00% 6 Missing ⚠️
plugin/terway/cni.go 0.00% 5 Missing ⚠️
... and 2 more
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     
Flag Coverage Δ
unittests 46.71% <45.50%> (+0.80%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BSWANG BSWANG merged commit 2cbb868 into AliyunContainerService:main Aug 29, 2025
8 of 9 checks passed
@l1b0k l1b0k deleted the feat/eni branch August 31, 2025 13:00
cursor bot pushed a commit that referenced this pull request Sep 7, 2025
support new eflo instance
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.

3 participants