Skip to content

Commit

Permalink
Remove unreachable special case
Browse files Browse the repository at this point in the history
We had code to allow you to not specify an IPv6 machineNetwork value
on dual-stack AWS clusters, but we don't support dual-stack on AWS
anyway. And if we support it in the future, it will likely be after
improvements to IPv6 support on the AWS end, so this exception may no
longer make sense at that point anyway.
  • Loading branch information
danwinship committed Jun 17, 2021
1 parent 6298b89 commit 33c2cc7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions pkg/types/validation/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ func validateNetworkingIPVersion(n *types.Networking, p *types.Platform) field.E
}
for k, v := range presence {
switch {
case k == "machineNetwork" && p.AWS != nil:
// AWS can default an ipv6 subnet
case v.IPv4 && !v.IPv6:
allErrs = append(allErrs, field.Invalid(field.NewPath("networking", k), strings.Join(ipnetworksToStrings(addresses[k]), ", "), "dual-stack IPv4/IPv6 requires an IPv6 network in this list"))
case !v.IPv4 && v.IPv6:
Expand Down
10 changes: 0 additions & 10 deletions pkg/types/validation/installconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,16 +1112,6 @@ func TestValidateInstallConfig(t *testing.T) {
}(),
expectedError: `Invalid value: "10.0.0.0/16": dual-stack IPv4/IPv6 requires an IPv6 network in this list`,
},
{
name: "valid dual-stack configuration, machine has no IPv6 but is on AWS",
installConfig: func() *types.InstallConfig {
c := validInstallConfig()
c.Networking = validDualStackNetworkingConfig()
c.Networking.MachineNetwork = c.Networking.MachineNetwork[1:]
return c
}(),
expectedError: `Invalid value: "DualStack": dual-stack IPv4/IPv6 is not supported for this platform, specify only one type of address`,
},
{
name: "invalid dual-stack configuration, IPv6-primary",
installConfig: func() *types.InstallConfig {
Expand Down

0 comments on commit 33c2cc7

Please sign in to comment.