diff --git a/manifests/03_configmap.yaml b/manifests/03_configmap.yaml index d986e55a8f..4b21ced786 100644 --- a/manifests/03_configmap.yaml +++ b/manifests/03_configmap.yaml @@ -7,3 +7,5 @@ data: operator-config.yaml: | apiVersion: operator.openshift.io/v1alpha1 kind: GenericOperatorConfig + servingInfo: + bindNetwork: "tcp" diff --git a/pkg/operator2/oauth.go b/pkg/operator2/oauth.go index 4953ad5611..be6dbf8301 100644 --- a/pkg/operator2/oauth.go +++ b/pkg/operator2/oauth.go @@ -93,7 +93,7 @@ func (c *authOperator) handleOAuthConfig( ServingInfo: configv1.HTTPServingInfo{ ServingInfo: configv1.ServingInfo{ BindAddress: fmt.Sprintf("0.0.0.0:%d", 6443), - BindNetwork: "tcp4", + BindNetwork: "tcp", // we have valid serving certs provided by service-ca // this is our main server cert which is used if SNI does not match CertInfo: configv1.CertInfo{ diff --git a/pkg/operator2/operator.go b/pkg/operator2/operator.go index d244b5bef9..d5e5bed0bf 100644 --- a/pkg/operator2/operator.go +++ b/pkg/operator2/operator.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io/ioutil" + "net" "net/http" "os" "reflect" @@ -557,7 +558,7 @@ func (c *authOperator) getAPIServerIPs() ([]string, error) { ips := make([]string, 0, len(subset.Addresses)) for _, address := range subset.Addresses { - ips = append(ips, fmt.Sprintf("%s:%d", address.IP, targetPort)) + ips = append(ips, net.JoinHostPort(address.IP, strconv.Itoa(targetPort))) } return ips, nil }