Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: correctly infer namespace of HTTPRoute backendRef #251

Closed
solmonk opened this issue May 16, 2023 · 0 comments
Closed

bug: correctly infer namespace of HTTPRoute backendRef #251

solmonk opened this issue May 16, 2023 · 0 comments
Assignees
Labels
bug Something isn't working highpriority

Comments

@solmonk
Copy link
Contributor

solmonk commented May 16, 2023

To reproduce

Create gateway in default, service in non-default namespace.

Create the following httproute in non-default namespace:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: inventory
spec:
  parentRefs:
  - name: my-hotel
    namespace: default
    sectionName: http
  rules:
  - backendRefs:
    - name: inventory-ver1
      kind: Service
      port: 8090
      weight: 10

Current behavior

This leads to the following error when registering targets:

I0515 19:08:07.547245   87545 model_build_targets.go:107] errmsg: Build Targets failed because K8S service default/inventory-ver1 does not exist
I0515 19:08:07.547252   87545 model_build_targetgroup.go:162] Error buildTargets for backend ref service {{{0xc000b5c3b0 0xc000b5c3c0 inventory-ver1 <nil> 0xc000bbf240} 0xc000bbf244} []}

Seems the controller infers default namespace by default. example1 example2

What to expect

Since the route itself is in non-default namespace, the backendRefs should also implicitly refer to non-default.

Related

Possibly related to #244

@solmonk solmonk added bug Something isn't working highpriority labels May 16, 2023
@solmonk solmonk self-assigned this May 16, 2023
@solmonk solmonk changed the title bug: handle implicit namespace of HTTPRoute bug: handle implicit backendRef namespace of HTTPRoute May 16, 2023
@solmonk solmonk changed the title bug: handle implicit backendRef namespace of HTTPRoute bug: correctly infer namespace of HTTPRoute backendRef May 16, 2023
@solmonk solmonk closed this as completed May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working highpriority
Projects
None yet
Development

No branches or pull requests

1 participant