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

Make cmapisrv-mock addresses configurable #84

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

giorio94
Copy link
Member

To allow configuring different ranges in case they overlap with other infrastructural addresses, and prevent breaking connectivity. Additionally, let's fix the endpoint mocking logic that incorrectly always picked IPv6 addresses when IPv6 was enabled.

@giorio94 giorio94 requested a review from learnitall June 25, 2024 16:07
@giorio94 giorio94 force-pushed the pr/giorio94/cmapisrv-mock-random branch from e4850e6 to 11bb066 Compare June 27, 2024 06:48
@giorio94
Copy link
Member Author

Rebased onto main to fix conflict.

Copy link
Collaborator

@learnitall learnitall left a comment

Choose a reason for hiding this comment

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

Sweet! Would it make sense to make the CIDR blocks configurable at some point too?

@giorio94
Copy link
Member Author

Would it make sense to make the CIDR blocks configurable at some point too?

That's definitely a possibility. I haven't done that at the moment to avoid adding more parameters, considering that there's not much value in configuring the size of those CIDRs with the current implementation. Indeed, the IP of an endpoint is picked from the entire PodCIDR range, and not from the specific PodCIDR of the node. However, that's something we may want to consider in the future if this mechanism turns out to lead to unexpected behavior.

giorio94 added 4 commits June 28, 2024 09:20
So that it randomly picks either an IPv4 or an IPv6 address, rather than
IPv6 only.

Signed-off-by: Marco Iorio <[email protected]>
In order to shorten the signature of the functions initializing the
mockers for the different resources, and simplify adding new parameters.

Signed-off-by: Marco Iorio <[email protected]>
This will allow a subsequent commit to make the CIDRs configurable.

Signed-off-by: Marco Iorio <[email protected]>
To allow configuring different ranges in case they overlap with other
infrastructural addresses, and prevent breaking connectivity.

Signed-off-by: Marco Iorio <[email protected]>
@giorio94 giorio94 force-pushed the pr/giorio94/cmapisrv-mock-random branch from 11bb066 to 89393c1 Compare June 28, 2024 07:20
@giorio94
Copy link
Member Author

Rebased onto main to run the lint and build pipelines before merging.

@giorio94 giorio94 merged commit be77a43 into cilium:main Jun 28, 2024
2 checks passed
@giorio94 giorio94 deleted the pr/giorio94/cmapisrv-mock-random branch June 28, 2024 07:40
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.

2 participants