From 3d2009018e5764835dcbdb4fa1619845ec0b8c90 Mon Sep 17 00:00:00 2001 From: Huabing Zhao Date: Wed, 11 Dec 2024 02:16:42 +0000 Subject: [PATCH] minor wording Signed-off-by: Huabing Zhao --- internal/provider/kubernetes/predicates.go | 16 ++++++++-------- .../out/xds-ir/http-route-timeout.clusters.yaml | 4 ---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/internal/provider/kubernetes/predicates.go b/internal/provider/kubernetes/predicates.go index 8e68009b94e..ae457b3920b 100644 --- a/internal/provider/kubernetes/predicates.go +++ b/internal/provider/kubernetes/predicates.go @@ -644,21 +644,21 @@ func (r *gatewayAPIReconciler) updateStatusForGatewaysUnderGatewayClass(ctx cont // updateGatewayStatus triggers a status update for the Gateway. func (r *gatewayAPIReconciler) updateGatewayStatus(gateway *gwapiv1.Gateway) { - // The status added to GatewayStatuses is solely used to trigger the status updater - // and does not reflect the real changed status. - // - // The status updater will check the Envoy Proxy service to get the addresses of the Gateway, - // and check the Envoy Proxy Deployment/DaemonSet to get the status of the Gateway workload. - // - // Since the status does not reflect the actual changed status, we need to delete it first - // to prevent it from being considered unchanged. This ensures that subscribers receive the update event. gwName := utils.NamespacedName(gateway) status:= &gateway.Status // Use the existing status if it exists to avoid losing the status calculated by the Gateway API translator. if existing, ok := r.resources.GatewayStatuses.Load(gwName); ok { status = existing } + + // Since the status does not reflect the actual changed status, we need to delete it first + // to prevent it from being considered unchanged. This ensures that subscribers receive the update event. r.resources.GatewayStatuses.Delete(gwName) + // The status that is stored in the GatewayStatuses GatewayStatuses is solely used to trigger the status updater + // and does not reflect the real changed status. + // + // The status updater will check the Envoy Proxy service to get the addresses of the Gateway, + // and check the Envoy Proxy Deployment/DaemonSet to get the status of the Gateway workload. r.resources.GatewayStatuses.Store(gwName, status) } diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-timeout.clusters.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-timeout.clusters.yaml index a52b95baeae..b70cda2ec59 100644 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-timeout.clusters.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-timeout.clusters.yaml @@ -64,7 +64,6 @@ ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST name: fourth-route-dest - outlierDetection: {} perConnectionBufferLimitBytes: 32768 type: EDS - circuitBreakers: @@ -82,7 +81,6 @@ ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST name: fifth-route-dest - outlierDetection: {} perConnectionBufferLimitBytes: 32768 type: EDS - circuitBreakers: @@ -100,7 +98,6 @@ ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST name: sixth-route-dest - outlierDetection: {} perConnectionBufferLimitBytes: 32768 type: EDS - circuitBreakers: @@ -118,6 +115,5 @@ ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST name: seventh-route-dest - outlierDetection: {} perConnectionBufferLimitBytes: 32768 type: EDS