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

SourceIP preservation with weave-net not possible #1010

Closed
sh0rez opened this issue Jan 27, 2019 · 1 comment · Fixed by #1027
Closed

SourceIP preservation with weave-net not possible #1010

sh0rez opened this issue Jan 27, 2019 · 1 comment · Fixed by #1027
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sh0rez
Copy link

sh0rez commented Jan 27, 2019

What happened:
Attempting to enable SourceIP preservation as described here using externalTrafficPolicy: Local fails, as the IP-address seen by the pod is always the weave ip of the node.

What you expected to happen:
The client-ip should be preserved and the pod should be able to access it.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:
This should be related to weaveworks/weave#2924, as weave masquerades the local traffic by default. This is highly undesired, as applications like ingress-controllers need the source-ip for subnetting, rate-limiting, etc.
According to the issue linked above, this should be fixable by adding the env-var NO_MASQ_LOCAL=1 over here:

containers:
- name: weave
command:
- /home/weave/launch.sh
env:
- name: HOSTNAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: CONN_LIMIT
value: "0"

Environment:

  • Pharos version (use pharos --version): 2.1.2
  • Cloud provider or hardware configuration: KVM
  • OS (e.g. from /etc/os-release; both for the client and for the used nodes): ubuntu1604

cluster.yml:

hosts:
  # masters
  - address: "10.0.0.10"
    role: master

  # workers
  - address: "10.0.0.20"
    role: worker

network:
  provider: weave
@jakolehm jakolehm added the bug Something isn't working label Jan 28, 2019
@jakolehm jakolehm added this to the 2.2.0 milestone Jan 28, 2019
@jnummelin
Copy link
Contributor

Maybe this needs to be set as configurable option that is still disabled by default. I mean there's quite a few setups out there that actually might expect/depend on the way it currently works and now if we change this to default to no masquerading, we might break existing clusters.

I'll cook up a PR to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants