Skip to content

docs: remove redundant namespace from HTTPRoute, Ingress, and ApisixRoute examples in configure-routes.md#2750

Closed
fengqi-dev wants to merge 1 commit intoapache:masterfrom
fengqi-dev:master
Closed

docs: remove redundant namespace from HTTPRoute, Ingress, and ApisixRoute examples in configure-routes.md#2750
fengqi-dev wants to merge 1 commit intoapache:masterfrom
fengqi-dev:master

Conversation

@fengqi-dev
Copy link
Copy Markdown

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

This pull request makes minor updates to the documentation in docs/en/latest/getting-started/configure-routes.md by removing the namespace: ingress-apisix field from several Kubernetes resource examples.

apiVersion: v1
kind: Service
metadata:
name: httpbin

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Copilot AI review requested due to automatic review settings April 22, 2026 09:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the getting-started routing documentation to avoid repeating the ingress-apisix namespace in example manifests, aligning the examples with the earlier prerequisite step that sets the kubectl context namespace.

Changes:

  • Removed metadata.namespace: ingress-apisix from the HTTPRoute example.
  • Removed metadata.namespace: ingress-apisix from the Ingress example.
  • Removed metadata.namespace: ingress-apisix from the ApisixRoute example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Baoyuantop Baoyuantop requested review from AlinsRan and nic-6443 April 23, 2026 07:23
@kayx23
Copy link
Copy Markdown
Member

kayx23 commented Apr 30, 2026

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.

@fengqi-dev fengqi-dev closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants