9 Commits

Author SHA1 Message Date
JuanJo Ciarlante
bf5c11ff02 [jjo] support advertising status.loadBalancer.ingress IPs via flag (#354)
* [jjo] support advertising status.loadBalancer.ingress IPs via flag

* add `--advertise-loadbalancer-ip` flag, which will make Service's
  Ingress IP(s)set by the LoadBalancer to:
- be locally added to nodes' `kube-dummy-if` network interface
- be advertised to BGP peers

* support "kube-router.io/service.skiplbips=true" per Service
  annotation to selectively skip above

* refactor several functions with dupped code to streamline logic as:
  - `getIpsToAdvertise()` which calls ->
    - `getClusterIPs()`
    - `getExternalIPs()`
    - `getLoadBalancerIPs()`
    and contains nodeHasEndpoints logic, returns:
      (ipsToAdvertise, ipsToUnAdvertise)
  - advertiseIPs() which is essentially previous advertiseClusterIPs()
    (which was previously used to advertise _any_ IP actually, ie misnamed),
    with logic to un/advertise based on both passed arguments:
      (ipsToAdvertise, ipsToUnAdvertise)

* fix some leftovers from uselbips -> skiplbips annotation change
2018-03-27 01:47:04 +05:30
Murali Reddy
f708b14e1b
fix UT test case (#352) 2018-03-25 02:30:44 +05:30
Andrew Sy Kim
25923bead8 Test_addExportPolicies (#333)
* Test_addExportPolicies

* default export policy should always be REJECT
2018-03-23 06:28:04 +05:30
Andrew Sy Kim
4902a0c2f7 route advertisement should account for services using externalTrafficPolicy=Local (#334) 2018-03-13 11:13:24 +05:30
Murali Reddy
193776c568
prevent calling gobgp AddNeighbour call before GoBGP server is properly started (#296) 2018-02-01 01:56:40 +01:00
Andrew Sy Kim
78588fc3a3 tunnel interface names cannot be longer than 15 characters (#274) 2018-01-07 18:23:13 +05:30
Andrew Sy Kim
c07df49f63 unit tests for syncInternalPeers() (#268) 2018-01-03 23:41:06 +05:30
Andrew Sy Kim
50dcc32dd8 Unit Tests for Node Update Events (#265)
* activeNodes should not be a global variable for better testability

* OnNodeUpdate unit tests
2018-01-03 11:54:29 +05:30
Andrew Sy Kim
4eca430b63 route controller unit tests (#264) 2017-12-29 08:55:22 +05:30