Skip to content

Conversation

@SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Jul 21, 2025

No description provided.

@github-actions
Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

coveralls commented Jul 21, 2025

Pull Request Test Coverage Report for Build 19530595480

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 62.13%

Files with Coverage Reduction New Missed Lines %
pkg/daemon/daemon.go 2 45.66%
controllers/helper.go 3 70.23%
Totals Coverage Status
Change from base Build 19406283464: -0.03%
Covered Lines: 8769
Relevant Lines: 14114

💛 - Coveralls

@SchSeba
Copy link
Collaborator Author

SchSeba commented Sep 8, 2025

Hi @zeeke @e0ne @adrianchiris please help move this one forward it's a critical feature I would like to get in as soon as possible.

Thanks!

- **Comprehensive Testing**: Includes extensive unit tests with mocked HTTP calls
- **Error Handling**: Robust error handling for metadata service failures

This approach makes the SR-IOV Network Operator truly platform-agnostic while maintaining clean, maintainable code. No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: not really related to design doc


### Use Cases

1. **Multi-Platform Support**: Enable the operator to run efficiently on different infrastructure platforms (bare metal, OpenStack, AWS,Oracle, etc.) with platform-specific optimizations
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think this is the only use-case here no ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I left both the platform and the orchestration as use-cases

### Goals

* Create a clean abstraction layer that separates platform-specific logic from orchestrator-specific logic
* Implement support for bare metal and OpenStack platforms
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is already implemented, you mean re-implement support for these platforms using the defined abstraction ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, I changed it


* Create a clean abstraction layer that separates platform-specific logic from orchestrator-specific logic
* Implement support for bare metal and OpenStack platforms
* Implement support for Kubernetes and OpenShift orchestrators
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

### Non-Goals

* Support all possible infrastructure platforms in the initial implementation
* Change existing API structures or user-facing interfaces
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does it mean ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no CRD changes neeeded. I updated to make it more clear.

ClusterType() consts.ClusterType
Flavor() consts.ClusterFlavor
BeforeDrainNode(context.Context, *corev1.Node) (bool, error)
AfterCompleteDrainNode(context.Context, *corev1.Node) (bool, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: to be symmetric with BeforeDrainNode lets use AfterDrainNode

Copy link
Collaborator Author

@SchSeba SchSeba Sep 25, 2025

Choose a reason for hiding this comment

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

the problem with AfterDrainNode that it shound like after the operator finish to drain a node.

but that case is for after the operator finish to release a node from a drain(uncordon)

I changed the function names let me know what you think about the new name


### Upgrade & Downgrade considerations

The abstraction layer is designed to be backward compatible. Existing configurations and behaviors are preserved, with the abstraction layer providing the same functionality through the new interface structure.
Copy link
Collaborator

Choose a reason for hiding this comment

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

first sentence is irrelevant IMO.


#### Factory Pattern

Both platform and orchestrator use factory patterns for instantiation:
Copy link
Collaborator

Choose a reason for hiding this comment

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

facilitating easy extentions for new implementations

```golang
type Interface interface {
Init() error
GetHostHelpers() helper.HostHelpersInterface
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you have a usecase for different HostHelpersInterface implementations ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nope I just use that so the daemon can request the hostHelpers and I don't need to initiate it again and again in the code

@SchSeba SchSeba force-pushed the platform_and_orchestrator_packages_design branch from adf2583 to d12edf3 Compare September 25, 2025 08:50
@SchSeba
Copy link
Collaborator Author

SchSeba commented Sep 25, 2025

Hi @adrianchiris when you have time please take another look :)

@SchSeba
Copy link
Collaborator Author

SchSeba commented Oct 19, 2025

ping @zeeke @adrianchiris :)

@SchSeba SchSeba force-pushed the platform_and_orchestrator_packages_design branch from d12edf3 to c7d1ef9 Compare November 16, 2025 10:15
@github-actions github-actions bot added the docs label Nov 16, 2025
@SchSeba
Copy link
Collaborator Author

SchSeba commented Nov 16, 2025

Hi @e0ne @adrianchiris I updated the design based on the actual implementation we just merged.

please take a look when you have time :)

Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

lgtm

@SchSeba SchSeba force-pushed the platform_and_orchestrator_packages_design branch from c7d1ef9 to 48fb9f2 Compare November 20, 2025 08:34
@SchSeba
Copy link
Collaborator Author

SchSeba commented Nov 20, 2025

Merging this one

@SchSeba SchSeba merged commit 811252c into k8snetworkplumbingwg:master Nov 20, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants