GithubHelp home page GithubHelp logo

Comments (3)

imcom avatar imcom commented on May 31, 2024 1

@rg0now It works like a charm! Although I have not had enough resources to test it thoroughly, but no errors found in stunner pod in production namespace. And it no longer affects live traffic in staging namespace

Thanks!

from stunner.

rg0now avatar rg0now commented on May 31, 2024

Yes, running multiple Gateway hierarchies side by side is supposed to work; in fact, your use of multiple gateway-classes is exactly the way we also had in mind.

Problem is, this mode is not supported yet: what is really funny here is that the panic occurs in the operator exactly in the code where we try to warn that multiple gateway-classes are not supported: :-))

log.Info("multiple gateway-class objects found %s: this is most probably UNINTENED - "+
	"the operator will attempt to render a configuration for each gateway-class but there "+
	"is no guarantee that this will not result in an error - this mode is UNSUPPORTED, "+
	"if unsure, remove one of the gateway-class objects!", strings.Join(names, ", "))

The fix is trivial but we'll have to roll a new operator release, please bear with us a couple of days until we get to this.

from stunner.

rg0now avatar rg0now commented on May 31, 2024

This should be fixed in https://github.com/l7mp/stunner-gateway-operator/releases/tag/v0.11.4, could you please give it a try? Make sure the operator is re-deployed, otherwise you won't get the fix. Multiple gateway-classes are still completely untested so we fully expect that you see further issues.

Just to be entirely clear, the bug was in the operator, so the dataplane (stunnerd) does not need to be updated.

Another note: if using multiple gateway-classes you should deploy two separate stunner dataplanes into separate namespaces. This will make sure that the two stunner dataplanes can run each with their own configuration.

Here is how this should work:

  1. Install stunner twice, each time into separate namespaces:
helm install stunner stunner/stunner --create-namespace --namespace=stunner-production
helm install stunner stunner/stunner --create-namespace --namespace=stunner-staging
  1. Configure the gateway-class hierarchy for the staging namespace:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
metadata:
  name: stunner-gatewayclass-staging
spec:
  controllerName: "stunner.l7mp.io/gateway-operator"
  parametersRef:
    name: stunner-gatewayconfig-staging
    namespace: stunner-staging
---
apiVersion: stunner.l7mp.io/v1alpha1
kind: GatewayConfig
metadata:
  name: stunner-gatewayconfig-staging
  namespace: stunner-staging
spec:
  ...
  1. Similarly for the production namespace:
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
metadata:
  name: stunner-gatewayclass-production
spec:
  controllerName: "stunner.l7mp.io/gateway-operator"
  parametersRef:
    name: stunner-gatewayconfig-production
    namespace: stunner-production
---
apiVersion: stunner.l7mp.io/v1alpha1
kind: GatewayConfig
metadata:
  name: stunner-gatewayconfig-production
  namespace: stunner-production
spec:
  ...
  1. Now, whenever you add a Gateway with gatewayClassName: stunner-gatewayclass-staging the corresponding Gateway will be attached to the "staging" gatewayclass-hierarchy and the corresponding configuration will be picked up by the stunner dataplane running in the staging namespace, and similarly for the production hierarchy. I think you'll need separate UDPRoutes for both hierarchies but this shouldn't really be a problem.

Don't forget to leave a note here if this works, or reopen if it does not.

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.