Skip to content

Commit

Permalink
Merge pull request #3172 from danwinship/emulate-single-stack-error
Browse files Browse the repository at this point in the history
Give a proper error when misusing OPENSHIFT_INSTALL_AZURE_EMULATE_SINGLESTACK_IPV6
  • Loading branch information
openshift-merge-robot committed Jun 4, 2020
2 parents 325ab46 + 4a9769f commit 05dc9d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/types/validation/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ func validateNetworkingIPVersion(n *types.Networking, p *types.Platform) field.E
switch {
case p.BareMetal != nil:
case p.None != nil:

case p.Azure != nil && os.Getenv("OPENSHIFT_INSTALL_AZURE_EMULATE_SINGLESTACK_IPV6") == "true":
if !presence["machineNetwork"].IPv4 || !presence["machineNetwork"].IPv6 {
allErrs = append(allErrs, field.Invalid(field.NewPath("networking"), "IPv6", "OPENSHIFT_INSTALL_AZURE_EMULATE_SINGLESTACK_IPV6 requires both IPv4 and IPv6 machineNetwork values"))
}

default:
allErrs = append(allErrs, field.Invalid(field.NewPath("networking"), "IPv6", "single-stack IPv6 is not supported for this platform"))
}
Expand Down

0 comments on commit 05dc9d6

Please sign in to comment.