kubernetes-sigs / ip-masq-agent

Manage IP masquerade on nodes
Apache License 2.0
217 stars 70 forks source link

add interface and snat binding for masquerade #103

Closed mabels closed 3 months ago

mabels commented 1 year ago

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

linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.

k8s-ci-robot commented 1 year ago

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 commented 1 year ago

[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: - **[OWNERS](https://github.com/kubernetes-sigs/ip-masq-agent/blob/master/OWNERS)** 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 commented 1 year ago

PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dkulchinsky commented 8 months ago

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?

mabels commented 8 months ago

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

k8s-triage-robot commented 5 months ago

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

This bot triages PRs according to the following rules:

You can:

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

/lifecycle stale

k8s-triage-robot commented 4 months ago

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

This bot triages PRs according to the following rules:

You can:

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

/lifecycle rotten

k8s-triage-robot commented 3 months ago

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:

You can:

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

/close

k8s-ci-robot commented 3 months ago

@k8s-triage-robot: Closed this PR.

In response to [this](https://github.com/kubernetes-sigs/ip-masq-agent/pull/103#issuecomment-2241279820): >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][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.