26 Commits

Author SHA1 Message Date
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
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
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
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
Aaron U'Ren
5ef989c4f9 fix(options): remove deprecated cluster-cidr option 2020-07-31 10:22:10 -05: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
CloudNativer
1c184624d1
The bgp-holdtime function parameter of setting holdtime is added to adjust the holdtime of BGP negotiation with the connected network devices. (#921)
The bgp-holdtime function parameter of setting holdtime is added to adjust the holdtime of BGP negotiation with the connected network devices.
2020-07-13 09:10:31 -05:00
Jean Raby
1c594b2827 Allow setting BGP Graceful restart time from CLI
Default value remains the same as GoBGP (90s)
2020-07-10 13:57:04 -05:00
Murali Reddy
4d6b0b818f
whitelist traffic to cluster IP and node ports in INPUT chain to bypass netwrok policy enforcement (#914)
* whitelist traffic to cluster IP and node ports in INPUT chain to bypass
netwrok policy enforcement

Fixes #905

* fix unit test failure

* ensure netpol firewall rules are configured after service proxy firewall rules
2020-06-09 16:36:31 +05:30
Arthur Outhenin-Chalandre
97c682e6f2
Ignore deletion of unknown IPVS rules (#830)
* add a --excluded-cidrs
* ignore deletion of ipvs rules with address in excluded cidrs

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2020-02-17 01:39:28 +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
Marcus Röder
803bd90256 Allow setting the BGP graceful restart deferral time. See RFC4724 4.1 (#753)
GoBGP's default value for deferral time is 360 seconds.
That means that the routes are not sent to the BGP peer until
this timer is elapsed, so a server is unreachable for 360
seconds, when kube-router restarts.

The new parameter is --bgp-graceful-restart-deferral-time duration_with_unit

For example '--bgp-graceful-restart-deferral-time 10s'
2019-08-22 13:43:13 -07:00
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
Lucas Mundim
8f9729a01d Introduces the option --overlay-type={subnet,full}, to be able to always generate IPIP tunnels regardless of node subnets (#666)
* Introduces the option --full-overlay, to always generate IPIP tunnels regardless of node subnets

* Use --overlay-type={subnet,full} instead of --full-overlay={true,false}
2019-03-23 23:31:42 +05:30
Lucas Mundim
00824cd84b Fix typo (#661) 2019-02-09 10:17:09 +05:30
Lars Ekman
535fcc5abe Added "--router-id=" parameter. (#563)
For ipv6 it is not possible to use the ip address as router-id
and this parameter is required.
2018-11-02 11:00:02 +05:30
rjosephwright
77459ddb2c Add CLI option to toggle disabling of source-dest-check in EC2 (#541)
When the number of nodes in a cluster is high enough, the
`disableSourceDestinationCheck()` logic creates a high number
of requests to EC2, resulting in throttling and subsequent
problems, such as the inability to attach EBS volumes. This is
not necessarily mitigated by the `ec2IamAuthorized` attribute
which was added to overcome this issue, as the number of
requests can still be high enough to reach Amazon's request
limits. In addition, it is not necessary to run this multiple
times in a loop for all the nodes in a cluster, as it is
sufficient to set it once when an instance boots.

This CLI option allows an administrator to turn off this
feature for kube-router so they can use some other means of
setting the attribute.
2018-09-23 00:20:37 +05:30
Johan Thomsen
1db83adfb9 Added support for custom BGP ports with 179 still being default (#492) (#493)
* Introduced new cmdline flag --bgp-port, which controls BGP Server listening port and remote port of in-cluster node peers

    * Introduced new cmdline flag --peer-router-ports, which controls remote BGP port for external peers

    * Introduced new node annotation kube-router.io/peer.ports with same effect as --peer-router-ports
2018-08-15 22:59:47 +05:30
Murali Reddy
86ba7840a6
Introduces the option --override-nexthop, to override the next hop used in advertised routes (#502)
* Introduces the option --override-nexthop, setting it to true will make
advertised next hop for the routers to the peers will be automatically
selected to be appropriate reachable local IP. This will be overrider
any next-hop set for the routes in the RIB. Kube-router by defauly set
the next-hop to `node IP` which is not correct in case of nodes with
multiple interfaces and use differnt interaces for differect external
peers.

Fixes #480

* add next-hop-self documentation
2018-08-13 20:12:55 +05:30
Jimmy Zhang
85d8df425d Improve health check for cache synchronization (#498)
* improve Control flow logic
* drop log,comment,sleep
* update user-guide.md
* set cache-sync-timeout default to 1m
2018-08-10 13:12:11 +02:00
Andrew Sy Kim
1c7866cd91 Allow CNI plugin to be disabled (#443) 2018-06-04 19:17:22 +07:00
Murali Reddy
41332a18b9
Ability to enable/disable node advertising its pod CIDR to external BGP peers (#408)
* Node should advertise its pod CIDR to external BGP peers only if
--advertise-node-pod-cidr is set to true (defaults to true).
This is to enable a case where pod's remain non-routable from out of the
cluster but service VIP's can be routable from out side the cluster.

* fix unit test

* address review comments
2018-04-23 18:32:59 +00:00
Murali Reddy
041c05570a
minimize sync()'s done by the controllers (#399)
* minimize sync() done by the controllers

* deprecate --config-sync-period

* review comments
2018-04-18 10:48:57 +05:30
Murali Reddy
71d16bf4d6
code restructuring as per typical golang projects (#397)
* code restructuring as per typical golang projects

* fix link in docs
2018-04-17 00:18:20 +05:30