ip-masq-agent icon indicating copy to clipboard operation
ip-masq-agent copied to clipboard

add interface and snat binding for masquerade

Open mabels opened this issue 3 years ago • 8 comments

Hi,

i missed the feature to control the masquerading on multihomed k8s nodes. If you have multiple interface or multiple ip nr per interface there was no control to set the src ip address. Now you could select the masquerading to apply only for specify interfaces with the "outputInterface" parameter. If you want to specify src addresses we need to switch the target from MASQUERADE to SNAT this is done with "outputAddress" for ipv4 and "outputAddressIPv6" parameter. During the implementation I wanted to reused the test specs, and by doing so it got alittle out of control. Which means I extended and cleaned up the MasqConfig. I changed the construction of MasqConfig to have a proper default handling. I moved the global variables from the command-line parameters into MasqConfig to avoid side effects during tests. For the reuse of the specs i needed to unmarshal yaml and marshal it again where a touched the limits of the used yaml v2 library so i updated it to v3. I'm very sorry that these both things got welted so hard together. This should be two seperated PR's. But to untangle these both "features" where my real thing is depending on, is not my time worth.

meno

mabels avatar Mar 02 '23 08:03 mabels

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: mabels / name: Meno Abels (40f3e7c5ad541392a07ef55d2cae7f7eee5701fd, d1c467ab0297b61123e92c8e55e4069edc2f88cd, 174661e1fad3f1d2d25084a1a2b81899f1162240, 6460372e93f065c63558729935d4949a97b5a4f7)
  • :white_check_mark: login: jingyuanliang (45e239a25b4624946a2b7dc21f4a0e392d81b736, 65a6c737410d8ae2b8efbdc8e50ac7b2318c4608, 5cfd9a520682f0a3cf2687d4a9d133103231ac83)

Welcome @mabels!

It looks like this is your first PR to kubernetes-sigs/ip-masq-agent 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/ip-masq-agent has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Mar 02 '23 08:03 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mabels Once this PR has been reviewed and has the lgtm label, please assign thockin for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 05 '23 17:10 k8s-ci-robot

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Oct 14 '23 00:10 k8s-ci-robot

Hey @mabels 👋🏼

Came across this while researching available solutions for the same issue 😄

This seems like a well thought out proposal, but looks like there is no feedback from reviewers... still wondering if this would be considered?

dkulchinsky avatar Feb 21 '24 17:02 dkulchinsky

I have no clue about the state --- I use my branch in production for almost a year now. You are welcome to use it: https://github.com/mabels/ip-masq-agent/releases/tag/v2.11.1 https://github.com/mabels/ip-masq-agent/pkgs/container/ip-masq-agent

mabels avatar Feb 21 '24 19:02 mabels

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 21 '24 19:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 20 '24 19:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Jul 20 '24 20:07 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Jul 20 '24 20:07 k8s-ci-robot