10 Commits

Author SHA1 Message Date
Thomas Ferrandiz
26d06c40aa Turn IPTablesSaveRestore into an interface 2023-10-07 08:52:31 -05:00
Michal Rostecki
5d04a9fd97 netpol: Add dual-stack support
This change allows to define two cluster CIDRs for compatibility with
Kubernetes dual-stack, with an assumption that two CIDRs are usually
IPv4 and IPv6.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2023-10-07 08:52:31 -05:00
Marcelo Juchem
39116b757e logging ipset/iptables commands
This PR logs `ipset` and `iptables` commands at log level 9.

I've recently encountered an issue with Kubernetes v1.24.0 and
`kube-router` v1.5.1 where the node's network goes bonkers as soon as
`NetworkPolicyController::syncNetworkPolicyChains` is executed (last log
line is "Syncing network policy chains took 48.780838ms"). After that,
`ssh` freezes and `kubelet` becomes inacessible.

Debugging this issue proved to be quite daunting, specially due to the
lack of insight on which network policies are being applied.

Adding these logs have helped the debugging process immensely so far.
2022-08-27 20:13:56 -05:00
Xiang Liu
492e0d126b fix(NPC): make code more understandable 2022-03-15 12:06:22 -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
b8a795ec32 feat(.golangci.yml): enable gochecknoinits and remediate 2021-09-11 16:20:07 -05:00
Aaron U'Ren
bffdc729cc
fix(npc): ordering of firewall / service rules (#1144) 2021-08-10 03:59:17 +05:30
Murali Reddy
73b1b03b32 cache the check of wait option support in iptables-restore 2021-06-29 18:26:58 -05:00
Murali Reddy
751981c318 update alpine image to 3.14 for latest iptables-restore command
with --wait option, and use wait where its available
2021-06-29 18:26:58 -05:00
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