110 Commits

Author SHA1 Message Date
Jussi Nummelin
14a9e80e74 Enhance DSR docs aroung CRI socket mounting
Change the mount examples to use whole directory as the socket file might change during runtime and thus mounting the single file might break the behaviour in case of container runtime restarts.

Also simplified all the examples to use containerd as CRI as it's probably the most used CRI.

Signed-off-by: Jussi Nummelin <jnummelin@mirantis.com>
2024-09-12 16:56:02 -05:00
Billie Cleek
c0fd658d4c docs: fix annotation casing 2024-05-18 20:18:58 -05:00
Billie Cleek
9741733cca docs: improve scheduler docs
Fix a broken link and edit for active voice.

Document how to configure a service to use the maglev scheduler.
2024-05-18 20:18:58 -05:00
Aaron U'Ren
e40f46edbf fix(user-guide.md): update cleanup example 2024-04-26 14:16:09 -05:00
Jean-Philippe Evrard
4b011db7e8 Fix typo 2024-04-20 09:17:00 -05:00
Aaron U'Ren
1db3438b38
fix: rt_tables -> rt-tables in daemonset examples 2024-03-30 14:24:58 -05:00
Aaron U'Ren
70920609dc fix(rt_tables): add path fallback logic
Ever since version v6.5.0 of iproute2, iproute2 no longer automatically
creates the /etc/iproute2 files, instead preferring to add files to
/usr/lib/iproute2 and then later on /usr/share/iproute2.

This adds fallback path matching to kube-router so that it can find
/etc/iproute2/rt_tables wherever it is defined instead of just failing.

This also means people running kube-router in containers will need to
change their mounts depending on where this file is located on their
host OS. However, ensuring that this file is copied to `/etc/iproute2`
is a legitimate way to ensure that this is consistent across a fleet of
multiple OS versions.
2024-03-25 18:56:23 -05:00
Aaron U'Ren
614d47285c doc(DSR): add /etc/iproute2/rt_tables caveat 2024-03-19 07:13:40 -05:00
Aaron U'Ren
cff45a66a4
docs(index.md): improve styling 2024-03-17 14:39:19 -05:00
Aaron U'Ren
dda7ce6182 doc(cni): CNI requirements and install process 2024-01-31 14:40:45 -06:00
Aaron U'Ren
98eea791d1 doc(user-guide.md): add info about traffic policies 2024-01-24 09:05:24 -08:00
Aaron U'Ren
ced5102d99 feat(NSC): add IPVS service timeouts
This is a feature that has been requested a few times over the years and
would bring us closer to feature parity with other k8s network
implementations for service proxy.
2023-12-26 14:26:11 -06:00
Jason Piper
fcf0ad913d prometheus metrics: add option to specify listen address
In the situation that you have multiple interfaces/IP addresses,
we want to be able to specify which one we want to expose the
prometheus metrics on.
2023-11-05 18:49:13 -06:00
Aaron U'Ren
9d6b647457
doc(user-guide): remove bootkube, add k3s
Bootkube has been deprecated upstream, so its likely a lot less relevant
than it used to be when this doc was created.

Add that k3s uses our network policy implementation.
2023-10-21 18:15:43 -05:00
Aaron U'Ren
dad4991d85 doc: update and format all documentation 2023-10-19 18:22:35 -05:00
Aaron U'Ren
644268961a doc(user-guide.md): update formatting 2023-10-19 16:51:21 -05:00
Aaron U'Ren
dbd741a5b4 doc(introduction.md): update and format 2023-10-19 16:51:21 -05:00
Aaron U'Ren
43791045b6 doc(generic.md): update and format
Fixes: #1546
2023-10-19 16:51:21 -05:00
Aaron U'Ren
1957907b67 doc(kubeadm.md): update and format 2023-10-19 16:51:21 -05:00
Aaron U'Ren
34dd6409ee
doc(ipv6): update for v2.0.0 release 2023-10-07 15:24:01 -05:00
Erik Larsson
afdf553fa8 add loadbalancer address allocator
This adds a simple controller that will watch for services of type LoadBalancer
and try to allocated addresses from the specified IPv4 and/or IPv6 ranges.
It's assumed that kube-router (or another network controller) will announce the addresses.

As the controller uses leases for leader election and updates the service status new
RBAC permissions are required.
2023-10-07 08:52:31 -05:00
Aaron U'Ren
7699d165da doc(tunnels.md): add info about changing live clusters 2023-10-07 08:52:31 -05:00
Aaron U'Ren
ddf857de3a doc(tunnel): add information about tunnels
* Reflow existing documentation to fit markdown standards
* Adds caveats about Azure
* Gives information about tunnel types in kube-router
2023-10-07 08:52:31 -05:00
Aaron U'Ren
bac4ae6299 fix(FoU): add docs, sanity checking, and logic reduction 2023-10-07 08:52:31 -05:00
Kartik Raval
6ce37e6167 Support for FoU encapsulation for IPIP tunnel 2023-10-07 08:52:31 -05:00
Erik Larsson
76ffcbdb13 add generation of router id based on hash of primary IP
When enabled, generate the router id by hashing the primary IP.
With this no explicit router id has to be provided on IPv6-only clusters.

