Aaron U'Ren
8572f3a17f
fact(hairpin): remove one last direct ref of KUBE-ROUTER-HAIRPIN
2021-09-13 17:39:28 -05:00
Aaron U'Ren
5e1d033a44
fix(sysctl): revert is fatal check for some conditions
2021-09-13 17:39:28 -05:00
Aaron U'Ren
feb16d0d0b
doc(NSC): add some comments around DSR
2021-09-11 16:20:07 -05:00
Aaron U'Ren
8f3861de40
fact(sysctl): consolidate sysctl usage into utils
2021-09-11 16:20:07 -05:00
Aaron U'Ren
da5f8e0044
fix: address minor PR feedback and misspells
2021-09-11 16:20:07 -05:00
Aaron U'Ren
1d90e215e9
feat(.golangci.yml): enable stylecheck linter and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
85f28411dc
feat(.golangci.yml): enable long lines linter and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
874a746e30
feat(.golangci.yml): enable gosec and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
6208bfac46
feat(.golangci.yml): enable gomnd and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
f52fddddee
feat(.golangci.yml): enable gocritic and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
d6ccc22519
feat(.golangci.yml): enable goconst and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
c5f4c00d63
feat(.golangci.yml): enable dupl and remediate
2021-09-11 16:20:07 -05:00
Aaron U'Ren
35d334ca96
fix: add sleeps between iptables and ipset cleanup
...
I found that without taking a brief pause between iptables cleanup and
ipset deletion, sometimes the system still thought that there were
iptables references to the ipsets and would error instead of cleaning
the ipsets.
2021-08-05 16:39:28 -05:00
Aaron U'Ren
fb070265a2
fix(NSC): actually remove IPVS definitions
2021-08-05 16:39:28 -05:00
Aaron U'Ren
bbc0666a4c
fix(NSC): add exists checking to Cleanup()
2021-08-05 16:39:28 -05:00
Billie Cleek
d5a18cac67
remove IPVS metrics ( #1133 )
...
* remove IPVS metrics
Remove metrics for IPVS services when the IPVS service is deleted so
that the number of metrics does not grow without bound.
Fixes #734
* delete metricsMap key when IPVS service is removed
Delete the key in NetworkServicesController.metricsMap when the
respective IPVS configuration is removed.
Remove a period from a comment to conform to kube-router norms
* cleanup stale metrics in a distinct method
* remove unnecessary error return value on cleanupStaleMetrics
2021-07-31 01:25:58 +05:30
Aaron U'Ren
e9be04ef2f
fix: add nil checking to ipsetMutex cleanup actions ( #1129 )
2021-07-20 01:22:48 +05:30
Aaron U'Ren
fa8d69edd8
fix: add locking around ipset invocations
2021-06-01 10:42:08 -05:00
Aaron U'Ren
4306e5d47c
feat(DSR): make TCPMSS based on primary link MTU
2021-05-17 16:33:15 -05:00
icefed
e223ea80a1
Fix DSR(tunneling) mode mtu limit
...
https://github.com/cloudnativelabs/kube-router/issues/630
2021-05-17 16:33:15 -05:00
Alexander "Ananace" Olofsson
bd5ee4f708
fix(nsc): Overly eager IPVS updating
...
* fix(nsc): Overly eager IPVS updating
Switches the endpoint map comparison in OnEndpointsUpdate from being a
DeepEqual, to instead checking that all services exist, and that their
associated endpoints are similar.
Ordering is no longer considered important in regards to the IPVS
update check.
Fixes #1026
2021-04-21 17:25:16 -05:00
Manuel Rüger
8d4731737a
moq: Regenerate
2021-04-20 16:53:49 -05:00
Aaron U'Ren
be01f317c7
fact: other misc cleanups
2021-04-14 16:23:59 -05:00
Aaron U'Ren
53cfbe30eb
fix: return early when we might be holding nil references
2021-04-14 16:23:59 -05:00
Aaron U'Ren
4efa5ccc48
fact: remove function parameters that are never referenced
2021-04-14 16:23:59 -05:00
Aaron U'Ren
a86b3fad35
fact: handle errors from Close() explicitely
2021-04-14 16:23:59 -05:00
Aaron U'Ren
57ddac3a57
fact(NSC): consolidate repeat logic
2021-04-14 16:23:59 -05:00
Aaron U'Ren
96675e620b
fix: don't capitalize error messages
...
It is standard practice in Go to not capitalize error messages:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
2021-04-14 16:23:59 -05:00
Aaron U'Ren
e9c77d0a35
fix(comments): misspellings and bad doc strings
2021-04-14 16:23:59 -05:00
bazuchan
46f54e964f
Fix PMTU discovery for service IPs ( #733 )
2021-04-11 19:28:52 -05:00
Aurélien Dunand
5fc39db6a0
Add hairpin support for externalIps
...
Add an extra annotation for service in order to generate haipin related
iptables rules for externalsIps of the service.
2021-04-11 17:27:03 -05:00
Manuel Rüger
7d47aefe7d
Replace github.com/golang/glog with k8s.io/klog/v2
...
glog is effectively unmaintained and the kubernetes ecosystem is mainly
using its fork klog
Fixes : #1051
2021-04-11 13:16:03 -05:00
Murali Reddy
c309b276ae
skip logging Error when there is no Service object for an Endpoint
2021-03-24 14:30:27 -05:00
Aaron U'Ren
43c3c9de86
Handle headless services ( #1047 )
...
* doc(ecmp_vip.go): add info around extra withdraw
Rename getWithdraw to make it more explicit what its doing here. Also
add documentation as to why this is needed on Update and not
Create/Delete as well as why we only treat externalIPs.
* fix(ecmp_vip.go): remove superfluous AddPolicies
AddPolicies is already called downstream of nrc.OnEndpointsUpdate() so
there is no need to do it here as well, the only result is that this
expensive operation and idempotent operation is run twice.
* feat: better handling of headless services
Also introduces a consolidated Service utilities section for controller
functionality related to services that is shared.
* fix: add logging back to tryHandleServiceDelete
2021-03-24 08:31:39 +05:30
Murali Reddy
d1e1923b63
prevent iptable command calls when necessary rules already exists
2021-03-18 09:21:22 -05:00
ep4eg
ca2008e576
feat: simple CRI implementation in addition to Docker, required for DSR functionality. CRI compliant runtimes support (e.g. containerd, cri-o, etc.) ( #1027 )
...
* feat: simple CRI implementation in addition to Docker, required for DSR functionality. CRI compliant runtimes support (e.g. containerd, cri-o, etc.)
* upd: dependencies
* cleanup
* feat: cleanup gRPC connections after we did the job
* upd: go.sum
2021-02-08 20:04:13 +05:30
Murali Reddy
54b921f1f8
Merge remote-tracking branch 'iamakulov/master'
2021-01-04 16:56:41 +05:30
Philipp Schleier
fd5af1823f
Cleanup non-DSR externalIPs
2020-10-16 18:01:27 -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
Aaron U'Ren
c6ef3b8876
Merge pull request #975 from mrueg/conv-fix
...
Fix unnecessary conversions
2020-08-21 16:07:41 -05:00
Manuel Rüger
4d1fc8d6ec
Fix unnecessary conversions
2020-08-21 10:56:18 +02:00
Ivan Akulov
1a487d2140
Remove options passed to .Refresh()
...
To match the existing code behavior that existed for at least two years
2020-08-19 21:50:37 +03:00
Qingkun Li
7613a735de
add IfaceHasNoAddr check for external ip delete error ( #971 )
2020-08-14 19:41:09 +05:30
Aaron U'Ren
e35dc9d61e
Merge pull request #958 from coufalja/random-all
...
Add --random-fully to MASQ iptables rules to mitigate conntrack issues
2020-08-04 16:49:06 -05:00
jakub.coufal
68dba40d58
Clean original iptables rule if --random-fully is supported
2020-08-04 07:33:17 +02:00
Murali Reddy
a33089d292
[testing] run go linters ( #943 )
...
* run go linters for static code checking
* fix(lint): fix all goimports linting errors
* fix(lint): fix all golint errors
* fix(lint): fix all spelling errors
Co-authored-by: Aaron U'Ren <aauren@gmail.com>
2020-07-28 23:52:41 +05:30
jakub.coufal
d66a3bb06e
Activate --random-fully where supported
2020-07-27 14:43:06 +02:00
Aaron U'Ren
aec73b8716
fix(nsc): update IPVS svc when timeout changes ( #952 )
...
* fix(nsc): update IPVS svc when timeout changes
fixes #910
* fix(nsc): remove double-handling of sched flags
2020-07-16 07:29:59 +05:30
Murali Reddy
b6acd0a152
stop processing service and endpoints updates if network service ( #939 )
...
controller has already shutdown
fixes panic seen in #937
2020-06-29 18:26:19 +05:30
Billie Cleek
c71eb9ad82
proxy: only output Error log when there's an error ( #942 )
...
Fixes #941
2020-06-25 10:44:03 +05:30