Skip to content

Commit b870e39

Browse files
authored
chore: Remove namespace restriction for EnvoyProxy parametersRef reso… (envoyproxy#3544)
chore: Remove namespace restriction for EnvoyProxy parametersRef resource
1 parent 516a27d commit b870e39

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/provider/kubernetes/controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,14 +1578,14 @@ func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1
15781578
}
15791579

15801580
epList := new(egv1a1.EnvoyProxyList)
1581+
gcParametersRefNamespace := string(*gc.Spec.ParametersRef.Namespace)
15811582

1582-
// The EnvoyProxy must be in the same namespace as EG.
1583-
if err := r.client.List(ctx, epList, &client.ListOptions{Namespace: r.namespace}); err != nil {
1584-
return fmt.Errorf("failed to list envoyproxies in namespace %s: %w", r.namespace, err)
1583+
if err := r.client.List(ctx, epList, &client.ListOptions{Namespace: gcParametersRefNamespace}); err != nil {
1584+
return fmt.Errorf("failed to list envoyproxies in namespace %s: %w", gcParametersRefNamespace, err)
15851585
}
15861586

15871587
if len(epList.Items) == 0 {
1588-
r.log.Info("no envoyproxies exist in", "namespace", r.namespace)
1588+
r.log.Info("no envoyproxies exist in", "namespace", gcParametersRefNamespace)
15891589
return nil
15901590
}
15911591

0 commit comments

Comments
 (0)