Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

CIDR fixes and kops support #184

Merged
merged 2 commits into from
Jul 16, 2018
Merged

Conversation

gianlucaborello
Copy link

This PR introduces two changes, split in separate commits:

  1. Better validation of IP addresses to CIDR, since the original algorithm was a little bit weak, and it also adds some tests.

  2. Includes the 100.64.0.0/10 address range as valid range.

The reason for 2) is that kops by default seems to be using that range to minimize the likelihood of collisions in the wild[1] . This is in my opinion improper and against the guidelines of the RFC (e.g. [2], [3]), but considering the popularity of kops it's a scenario we have to support, so we either introduce a new configuration parameter inside the CRD that the user can use to manually specify the whitelist range (and this would then be passed to the mysql-agent as argument when the statefulset is first created), or we just hardcode the address range, like I did. The latter has the advantage that it will work out of the box, which is a usability advantage with respect to the other solution in my opinion.

Thanks

[1] kubernetes/kops#2075
[2] https://blog.ipspace.net/2013/08/can-i-use-shared-rfc-6598-ipv4-address.html
[3] https://networkengineering.stackexchange.com/questions/35958/ipv4-segment-100-64-0-0-10

Copy link

@prydie prydie left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks; great work as ever!

@prydie prydie merged commit 31143c5 into oracle:master Jul 16, 2018
@gianlucaborello gianlucaborello deleted the cidr-fixes branch July 17, 2018 01:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants