Add validation for IP family and gateways #118
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #70
We did some experimenting around cases with and without Gateway. We think this PR represents common understandings and preferences. This PR puts forth that Gateway should be required with pools/addresses that are IPv4, and Gateway should be optional when addresses are IPv6. We're open to feedback if these choices seem incorrect or too heavy handed.
We see that (at least in our envs) that we are able to launch IPv6 machines without configuring a Gateway. The default route is provided by Router Advertisements. This leads us to the conclusion that there are valid cases when using IPv6 that Gateway should not be required.
Asides:
We intend to PR CAPI so that Gateway is optional when the IPAddress contains an IPv6 address. We intend to PR CAPI so that it requires Gateway when the address is IPv4.
We intend to PR CAPV so that Gateway is optional when the IPAddress is IPv6.