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

[liqoctl] allow override gateway client address and port #2831

Merged

Conversation

claudiolor
Copy link
Contributor

Description

At the moment to override the address and port used by the gateway client when peering is done via liqoctl is handled via an annotation to be placed on the gateway server template resource. However, this has some limitations:

  • It's not really used friendly
  • It doesn't work when behind the same NAT there are multiple gateways (as the template is shared by all the instances of gateway, so override is performed on everybody)

To fix this issue this PR introduces the --client-address and --client-port to the peer and connect commands of liqoctl to override the value written in the endpoint field of the status of the GatewayServer resource, which is used to configure the GatewayClient resource. This is useful especially when the gateway server is not directly reachable by the client (e.g. it is behind a NAT).

@adamjensenbot
Copy link
Collaborator

Hi @claudiolor. Thanks for your PR!

I am @adamjensenbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch (You can add the option test=true to launch the tests
    when the rebase operation is completed)
  • /merge: Merge this PR into the master branch
  • /build Build Liqo components
  • /test Launch the E2E and Unit tests
  • /hold, /unhold Add/remove the hold label to prevent merging with /merge

Make sure this PR appears in the liqo changelog, adding one of the following labels:

  • kind/breaking: 💥 Breaking Change
  • kind/feature: 🚀 New Feature
  • kind/bug: 🐛 Bug Fix
  • kind/cleanup: 🧹 Code Refactoring
  • kind/docs: 📝 Documentation

@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 25, 2024
@claudiolor claudiolor force-pushed the clo/override-client-endpoint branch from d99735e to 2d54b75 Compare November 26, 2024 10:03
cmd/liqoctl/cmd/network.go Outdated Show resolved Hide resolved
@claudiolor claudiolor force-pushed the clo/override-client-endpoint branch from 2d54b75 to cb3c61e Compare November 26, 2024 11:37
examples/networking/wireguard-server-nat.yaml Outdated Show resolved Hide resolved
@claudiolor claudiolor force-pushed the clo/override-client-endpoint branch from cb3c61e to 8170610 Compare November 28, 2024 16:28
@fra98
Copy link
Member

fra98 commented Nov 28, 2024

/rebase test=true

This patch introduces the `--client-address` and `--client-port`
to the `peer` and `connect` commands of `liqoctl` to override the
value written in the endpoint field of the status of the GatewayServer
resource, which is used to configure the GatewayClient resource.
This is useful especially when the gateway server is not directly
reachable by the client (e.g. it is behind a NAT).
This patch removes the possibility to use the override the address and
port used by the client to connect to the GatewayServer via the
`liqo.io/override-address` and `liqo.io/override-port` annotation.
Introduced with PR liqotech#2384
@adamjensenbot adamjensenbot force-pushed the clo/override-client-endpoint branch from 8170610 to 228f482 Compare November 28, 2024 21:59
@fra98
Copy link
Member

fra98 commented Nov 29, 2024

/merge

@adamjensenbot adamjensenbot added the merge-requested Request bot merging (automatically managed) label Nov 29, 2024
@adamjensenbot adamjensenbot merged commit 96a400f into liqotech:master Nov 29, 2024
13 checks passed
@adamjensenbot adamjensenbot removed the merge-requested Request bot merging (automatically managed) label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants