kayx23 commented on PR #2750:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2750#issuecomment-4350955430

   I don't think this change is safe as-is. Removing `metadata.namespace` here 
changes behavior, not just style.
   
   For the `HTTPRoute` example, the doc defines the `Gateway` in 
`ingress-apisix` earlier in the same guide. If `httpbin-route.yaml` is applied 
without an explicit namespace, it will be created in the user's current 
namespace, so `parentRefs: - name: apisix` may no longer refer to the `Gateway` 
in `ingress-apisix`. That can break the Gateway API walkthrough.
   
   The same issue applies to the Ingress and `ApisixRoute` examples: without 
`metadata.namespace`, the examples become dependent on the user's current 
kubectl context. The guide currently does not set a default namespace and does 
not use `-n ingress-apisix` when applying the route manifest.
   
   I think we should either:
   1. keep the explicit `namespace: ingress-apisix` in these examples, or
   2. update the whole walkthrough to set/apply a namespace consistently 
(`kubectl config set-context --current --namespace=ingress-apisix` or `kubectl 
apply -n ingress-apisix ...`).
   
   Right now this PR makes the docs less explicit and potentially incorrect for 
the Gateway API case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to