Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Aug 9, 2023
1 parent bdbf0c3 commit cff48ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion control-plane/api-gateway/binding/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (
}

allTLSVersionsWithConfigurableCipherSuites = map[string]struct{}{
// Remove these two if Envoy ever sets TLS 1.3 as default minimum
// Remove "" and "TLS_AUTO" if Envoy ever sets TLS 1.3 as default minimum
"": {},
"TLS_AUTO": {},
"TLSv1_0": {},
Expand Down
2 changes: 1 addition & 1 deletion control-plane/api-gateway/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const (

AnnotationGatewayClassConfig = "consul.hashicorp.com/gateway-class-config"

// The following annotation keys are used in the v1beta1.GatewayTLSConfig's Options on a v1beta1.Listener
// The following annotation keys are used in the v1beta1.GatewayTLSConfig's Options on a v1beta1.Listener.
TLSCipherSuitesAnnotationKey = "api-gateway.consul.hashicorp.com/tls_cipher_suites"
TLSMaxVersionAnnotationKey = "api-gateway.consul.hashicorp.com/tls_max_version"
TLSMinVersionAnnotationKey = "api-gateway.consul.hashicorp.com/tls_min_version"
Expand Down
6 changes: 3 additions & 3 deletions control-plane/api-gateway/common/translation.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ func (t ResourceTranslator) toAPIGatewayListener(gateway gwv1beta1.Gateway, list
var maxVersion, minVersion string

if listener.TLS != nil {
cipherSuitsVal := string(listener.TLS.Options[TLSCipherSuitesAnnotationKey])
if cipherSuitsVal != "" {
cipherSuites = strings.Split(cipherSuitsVal, ",")
cipherSuitesVal := string(listener.TLS.Options[TLSCipherSuitesAnnotationKey])
if cipherSuitesVal != "" {
cipherSuites = strings.Split(cipherSuitesVal, ",")
}
maxVersion = string(listener.TLS.Options[TLSMaxVersionAnnotationKey])
minVersion = string(listener.TLS.Options[TLSMinVersionAnnotationKey])
Expand Down

0 comments on commit cff48ba

Please sign in to comment.