Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RouteOperator idempotency #280

Merged
merged 1 commit into from
Sep 24, 2020
Merged

RouteOperator idempotency #280

merged 1 commit into from
Sep 24, 2020

Conversation

alacuku
Copy link
Member

@alacuku alacuku commented Sep 21, 2020

Description

This PR introduces a new way to manage the iptables rules for a remote peering cluster.
There are four general iptables chains:

  • LIQO-POSTROUTING
  • LIQO-PREROUTING
  • LIQO-FORWARD
  • LIQO-INPUT

for each peering cluster we create a postrouting, prerouting, forward and input chain. After each chain has been populated by rules based on the network parameters a reference for each of them is added to the general iptables chains.

All the methods used to manages the iptables rules and routes are idempotent. If some network parameters for peering cluster such as GatewayIP, PodCIDR change then the iptables rules and routes are updated accordingly to ensure the network connection with the peering cluster.

Fixes #257

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
unit tests

@alacuku alacuku force-pushed the kcl/routeOperatorIdempotency branch 13 times, most recently from 2615b30 to a2a0da0 Compare September 23, 2020 12:59
@coveralls
Copy link

coveralls commented Sep 23, 2020

Pull Request Test Coverage Report for Build 269194716

  • 180 of 458 (39.3%) changed or added relevant lines in 4 files are covered.
  • 132 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-1.7%) to 49.919%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/liqonet/route_mock.go 0 1 0.0%
pkg/liqonet/route.go 0 2 0.0%
internal/liqonet/route-operator.go 178 453 39.29%
Files with Coverage Reduction New Missed Lines %
internal/kubernetes/endpoints.go 4 76.33%
pkg/liqonet/route.go 6 0%
pkg/liqonet/iptables_mock.go 8 70.1%
internal/kubernetes/pod.go 12 9.21%
internal/liqonet/route-operator-config.go 13 0%
pkg/liqonet/route_mock.go 27 0%
internal/liqonet/route-operator.go 62 37.74%
Totals Coverage Status
Change from base Build 268911018: -1.7%
Covered Lines: 6778
Relevant Lines: 13578

💛 - Coveralls

@palexster
Copy link
Member

/rebase

@adamjensenbot
Copy link
Collaborator

Rebase status: success!

@alacuku alacuku force-pushed the kcl/routeOperatorIdempotency branch 2 times, most recently from d17fceb to 88a9bdf Compare September 23, 2020 17:27
@alacuku alacuku mentioned this pull request Sep 23, 2020
5 tasks
@alacuku alacuku changed the title [WIP]RouteOperator idempotency RouteOperator idempotency Sep 23, 2020
@palexster palexster merged commit 160adca into master Sep 24, 2020
@palexster palexster deleted the kcl/routeOperatorIdempotency branch September 24, 2020 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network Anomalies
5 participants