Do not update gateway status when not selected by a gateway class
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
7b08ecfa5e
commit
1508a2c221
3 changed files with 99 additions and 5 deletions
|
@ -357,7 +357,13 @@ func (p *Provider) loadConfigurationFromGateways(ctx context.Context) *dynamic.C
|
|||
}
|
||||
}
|
||||
|
||||
gateways := p.client.ListGateways()
|
||||
var gateways []*gatev1.Gateway
|
||||
for _, gateway := range p.client.ListGateways() {
|
||||
if _, ok := gatewayClassNames[string(gateway.Spec.GatewayClassName)]; !ok {
|
||||
continue
|
||||
}
|
||||
gateways = append(gateways, gateway)
|
||||
}
|
||||
|
||||
var gatewayListeners []gatewayListener
|
||||
for _, gateway := range gateways {
|
||||
|
@ -366,10 +372,6 @@ func (p *Provider) loadConfigurationFromGateways(ctx context.Context) *dynamic.C
|
|||
Str("namespace", gateway.Namespace).
|
||||
Logger()
|
||||
|
||||
if _, ok := gatewayClassNames[string(gateway.Spec.GatewayClassName)]; !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
gatewayListeners = append(gatewayListeners, p.loadGatewayListeners(logger.WithContext(ctx), gateway, conf)...)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue