Skip to content

Commit

Permalink
feat: support tls expression route.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodman10 committed Aug 28, 2023
1 parent 7a0bd0f commit 0ccb9c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/dataplane/parser/translate_tlsroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/kong/kubernetes-ingress-controller/v2/internal/dataplane/parser/translators"
"github.com/kong/kubernetes-ingress-controller/v2/internal/store"
"github.com/kong/kubernetes-ingress-controller/v2/internal/versions"
)

// -----------------------------------------------------------------------------
Expand All @@ -29,7 +30,7 @@ func (p *Parser) ingressRulesFromTLSRoutes() ingressRules {

var errs []error
for _, tlsroute := range tlsRouteList {
if p.featureFlags.ExpressionRoutes {
if p.featureFlags.ExpressionRoutes && p.kongVersion.LT(versions.ExpressionRouterL4Cutoff) {
p.registerResourceFailureNotSupportedForExpressionRoutes(tlsroute)
continue
}
Expand All @@ -44,6 +45,10 @@ func (p *Parser) ingressRulesFromTLSRoutes() ingressRules {
}
}

if p.featureFlags.ExpressionRoutes {
applyExpressionToIngressRules(&result)
}

if len(errs) > 0 {
for _, err := range errs {
p.logger.Errorf(err.Error())
Expand Down

0 comments on commit 0ccb9c1

Please sign in to comment.