Signed-off-by: Erik Larsson <who+github@cnackers.org>
2023-10-07 08:52:31 -05:00
Aaron U'Ren
a2bb2ba880 doc(bgp.md): clean up grammar and syntax 2023-10-07 08:52:31 -05:00
Aaron U'Ren
b3e0768281 fix(options): make clusterIP specification similar to other options 2023-10-07 08:52:31 -05:00
Thomas Ferrandiz
6fea9c2d19 Validate that ClusterIP service range type matches the configuration
and update documentation
2023-10-07 08:52:31 -05:00
Thomas Ferrandiz
5b7da83c25 disable ipv6 by default 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
guoguangwu
b084c2aebc fix: available typo
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-03 18:37:49 -05:00
Aaron U'Ren
d6a4045d2e doc(ipv6): add differences in --override-nexthop 2023-08-13 17:20:43 -05:00
Aaron U'Ren
240cac29c9 doc(ipv6): add additional information
* Add a link to a release candidate from v2.0.0 pre-release
* Clean up wording in enabling dual-stack section
* Add information about policy dependence on enabled IP families
2023-01-26 14:58:28 +01:00
Aaron U'Ren
27f1d921b3 doc(ipv6.md): incorporate review feedback 2023-01-25 09:21:56 -06:00
Aaron U'Ren
e1b1a31a44 doc(ipv6.md): update for increased dual-stack support 2023-01-25 09:21:56 -06:00
Aaron U'Ren
7137ca3537 README.md: remove kube-router.io link 2022-11-18 11:38:41 -06:00
Richard Kojedzinszky
e6fd1b2519
Support for kube-router.io/peer.localips annotation (#1392)
* Support for kube-router.io/peer.localips annotation

* Fix checking for valid addresses in kube-router.io/peer.localips
2022-11-15 15:19:29 -06:00
Aaron U'Ren
24f87340ff doc(user-guide.md): add info for netfilter tooling
Add warning about userspace netfilter tooling not staying in sync
between daemonset and the host's userspace.
2022-10-20 08:35:40 -05:00
Lucas Mundim
badf8645be feat(bgp): add custom BGP import rejection policy support via node annotation 2022-03-23 09:27:38 -05:00
Aaron U'Ren
4fd7bc4d19 fix(sync_routes): add deletion / immediate syncing
Added the following items to the original logic:
* Added map route entry deletion on withdrawl so that the system doesn't
  incorrectly sync it back to the kernel's routing table
* Added an immediate route sync upon BGP path receive
* Added a mutex to ensure that deleted routes aren't accidentally synced
  back to the system
* Added stopCh and wg (wait group) handling
* Increase default sync time from 15 seconds to 1 minute since this
  scenario is unlikely and netlink calls could potentially be burdensome
  in large clusters.
2022-03-18 15:02:02 -05:00
RusoX89
23ac78cf94 Routes Synchronization Routine 2022-03-18 15:02:02 -05:00
Aaron U'Ren
61ed1849a0 doc(developing): remove broken link 2022-03-10 16:05:51 -06:00
Aaron U'Ren
4832bd13b0 doc: update kube-proxy cleanup commands 2022-03-10 22:50:36 +01:00
Aaron U'Ren
c5af115703 docs: clarify auto-mtu flag purpose 2022-02-11 17:34:10 -06:00
Aaron U'Ren
c3f90c54b3
Fix Misc DSR Issues (#1174)
* fact(NSC): consolidate constants to top

* fix(NSC): increase IPVS add service logging

* fix(NSC): improve logging for FWMark IPVS entries

* fix(NSC): add missing parameter to logging

* feat(NSC): generate unique FW marks

Because we trim the 32-bit FNV-1a hash to 16 bits there is the potential
for FW marks to collide with each other even for unique inputs of IP,
protocol, and port. This reduces that chance up to the 16-bit max by
keeping track of which FW marks we've already allocated and what IP,
protocol, port combo they've been allocated for.

Fixes #1045

* fact(NSC): move utility funcs to utils

* fix(NSC): reduce IPVS service shell outs

This also aligns it more with the almost identical function used for
non-FWmarked services ipvsAddService() which is also called from
setupExternalIPServices and passes in this same list of ipvsServices.

* fix(NSC): fix & consolidate DSR cleanup code

A lot of this is refactor work, but its important to know why the DSR
mangle tables were not being cleaned up in the first place. When we
transitioned to iptables-save to look over the mangle rules, we didn't
realize that iptables-save changes the format of the marks from integer
values (which is what the CLI works with) to hexadecimal.

This made it so that we were never actually matching on a mangle rule,
which left them all behind. When these mangle rules were left, it meant
that IPs that used to be part of a DSR service were essentially
black-holed on the system and were no longer route-able.

Fixes #1167

* doc(dsr): expand DSR documentation

fixes #1055

* ensure active service map is updated for non DSR services

Co-authored-by: Murali Reddy <muralimmreddy@gmail.com>
2021-10-14 16:14:05 +05:30
Aaron U'Ren
85f28411dc feat(.golangci.yml): enable long lines linter and remediate 2021-09-11 16:20:07 -05:00
Aaron U'Ren
14a03a624c fix(bgp.md): misspellings and doc conformance 2021-05-17 12:08:36 -05:00
Aaron U'Ren
9cbc3763b3 feat(bgp): add BGP communities support via node annotation 2021-05-17 12:08:36 -05:00
Aaron U'Ren
b2d8af483f doc(bgp.md): add info about password file configs 2021-05-17 12:08:36 -05:00