@@ -157,8 +157,8 @@ const (
157
157
// (for instance "80,443")
158
158
serviceAnnotationLoadBalancerProtocolHTTP = "service.beta.kubernetes.io/scw-loadbalancer-protocol-http"
159
159
160
- // serviceAnnotationLoadBalancerHTTPBackendTLS is the annotation to enable tls towards the backend when using http forward protocol
161
- // The possible values are "false", "true" or "*" for all ports or a comma delimited list of the service port
160
+ // serviceAnnotationLoadBalancerHTTPBackendTLS is the annotation to enable tls towards the backend when using http forward protocol.
161
+ // Default to "false". The possible values are "false", "true" or "*" for all ports or a comma delimited list of the service port
162
162
// (for instance "80,443")
163
163
serviceAnnotationLoadBalancerHTTPBackendTLS = "service.beta.kubernetes.io/scw-loadbalancer-http-backend-tls"
164
164
@@ -659,10 +659,10 @@ func getForwardProtocol(service *v1.Service, nodePort int32) (scwlb.Protocol, er
659
659
return scwlb .ProtocolTCP , nil
660
660
}
661
661
662
- func getSSLBridging (service * v1.Service , nodePort int32 ) (* bool , error ) {
662
+ func getSSLBridging (service * v1.Service , nodePort int32 ) (bool , error ) {
663
663
tlsEnabled , found := service .Annotations [serviceAnnotationLoadBalancerHTTPBackendTLS ]
664
664
if ! found {
665
- return nil , nil
665
+ return false , nil
666
666
}
667
667
668
668
var svcPort int32 = - 1
@@ -673,16 +673,16 @@ func getSSLBridging(service *v1.Service, nodePort int32) (*bool, error) {
673
673
}
674
674
if svcPort == - 1 {
675
675
klog .Errorf ("no valid port found" )
676
- return nil , errLoadBalancerInvalidAnnotation
676
+ return false , errLoadBalancerInvalidAnnotation
677
677
}
678
678
679
679
isTLSEnabled , err := isPortInRange (tlsEnabled , svcPort )
680
680
if err != nil {
681
681
klog .Errorf ("unable to check if port %d is in range %s" , svcPort , tlsEnabled )
682
- return nil , err
682
+ return false , err
683
683
}
684
684
685
- return scw . BoolPtr ( isTLSEnabled ) , nil
685
+ return isTLSEnabled , nil
686
686
}
687
687
688
688
func getSSLBridgingSkipVerify (service * v1.Service , nodePort int32 ) (* bool , error ) {
0 commit comments