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

Send desired IP / MAC address to multus server #39

Merged
merged 5 commits into from
Oct 17, 2022

Conversation

maiqueb
Copy link
Collaborator

@maiqueb maiqueb commented Oct 14, 2022

What this PR does / why we need it:
This PR adds tests asserting runtime configuration (pod / MAC addresses) can be requested for the delegate being added.

It also adds an e2e test proving that removing an interface with runtime configuration is possible.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #42

Special notes for your reviewer (optional):

@maiqueb maiqueb changed the title Send desired iface data to multus server Send desired IP / MAC address to multus server Oct 14, 2022
The network attachment definition returned does **not** have IPAM
configured; as such, we should rename the variable accordingly. Which we
did.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
Simplify the `AddNetworkToPod` calls by passing directly the
`NetworkSelectionElements`. This way, we can also set directly the IP /
MAC without making a mess of the function signature.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
This attribute was hard-coded, which was error prone, since the function
that generates this net-attach-def does receive a network name
parameter.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
This test explicitly requests both the IP address (which requires IPAM)
and the MAC address (which requires the `tuning` plugin) for the pod.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
@maiqueb maiqueb force-pushed the send-desired-iface-data-to-multus-server branch from 2db331c to 9de0ac3 Compare October 17, 2022 08:11
@maiqueb maiqueb marked this pull request as ready for review October 17, 2022 08:12
@maiqueb maiqueb requested a review from phoracek October 17, 2022 09:11
Copy link
Member

@phoracek phoracek left a comment

Choose a reason for hiding this comment

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

Nits, looks good

e2e/e2e_test.go Show resolved Hide resolved
e2e/e2e_test.go Show resolved Hide resolved
@maiqueb maiqueb merged commit 9eb0bf9 into main Oct 17, 2022
@maiqueb maiqueb deleted the send-desired-iface-data-to-multus-server branch October 17, 2022 13:29
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.

[RFE] provide runtime configuration for multus-cni when using the delegate API
2 participants