Skip to content

Commit 422b0d6

Browse files
committed
move back
Signed-off-by: zirain <[email protected]>
1 parent fb98dea commit 422b0d6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

internal/gatewayapi/translator.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,17 +415,16 @@ func (t *Translator) GetRelevantGateways(resources *resource.Resources) (
415415
logKeysAndValues := []any{
416416
"namespace", gateway.Namespace, "name", gateway.Name,
417417
}
418+
if gateway.Spec.GatewayClassName != t.GatewayClassName {
419+
t.Logger.Info("Skipping Gateway because GatewayClassName doesn't match", logKeysAndValues...)
420+
continue
421+
}
418422

419423
gCtx := &GatewayContext{
420424
Gateway: gateway,
421425
}
422426
gCtx.attachEnvoyProxy(resources, envoyproxyMap)
423427

424-
if gateway.Spec.GatewayClassName != t.GatewayClassName {
425-
t.Logger.Info("Skipping Gateway because GatewayClassName doesn't match", logKeysAndValues...)
426-
continue
427-
}
428-
429428
// Gateways that are not accepted by the controller because they reference an invalid EnvoyProxy.
430429
if status.GatewayNotAccepted(gCtx.Gateway) {
431430
failedGateways = append(failedGateways, gCtx)

0 commit comments

Comments
 (0)