Skip to content

Commit

Permalink
chore: Remove namespace restriction for EnvoyProxy parametersRef reso…
Browse files Browse the repository at this point in the history
…urce
  • Loading branch information
phantooom committed Jun 5, 2024
1 parent 607d8bc commit cbb2587
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/provider/kubernetes/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1578,14 +1578,14 @@ func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1
}

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

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

if len(epList.Items) == 0 {
r.log.Info("no envoyproxies exist in", "namespace", r.namespace)
r.log.Info("no envoyproxies exist in", "namespace", gcParametersRefNamespace)
return nil
}

Expand Down

0 comments on commit cbb2587

Please sign in to comment.