Coder Social home page Coder Social logo

Comments (11)

FLM210 avatar FLM210 commented on May 23, 2024 3

@davidkornel Now the dev version can run normally

from stunner.

jpruciak avatar jpruciak commented on May 23, 2024 1

This would be enough: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.AllowedRoutes (a field on the listener).
ReferenceGrants seems to be hard to implement and too much husstle for initial support ;)

I don't use discord ;/

from stunner.

rg0now avatar rg0now commented on May 23, 2024 1

This should now fixed as of e770d05 in the gateway-operator repo, can you please test?

The below now works for me perfectly:

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
  name: stunner-config
  namespace: stunner
spec:
  gatewayClassName: stunner-gatewayclass
  listeners:
    - name: udp-listener
      port: 3478
      protocol: UDP
      allowedRoutes:
        namespaces:
          from: All
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: UDPRoute
metadata:
  name: janus-dev
  namespace: dev
spec:
  parentRefs:
    - name: stunner-config
      namespace: stunner
  rules:
    - backendRefs:
        - name: janus-dev
          namespace: dev

You can also use label selectors to choose the namespaces the gateway would accept routes from:

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
  name: stunner-config
  namespace: stunner
spec:
  gatewayClassName: stunner-gatewayclass
  listeners:
    - name: udp-listener
      port: 3478
      protocol: UDP
      allowedRoutes:
        namespaces:
          from: Selector
          selector:
            matchLabels:
              udp-gateway: accept

Of course, this requires the target namespace to be labelled with udp-gateway=accept.

Currently this feature is only available on the dev release channel from the stunner/stunner-gateway-operator-dev chart:

helm install stunner-gateway-operator stunner/stunner-gateway-operator-dev --create-namespace --namespace=stunner-system 

We hope to put together a new stable release soon.

Please report back your findings.

from stunner.

davidkornel avatar davidkornel commented on May 23, 2024 1

@FLM210 Can you check it now?
Do not forget to helm repo update.
helm install stunner-gateway-operator stunner/stunner-gateway-operator-dev --namespace=stunner --create-namespace --set stunnerGatewayOperator.dataplane.mode=managed
(Obviously, the managed dataplane flag is needed if you'd like to skip installing STUNner manually.)

from stunner.

davidkornel avatar davidkornel commented on May 23, 2024 1

Great, if you face any issues feel free to reopen, until then I'm closing this issue.

from stunner.

rg0now avatar rg0now commented on May 23, 2024

Thanks for the report, this is indeed a bug. In fact, it is a combination of two things: a somewhat underdocumented STUNner limitation plus an actual bug:

  • Currently STUNner does not implement cross-namespace Gateway-UDPRoute bindings for simplicity: only UDPRoutes from the same namespace are allowed. This limitation is documented here and here. We didn't think this was an important feature for STUNner, but now that you are reporting we will make sure to fix this (hopefully in the next release). See the new issue here.
  • The bug is that for some reason the URPRoute seems to misreport the Accepted status as True, even though the Gateway rejected the route due to a cross-namespace binding attempt. This then quite understandably creates the illusion that cross-namespace bindings should work. This should be fixed ASAP, see the new issue here.

Is deploying the Gateway and the UDPRoute into the same namespace an acceptable workaround to you until we fix this? Note that, as another subtle STUNner limitation, currently the UDPRoute can refer to any Service in any namespace (see docs here): to comply with the Gateway API we would also need to implement ReferenceGrants, but this is also a low-prio item on the TODO list at this point.

from stunner.

jpruciak avatar jpruciak commented on May 23, 2024

Is deploying the Gateway and the UDPRoute into the same namespace an acceptable workaround to you until we fix this?

This would mean I need to allow application helm chart to modify stunner namespace or add UDPRoutes to stunner-config helm chart. It can be temp workaround, but it's not good. Thank you very much for a quick response anyway, at the moment I'll use this workaround, but I'm waiting for this to be solved! :D

from stunner.

rg0now avatar rg0now commented on May 23, 2024

I see. We'll prioritize this feature then.

Quick question: do you want full support for ReferenceGrants (ReferenceGrant is a CRD that you place into a namespace to allow Gateways from other namespaces to accept routes from said namespace or vice versa) or is it enough if we allow UDPRoute bindings from any namespace without restriction?

Anyway, this feature is contingent on another major milestone: maganed dataplane support in the operator. Once that lands, we can easily add support for cross-namespace bindings. Until then, please bear with us. Or better yet: please keep on bugging us frequently on Discord or here so that we do not forget!...:-)

from stunner.

jpruciak avatar jpruciak commented on May 23, 2024

@FLM210 Can I please ask you to test the dev version to know if it fixes the problem?

I've no time to break my develop infra just to check if it fixes the issue.

from stunner.

FLM210 avatar FLM210 commented on May 23, 2024

@FLM210 Can I please ask you to test the dev version to know if it fixes the problem?

I've no time to break my develop infra just to check if it fixes the issue.

The dev version solved my problem, but there is a small issue with the dev version
l7mp/stunner-gateway-operator#39

from stunner.

rg0now avatar rg0now commented on May 23, 2024

The dev version solved my problem, but there is a small issue with the dev version l7mp/stunner-gateway-operator#39

This should be fixed by now.
CC: @davidkornel

from stunner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.