Skip to content

Commit

Permalink
Give a proper error when misusing OPENSHIFT_INSTALL_AZURE_EMULATE_SIN…
Browse files Browse the repository at this point in the history
…GLESTACK_IPV6
  • Loading branch information
danwinship committed Feb 24, 2020
1 parent 013bcf8 commit fd2e2e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/tfvars/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package azure

import (
"encoding/json"
"fmt"
"net"
"os"

Expand Down Expand Up @@ -78,6 +79,9 @@ func TFVars(sources TFVarsSources) ([]byte, error) {

var emulateSingleStackIPv6 bool
if os.Getenv("OPENSHIFT_INSTALL_AZURE_EMULATE_SINGLESTACK_IPV6") == "true" {
if len(machineV4CIDRStrings) == 0 || len(machineV6CIDRStrings) == 0 {
return nil, fmt.Errorf("OPENSHIFT_INSTALL_AZURE_EMULATE_SINGLESTACK_IPV6 requires a dual-stack install-config")
}
emulateSingleStackIPv6 = true
}

Expand Down

0 comments on commit fd2e2e4

Please sign in to comment.