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

Forward same request to a service in every namespaces #23

Closed
bcouetil opened this issue Mar 6, 2023 · 5 comments
Closed

Forward same request to a service in every namespaces #23

bcouetil opened this issue Mar 6, 2023 · 5 comments

Comments

@bcouetil
Copy link

bcouetil commented Mar 6, 2023

Hello, thank you for maintaining this tool 😊

My use case is forwarding the request to a service in every namespaces.

I guess I could create a single WebhookRelayForward with multiple outputs like this :

      outputs:
        - name: business-backend-ns1
          destination: http://business-backend.ns1.svc.cluster.local
          internal: true
          lockPath: false
        - name: business-backend-ns2
          destination: http://business-backend.ns2.svc.cluster.local
          internal: true
          lockPath: false

But it means being aware of every namespaces at once, and mines are dynamic (these are ephemeral environments which all needs the requests).

Do I have another solution ? would it work if I created the same object in each namespace ; would it merge the redirection to do all, or would it be overriden each time by the latest ?

Thanks in advance for any input 🙏

@bcouetil bcouetil changed the title Forward same request to a service in each namespace Forward same request to a service in every namespaces Mar 6, 2023
@rusenask
Copy link
Member

rusenask commented Mar 6, 2023

Hi!
Have you thought about just running the agent itself without the operator on each namespace next to your business-backend deployment? Then the URL is the same for each agent and they all subscribe to the same bucket with the same single output :)

@bcouetil
Copy link
Author

bcouetil commented Mar 6, 2023

Oh great, how do I run the agent without the operator ? should I template the helm chart and cherry pick some objects ?

@rusenask
Copy link
Member

rusenask commented Mar 6, 2023

Here's an example of deployment yaml https://docs.webhookrelay.com/installation-options/containerized/kubernetes-installation#option-3-separate-deployment.

It might make sense to create a helm chart too but it's a single container 😃

@bcouetil
Copy link
Author

bcouetil commented Mar 6, 2023

I understand, simpler is better, no need for Hell Helm chart for that.

My first reaction was "man, where are the other variables ?", but indeed, if the target is the same service in each namespace, no need for more !

Thank you very much, I'll try that 🙏

@bcouetil
Copy link
Author

bcouetil commented Mar 7, 2023

It works like a charm.

Cherry on the cake, only needed namespaces have the webhook, and each one can subscribe autonomously.

@bcouetil bcouetil closed this as completed Mar 7, 2023
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

No branches or pull requests

2 participants