Skip to content

Commit

Permalink
Merge pull request #376 from benjaminapetersen/backport/4.3/CONSOLE-1…
Browse files Browse the repository at this point in the history
…933/IPv6-support-simpler-alternative

Bug 1794548: IPv6 support to console operator & console [openshift-4.3.z]
  • Loading branch information
openshift-merge-robot committed Feb 4, 2020
2 parents cb47e81 + cf06b36 commit d0a0085
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
2 changes: 2 additions & 0 deletions manifests/05-config.yaml
Expand Up @@ -9,3 +9,5 @@ data:
kind: GenericOperatorConfig
leaderElection:
namespace: openshift-console-operator
servingInfo:
bindNetwork: "tcp"
7 changes: 5 additions & 2 deletions manifests/07-downloads-deployment.yaml
Expand Up @@ -113,8 +113,11 @@ spec:
zip.write(path, basename)
# Create socket
addr = ('', 8080)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# IPv6 should handle IPv4 passively so long as it is not bound to a
# specific address or set to IPv6_ONLY
# https://stackoverflow.com/questions/25817848/python-3-does-http-server-support-ipv6
addr = ('::', 8080)
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind(addr)
sock.listen(5)
Expand Down
10 changes: 5 additions & 5 deletions pkg/console/subresource/configmap/configmap_test.go
Expand Up @@ -76,7 +76,7 @@ customization:
branding: ` + DEFAULT_BRAND + `
documentationBaseURL: ` + DEFAULT_DOC_URL + `
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
providers: {}
Expand Down Expand Up @@ -129,7 +129,7 @@ customization:
branding: online
documentationBaseURL: https://docs.okd.io/4.3/
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
providers: {}
Expand Down Expand Up @@ -191,7 +191,7 @@ customization:
branding: ` + string(operatorv1.BrandDedicated) + `
documentationBaseURL: ` + mockOperatorDocURL + `
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
providers: {}
Expand Down Expand Up @@ -260,7 +260,7 @@ customization:
customLogoFile: /var/logo/logo.svg
customProductName: custom-product-name
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
providers: {}
Expand Down Expand Up @@ -327,7 +327,7 @@ customization:
branding: ` + string(operatorv1.BrandDedicated) + `
documentationBaseURL: ` + mockOperatorDocURL + `
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
providers:
Expand Down
2 changes: 1 addition & 1 deletion pkg/console/subresource/consoleserver/config_builder.go
Expand Up @@ -98,7 +98,7 @@ func (b *ConsoleServerCLIConfigBuilder) ConfigYAML() (consoleConfigYAML []byte,

func (b *ConsoleServerCLIConfigBuilder) servingInfo() ServingInfo {
return ServingInfo{
BindAddress: "https://0.0.0.0:8443",
BindAddress: "https://[::]:8443",
CertFile: certFilePath,
KeyFile: keyFilePath,
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/console/subresource/consoleserver/config_builder_test.go
Expand Up @@ -28,7 +28,7 @@ func TestConsoleServerCLIConfigBuilder(t *testing.T) {
Kind: "ConsoleConfig",
APIVersion: "console.openshift.io/v1",
ServingInfo: ServingInfo{
BindAddress: "https://0.0.0.0:8443",
BindAddress: "https://[::]:8443",
CertFile: certFilePath,
KeyFile: keyFilePath,
},
Expand Down Expand Up @@ -57,7 +57,7 @@ func TestConsoleServerCLIConfigBuilder(t *testing.T) {
Kind: "ConsoleConfig",
APIVersion: "console.openshift.io/v1",
ServingInfo: ServingInfo{
BindAddress: "https://0.0.0.0:8443",
BindAddress: "https://[::]:8443",
CertFile: certFilePath,
KeyFile: keyFilePath,
},
Expand Down Expand Up @@ -85,7 +85,7 @@ func TestConsoleServerCLIConfigBuilder(t *testing.T) {
Kind: "ConsoleConfig",
APIVersion: "console.openshift.io/v1",
ServingInfo: ServingInfo{
BindAddress: "https://0.0.0.0:8443",
BindAddress: "https://[::]:8443",
CertFile: certFilePath,
KeyFile: keyFilePath,
},
Expand Down Expand Up @@ -118,7 +118,7 @@ func TestConsoleServerCLIConfigBuilder(t *testing.T) {
Kind: "ConsoleConfig",
APIVersion: "console.openshift.io/v1",
ServingInfo: ServingInfo{
BindAddress: "https://0.0.0.0:8443",
BindAddress: "https://[::]:8443",
CertFile: certFilePath,
KeyFile: keyFilePath,
},
Expand Down Expand Up @@ -172,7 +172,7 @@ func TestConsoleServerCLIConfigBuilderYAML(t *testing.T) {
output: `apiVersion: console.openshift.io/v1
kind: ConsoleConfig
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
clusterInfo: {}
Expand All @@ -197,7 +197,7 @@ providers: {}
output: `apiVersion: console.openshift.io/v1
kind: ConsoleConfig
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
clusterInfo:
Expand All @@ -221,7 +221,7 @@ providers: {}
output: `apiVersion: console.openshift.io/v1
kind: ConsoleConfig
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
clusterInfo: {}
Expand Down Expand Up @@ -249,7 +249,7 @@ providers:
output: `apiVersion: console.openshift.io/v1
kind: ConsoleConfig
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
clusterInfo:
Expand Down
Expand Up @@ -55,7 +55,7 @@ kind: ConsoleConfig
providers:
statuspageID: status-12345
servingInfo:
bindAddress: https://0.0.0.0:8443
bindAddress: https://[::]:8443
certFile: /var/serving-cert/tls.crt
keyFile: /var/serving-cert/tls.key
`,
Expand Down

0 comments on commit d0a0085

Please sign in to comment.