12 Commits

Author SHA1 Message Date
Aaron U'Ren
c3f90c54b3
Fix Misc DSR Issues (#1174)
* fact(NSC): consolidate constants to top

* fix(NSC): increase IPVS add service logging

* fix(NSC): improve logging for FWMark IPVS entries

* fix(NSC): add missing parameter to logging

* feat(NSC): generate unique FW marks

Because we trim the 32-bit FNV-1a hash to 16 bits there is the potential
for FW marks to collide with each other even for unique inputs of IP,
protocol, and port. This reduces that chance up to the 16-bit max by
keeping track of which FW marks we've already allocated and what IP,
protocol, port combo they've been allocated for.

Fixes #1045

* fact(NSC): move utility funcs to utils

* fix(NSC): reduce IPVS service shell outs

This also aligns it more with the almost identical function used for
non-FWmarked services ipvsAddService() which is also called from
setupExternalIPServices and passes in this same list of ipvsServices.

* fix(NSC): fix & consolidate DSR cleanup code

A lot of this is refactor work, but its important to know why the DSR
mangle tables were not being cleaned up in the first place. When we
transitioned to iptables-save to look over the mangle rules, we didn't
realize that iptables-save changes the format of the marks from integer
values (which is what the CLI works with) to hexadecimal.

This made it so that we were never actually matching on a mangle rule,
which left them all behind. When these mangle rules were left, it meant
that IPs that used to be part of a DSR service were essentially
black-holed on the system and were no longer route-able.

Fixes #1167

* doc(dsr): expand DSR documentation

fixes #1055

* ensure active service map is updated for non DSR services

Co-authored-by: Murali Reddy <muralimmreddy@gmail.com>
2021-10-14 16:14:05 +05:30
Aaron U'Ren
c5f4c00d63 feat(.golangci.yml): enable dupl and remediate 2021-09-11 16:20:07 -05:00
Aaron U'Ren
4306e5d47c feat(DSR): make TCPMSS based on primary link MTU 2021-05-17 16:33:15 -05:00
Manuel Rüger
8d4731737a moq: Regenerate 2021-04-20 16:53:49 -05:00
Murali Reddy
3c734fb96a
merge gobgp-update into master (#982)
* merge gobgp-update into master

* update travis.yaml go version:

* go get github.com/osrg/gobgp to build gobgp

* install git as go get needs it
2020-09-07 10:27:58 +05:30
bumyongchoi
f5db29e36d
honor the ClientIP session affinity timeout when set. (#882)
* honor the ClientIP session affinity timeout

* update moq file

* Fix unit test failure due to adding a new arg to ipvsAddService

Co-authored-by: Bumyong Choi <bchoi@digitalocean.com>
2020-04-23 17:10:30 +05:30
Aaron Layfield
05d03e7686 #797 Conditionally disable "Allow All" input/chain on IPVS KUBE-ROUTER-SERVICES (#809)
* Added flag and condition for open input on iptables #797

* Adding flag to docs.

* Updated to remove INPUT/CHAIN entirely. Name changed to IpvsDenyAll.

* Updated README.

* Updated docstring on ipvs-deny-all

* ipvsDenyAll -> ipvsPermitAll

* Updating user guide.

* Descriptions updates per review
2019-12-05 16:13:38 +05:30
Joakim Karlsson
54eedcd049 Issue 572 - Graceful termination + Update to go-1.10.8, alpine-3.9 (#706)
* update netlink

* update libnetwork to get ipvs stats

* update gopkg.lock for libnetwork update

* update libnetwork

* add cli options

* make endpoints delete gracefully

* move conntrack flusher

* get some order in the mainloop

* update to alpine 3.9 & go 1.11.1

* revert to 1.10.3 just update alpine

* and revert travis.yml

* lock version

* test 1.12

* test
2019-04-25 22:57:10 +05:30
Inju Song
cf9bf47d52 Integrate ip_vs_mh scheduler into kube-router (#564)
* Add to set ip_vs_mh scheduler and flags

Signed-off-by: Inju Song <inju.song@navercorp.com>

* Use scheduler flags when adding or updating service

Signed-off-by: Inju Song <inju.song@navercorp.com>

* Refactor with gofmt, generate moq file and fix test source

Signed-off-by: Inju Song <inju.song@navercorp.com>
2018-11-12 14:13:07 +01:00
Murali Reddy
827bbbcd4d
infer endpoint is local from endpoints "subset.addresses.nodeName" (#560)
Fixes #557
2018-10-27 09:19:24 +05:30
Murali Reddy
21075348a3
Fixes regression, where adding service VIP to the tunnel interface inside the pods when DSR is used was failing (#462) 2018-06-08 14:09:54 +05:30
Murali Reddy
05bec8b385
break controller package to independent packages (#405) 2018-04-22 13:25:58 +00:00