Skip to content
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 and updates #22

Merged
merged 12 commits into from
May 8, 2023
Merged

Conversation

Eoghan1232
Copy link
Collaborator

@Eoghan1232 Eoghan1232 commented Jan 24, 2023

  • Update README
  • Update to go1.18
  • Update to k8s v1.25.5
  • Reworked vfstats collector
  • Implemented endpoint unit tests
  • Add netlink support detection
  • Add image building to Makefile
  • Remove deprecated references
  • Add Mellanox driver to drivers DB
  • Refactor code to enable testing
  • Support for NFD SR-IOV feature label
  • Changes to ensure more uniform Makefile
  • Implemented initial unit tests
  • Implemented vfstats package unit tests

signed off: [email protected] & [email protected]

@Eoghan1232 Eoghan1232 requested a review from SchSeba January 24, 2023 10:19
@Eoghan1232
Copy link
Collaborator Author

@SchSeba PTAL :)

Eoghan1232 pushed a commit to Eoghan1232/sriov-network-metrics-exporter that referenced this pull request Jan 31, 2023
@Eoghan1232 Eoghan1232 requested a review from nhennigan January 31, 2023 16:08
@Eoghan1232
Copy link
Collaborator Author

@SchSeba PTAL :)
I have added back in the separate commits (mostly)
hope this makes it easier to review!

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cmd/sriov-network-metrics-exporter_test.go Show resolved Hide resolved
Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

initial review I am going to run this in my cluster also

README.md Outdated Show resolved Hide resolved
README.md Outdated
@@ -6,11 +6,14 @@ The SR-IOV Network Metrics Exporter is designed with the Kubernetes SR-IOV stack
**This software is a pre-production alpha version and should not be deployed to production servers.**

## Hardware support
The default netlink implementation for Virtual Function telemetry relies on driver support and a kernel version of 4.4 or higher. This version requires i40e driver of 2.11+ for Intel® 700 series NICs. Updated i40e drivers can be fould at the [Intel Download Center](https://downloadcenter.intel.com/download/24411/Intel-Network-Adapter-Driver-for-PCIe-40-Gigabit-Ethernet-Network-Connections-under-Linux-?v=t)
The sysfs collector for Virtual Function telemetry supports NICs with drivers that implement the SR-IOV sysfs management interface e.g. i40e, mlnx_en and mlnx_ofed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you change the mlx to mlx5_core

Copy link
Collaborator Author

@Eoghan1232 Eoghan1232 Feb 22, 2023

Choose a reason for hiding this comment

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

do you mean change mlnx_en and mlnx_ofed to mlx5_core?

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
collectors/sriovdev.go Show resolved Hide resolved
if !isNetDevice(devClassFilePath) {
return false
// getSriovDevAddrs returns the PCI addresses of the SRIOV capable Physical Functions on the host.
func getSriovDevAddrs() []string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we reuse functions from the sriov-device-plugin maybe here?

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 believe so, I think a future refactor?

collectors/sriovdev_readers.go Outdated Show resolved Hide resolved
collectors/sriovdev_readers.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Show resolved Hide resolved
Eoghan Russell and others added 7 commits February 24, 2023 14:37
- Update README
- Update to go1.18
- Update to k8s v1.25.5
- Reworked vfstats collector
- Implemented endpoint unit tests
- Add netlink support detection
- Add image building to Makefile
- Remove deprecated references
- Add Mellanox driver to drivers DB
- Refactor code to enable testing
- Support for NFD SR-IOV feature label
- Changes to ensure more uniform Makefile
- Implemented initial unit tests
- Implemented vfstats package unit tests

Co-Authored-By: Eoghan1232 <[email protected]>
Co-Authored-By: eoghanlawless <[email protected]>
Co-Authored-By: Ipawlikx <[email protected]>
Co-Authored-By: nhennigan <[email protected]>
@Eoghan1232
Copy link
Collaborator Author

Eoghan1232 commented Feb 27, 2023

@SchSeba PTAL :)

coveralls was removed from action for now, and I will introduce it again in a later PR.
I'd like to get this PR merged.

@Eoghan1232 Eoghan1232 mentioned this pull request Feb 27, 2023
@Eoghan1232
Copy link
Collaborator Author

Eoghan1232 commented Mar 20, 2023

@SchSeba if you have time to take a look :)
I'd like to get this merged

Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

great work!

LGTM

@Eoghan1232 Eoghan1232 merged commit c6489eb into k8snetworkplumbingwg:master May 8, 2023
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.

4 participants