From 2fcbac53198ca5eaf5da2ec9d5eaf09d9223d8a3 Mon Sep 17 00:00:00 2001 From: Ashing Zheng Date: Mon, 3 Nov 2025 15:56:03 +0800 Subject: [PATCH] fix: modify supportsGateway judgment conditions Signed-off-by: Ashing Zheng --- internal/controller/gatewayproxy_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/gatewayproxy_controller.go b/internal/controller/gatewayproxy_controller.go index 2687b563..5ab1d877 100644 --- a/internal/controller/gatewayproxy_controller.go +++ b/internal/controller/gatewayproxy_controller.go @@ -62,7 +62,7 @@ type GatewayProxyController struct { func (r *GatewayProxyController) SetupWithManager(mrg ctrl.Manager) error { // Check and store EndpointSlice API support r.supportsEndpointSlice = pkgutils.HasAPIResource(mrg, &discoveryv1.EndpointSlice{}) - r.supportsGateway = pkgutils.HasAPIResource(mrg, &gatewayv1.Gateway{}) + r.supportsGateway = pkgutils.HasAPIResource(mrg, &gatewayv1.Gateway{}) && !config.ControllerConfig.DisableGatewayAPI var icWatch client.Object switch r.ICGV.String() { case networkingv1beta1.SchemeGroupVersion.String():