594 Commits

Author SHA1 Message Date
Murali Reddy
888cac9193 use iptables-save and iptables-restore commands to consolidate
individual iptables command that are run during full network
policies sync
2021-03-18 09:21:22 -05:00
Manuel Rüger
8f2e26a6c6
Update deps for k8s, cni and golang (#1030)
* go.mod: Update k8s dependencies to 0.20.2

* go.mod: Update coreos/iptables-0.5.0 cni/plugins-0.9.1

* Makefile: Update container image
2021-02-17 17:40:11 +05:30
Manuel Rüger
81057340e1
metrics: Add metric for build_info (#1031) 2021-02-17 09:27:52 +05:30
yydzhou
49b9add056
Making IPIP/tunnel and override-nexthop independent (#1025)
* enable tunnel plus override-nexthop config

* add docs

* feedback integration

Co-authored-by: deng.zhou <deng.zhou@bytedance.com>
2021-02-09 18:44:56 +05:30
Murali Reddy
53d66ebd38 adding missing vendor files 2021-02-08 23:47:41 +05:30
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
Marc Riddle
2ba6f40829
It appears as though this line is no longer relevant (#1029) 2021-02-08 17:41:10 +05:30
Manuel Rüger
ee9f6d890d
Update dependencies (go-iptables, cni) (#996)
* go.mod: Vendor coreos/go-iptables 0.4.5

* go.mod: Vendor containernetworking/plugins v0.8.0

* Update implementation to work with libcni 0.8.0

* go.mod: Vendor containernetworking/plugins v0.9.0
2021-01-18 19:03:51 +05:30
Manuel Rüger
c4eba17a6c
Makefile: Drop outdated glide command (#1018) 2021-01-18 19:02:51 +05:30
Murali Reddy
c145885354 resolving merge conflicts of PR-964 2021-01-04 17:33:31 +05:30
Murali Reddy
54b921f1f8 Merge remote-tracking branch 'iamakulov/master' 2021-01-04 16:56:41 +05:30
lcavajani
4e13a1db62
Update RBAC apiVersion from v1beta1 to v1 (#1016)
rbac.authorization.k8s.io/v1 is stable since 1.8, updating
it avoids warnings when applying the manifests on recent versions
of Kubernetes (v1.19+).

Signed-off-by: lcavajani <lcavajani@suse.com>
2020-12-21 16:50:02 +05:30
Murali Reddy
e16f2077dd
npc code restructuring (#1007) 2020-12-16 18:40:00 +05:30
Aaron U'Ren
f8aed0c92a fix(nrc): multiple services with the same VIP
Properly consider the readiness of all services in the case where
multiple services share the same VIP. Don't withdraw a VIP just because
one service is not ready.
v1.1.1
2020-12-11 11:05:33 -06:00
Murali Reddy
46e903aa13
remove deprecated netpol beta API support (#1001)
* remove deprecated netpol beta API support

* removing unused function
2020-11-26 21:24:32 +05:30
Manuel Rüger
7769a0cb34 Update golang.org/x/net dependency 2020-11-20 16:55:34 +01:00
Manuel Rüger
def8f5473a Update to golang 1.15 and alpine-3.12 2020-11-19 17:26:57 +01:00
George Gaál
2b3f39c25e
Update bgp.md (#1000)
fix the typo
2020-10-29 17:38:40 +05:30
Philipp Schleier
fd5af1823f Cleanup non-DSR externalIPs 2020-10-16 18:01:27 -05:00
Murali Reddy
400e49636c update go.sum v1.1.0 2020-10-03 02:22:38 +05:30
Manuel Rüger
d1a23160f4
.gitignore: Drop vendor folder (#993)
This was likely required for old-style vendoring and shouldn't be
necessary for the current version of kube-router
2020-10-03 00:53:50 +05:30
ᗪєνιη ᗷυнʟ
8e3f36c679
Add LoadBalancer to getExternalIPs (#995)
* add LoadBalancer to getExternalIPs

* fix up network_routes_controller tests

* update ecmp_vip tests
2020-10-02 16:34:14 +05:30
Murali Reddy
92b914e7fd review comments 2020-10-01 23:00:36 -05:00
Murali Reddy
7904b7c950 addressing review comments 2020-10-01 23:00:36 -05:00
Murali Reddy
947bb246e4 fix lint error 2020-10-01 23:00:36 -05:00
Murali Reddy
db1bd5611e set mtu in cni spec to auto configure MTU's of the pod's veth's and kube-bridge interfaces
Fixes #165
2020-10-01 23:00:36 -05:00
Manuel Rüger
d32d651d63
go.mod: Vendor newer prometheus and k8s (#990)
This vendors a later version of prometheus' golang client (0.8.0 ->
0.9.4) to allow `go mod tidy`to work properly.
It also updates the k8s libraries from 0.18.6 to 0.18.8 to avoid
hitting https://github.com/kubernetes/kubernetes/issues/91073
2020-09-30 09:40:07 +05:30
Aaron U'Ren
5a5e835d0f
fix(network_policy): mask mark reset on FW marks (#992)
Don't resent all marks, only the mark that we originally set as part of
the firewall rules so that we don't affect other systems like hostPort
and other elements of the nat chain that may apply their own marks.
2020-09-26 03:04:27 +05:30
Aaron U'Ren
824614d162
Add Support for Reading Peer Passwords via a File (#986)
* Add support for reading peer passwords via a file

Syntax of the file is the same as for --peer-router-passwords, that is,
a comma separated list of base64 encoded passwords.

Passwords specified with --peer-router-passwords have precedence over
passwords read from peer-router-passwords-file.

* fix(options): peer password file linting and doc

Co-authored-by: Jean Raby <jean@raby.sh>
2020-09-08 16:16:21 -05:00
Murali Reddy
ac556abeed pin goreleaser to v0.142.0, latest is causing errors v1.1.0-rc1 2020-09-08 02:27:27 +05:30
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
cebe8b7352
Merge pull request #981 from cloudnativelabs/lint-errors
fix build break due to go linter errros
2020-09-03 13:52:28 -05:00
Murali Reddy
3b992e4c45 fix build break due to go linter errros 2020-09-04 00:04:22 +05:30
Aaron U'Ren
7cd5235b69 fix(network_policy): missed gofmt on #970 2020-08-27 01:13:48 +02:00
Aaron U'Ren
827ce5510a
Permit ExternalIP on input (#970)
* fact(network_policy): validate ClusterIP CIDR

Ensure that --service-cluster-ip-range is a valid CIDR while controller
is starting up.

* fix(network_policy): parse/validate NodePort

Validate the NodePort range that is passed and allow for it to be
specified with hyphens which is what the previous example used to show
and is more cohesive with the way NodePort ranges are specified when
passed to the kube-apiserver.

* test(network_policy): add tests for input validation

* feat(network_policy): permit ExternalIP on input

fixes #934

* fix(network_policy): ensure pos with index offset

Because iptables list function now appears to be returning -N and -P
items in the chain results, we need to account for them when taking into
consideration the rule position.

* fix(network_policy): add uuid to comments on ensure

iptables list is now no longer keeping the position of parameters which
means that we can't compare string to string. In absence of a better way
to handle this, this adds a UUID to the comment string which can then be
looked for when determining what position a rule occupies.
2020-08-25 21:27:35 +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
Aaron U'Ren
b7610a0606
Merge pull request #974 from aauren/add_kube-router_options_to_issue_template
feat(bug_report.md): add parameters section to bug report
2020-08-19 15:23:35 -05:00
Ivan Akulov
4c05ef2085
Return an error if BatchAdd errors 2020-08-19 22:26:08 +03: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
Aaron U'Ren
b4203cb537 feat(bug_report.md): add parameters section to bug report 2020-08-19 13:08:15 -05:00
Qingkun Li
7613a735de
add IfaceHasNoAddr check for external ip delete error (#971) 2020-08-14 19:41:09 +05:30
Aaron U'Ren
0cca5f1223
Merge pull request #969 from aauren/fact/sort_options
Sort Options
2020-08-13 22:37:58 -05:00
Aaron U'Ren
f6210dac4f fact(options): alphabetize imports 2020-08-11 22:19:09 -05:00
Aaron U'Ren
797ee0ae4b fact(options): alphabetize options by parameter name 2020-08-11 22:18:52 -05:00
Aaron U'Ren
202f92bb1b fact(options): alphabetize struct fields 2020-08-11 22:18:10 -05:00
Manuel Rüger
4307bdd19c
ISSUE_TEMPLATE: Add missing headers (#966) 2020-08-06 12:20:44 +02:00
Manuel Rüger
36daba8762
Setup Issue Templates (#963)
https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository
2020-08-06 15:24:38 +05:30
Ivan Akulov
a79ededd3c
Improve ipset performance with large sets
This commit updates kube-router to use `ipset restore` instead of calling `ipset add` multiple times in a row. This significantly improves its performance when working with large sets of rules.

Ref: https://github.com/cloudnativelabs/kube-router/issues/962
2020-08-05 22:54:30 +03:00
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