Skip to content

Commit

Permalink
remove extended tls options
Browse files Browse the repository at this point in the history
Signed-off-by: Alice-Lilith <a.wasko@ngrok.com>
  • Loading branch information
Alice-Lilith committed Feb 12, 2025
1 parent 3aebbf4 commit 138b925
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ input:
caCertificateRefs:
- kind: ConfigMap
name: ca-configmap
options:
"k8s.ngrok.com/min_version": "1.2"
"k8s.ngrok.com/max_version": "1.3"
"k8s.ngrok.com/mutual_tls_verification_strategy": "require-and-verify"
httpRoutes:
- apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
Expand Down Expand Up @@ -125,9 +121,6 @@ expected:
actions:
- type: terminate-tls
config:
"mutual_tls_verification_strategy": "require-and-verify"
"min_version": "1.2"
"max_version": "1.3"
"mutual_tls_certificate_authorities":
- "CACert"
"server_certificate": "ServerCert"
Expand Down
19 changes: 0 additions & 19 deletions pkg/managerdriver/translate_gatewayapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ import (
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
)

const (
GatewayTLSOption_MinVersion = "k8s.ngrok.com/min_version"
GatewayTLSOption_MaxVersion = "k8s.ngrok.com/max_version"
GatewayTLSOption_MTLSStrategy = "k8s.ngrok.com/mutual_tls_verification_strategy"
)

// #region GWAPI to IR

type GatewayMatch struct {
Expand Down Expand Up @@ -966,18 +960,5 @@ func gatewayTLSConfigToIR(log logr.Logger, store store.Storer, tlsCfg *gatewayv1
}
}

if minTLSVersion, exists := tlsCfg.Options[GatewayTLSOption_MinVersion]; exists {
minTLSVersionString := string(minTLSVersion)
tlsTermCfg.MinVersion = &minTLSVersionString
}
if maxTLSVersion, exists := tlsCfg.Options[GatewayTLSOption_MaxVersion]; exists {
maxTLSVersionString := string(maxTLSVersion)
tlsTermCfg.MaxVersion = &maxTLSVersionString
}
if mtlsStrat, exists := tlsCfg.Options[GatewayTLSOption_MTLSStrategy]; exists {
mtlsStratString := string(mtlsStrat)
tlsTermCfg.MutualTLSVerificationStrategy = &mtlsStratString
}

return tlsTermCfg, nil
}

0 comments on commit 138b925

Please sign in to comment.