Skip to content

Commit 9c06846

Browse files
committed
feat: change the way excluded addresses are specified
The previous PR change has never been released, so it's still fine to change the structure. Instead of relying on filter expression which is somewhat confusing, and it doesn't allow proper exclusion of subnets (it matches on the address part of the subnet only). With this change, we can do the following: 1. The machine advertises address "10.0.0.0/8". 2. By default the whole "/8" block will be advertised. 3. We can make exclusion subnet "10.0.128.0/9", which will reduce advertised addresses to "10.0.0.0/9". Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent f71a14a commit 9c06846

File tree

3 files changed

+64
-46
lines changed

3 files changed

+64
-46
lines changed

β€Žapi/v1alpha1/client/affiliate.protoβ€Ž

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ message KubeSpan {
2424
string public_key = 1;
2525
bytes address = 2;
2626
repeated IPPrefix additional_addresses = 3;
27-
// Advertised filter is a list of filter expressions ("(!?)<cidr>") applied
28-
// to the additional_addresses and addresses.
29-
// If the expression starts with "!", the corresponding address is excluded.
30-
// Only addresses passing the filter are advertised to other peers.
31-
repeated string advertised_filter = 4;
27+
// ExcludeAdvertisedAddresses is used to exclude some of the addresses & additional addresses from being advertised to other affiliates.
28+
//
29+
// The final set of advertised subnets will be calculated as (addresses + additional_addresses) - exclude_advertised_addresses.
30+
//
31+
// If the list is empty, no exclusion is performed, and the full set is advertised.
32+
repeated IPPrefix exclude_advertised_addresses = 4;
3233
}
3334

3435
// IPPrefix contains CIDR.

β€Žapi/v1alpha1/client/pb/affiliate.pb.goβ€Ž

Lines changed: 19 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žapi/v1alpha1/client/pb/affiliate_vtproto.pb.goβ€Ž

Lines changed: 39 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)