Do not disable Gateway API provider if not enabled in experimental

This commit is contained in:
Kevin Pollet 2024-07-01 14:10:03 +02:00 committed by GitHub
parent 9758b1ce36
commit 2a0cfda90b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 7 deletions

View file

@ -50,7 +50,6 @@ spec:
- --entrypoints.websecure.address=:443
- --entrypoints.web8080.address=:8080
- --entrypoints.traefik.address=:9000
- --experimental.kubernetesgateway
- --providers.kubernetesgateway.experimentalChannel
- --providers.kubernetesgateway.statusaddress.service.namespace=traefik
- --providers.kubernetesgateway.statusaddress.service.name=traefik

View file

@ -280,14 +280,8 @@ func (c *Configuration) SetEffectiveConfiguration() {
}
}
// Disable Gateway API provider if not enabled in experimental.
if c.Experimental == nil || !c.Experimental.KubernetesGateway {
c.Providers.KubernetesGateway = nil
}
// Configure Gateway API provider
if c.Providers.KubernetesGateway != nil {
log.Debug().Msg("Experimental Kubernetes Gateway provider has been activated")
entryPoints := make(map[string]gateway.Entrypoint)
for epName, entryPoint := range c.EntryPoints {
entryPoints[epName] = gateway.Entrypoint{Address: entryPoint.GetAddress(), HasHTTPTLSConf: entryPoint.HTTP.TLS != nil}