@@ -50,7 +50,9 @@ func buildSecretVolume(secretName string) corev1.Volume {
50
50
}
51
51
52
52
func getProxyContainerForEndpoint (proxyEndpoint proxyEndpoint , tlsProxyVolume corev1.Volume , meta WorkspaceMetadata ) corev1.Container {
53
- proxyContainerName := fmt .Sprintf ("oauth-proxy-%s" , strconv .FormatInt (int64 (proxyEndpoint .upstreamEndpoint .TargetPort ), 10 ))
53
+ upstreamPortString := strconv .FormatInt (int64 (proxyEndpoint .upstreamEndpoint .TargetPort ), 10 )
54
+ containerPortString := strconv .FormatInt (int64 (proxyEndpoint .publicEndpoint .TargetPort ), 10 )
55
+ proxyContainerName := fmt .Sprintf ("oauth-proxy-%s-%s" , upstreamPortString , containerPortString )
54
56
55
57
return corev1.Container {
56
58
Name : proxyContainerName ,
@@ -71,10 +73,10 @@ func getProxyContainerForEndpoint(proxyEndpoint proxyEndpoint, tlsProxyVolume co
71
73
TerminationMessagePolicy : corev1 .TerminationMessageFallbackToLogsOnError ,
72
74
Image : images .GetOpenShiftOAuthProxyImage (),
73
75
Args : []string {
74
- "--https-address=:" + strconv . FormatInt ( int64 ( proxyEndpoint . publicEndpoint . TargetPort ), 10 ) ,
76
+ "--https-address=:" + containerPortString ,
75
77
"--http-address=127.0.0.1:" + strconv .FormatInt (int64 (proxyEndpoint .publicEndpointHttpPort ), 10 ),
76
78
"--provider=openshift" ,
77
- "--upstream=http://localhost:" + strconv . FormatInt ( int64 ( proxyEndpoint . upstreamEndpoint . TargetPort ), 10 ) ,
79
+ "--upstream=http://localhost:" + upstreamPortString ,
78
80
"--tls-cert=/etc/tls/private/tls.crt" ,
79
81
"--tls-key=/etc/tls/private/tls.key" ,
80
82
"--cookie-secret=0123456789abcdefabcd" ,
0 commit comments