pkg/ cmd/: kgctl autodetect mesh granularity

Addes granularity annotation to auto detect the mesh granularity when
using kubectl

Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
leonnicolas
2021-06-18 12:10:23 +02:00
parent 0d1d4fa052
commit 088578b055
9 changed files with 64 additions and 2 deletions

View File

@@ -47,6 +47,9 @@ const (
// FullGranularity indicates that the network should create
// a mesh between every node.
FullGranularity Granularity = "full"
// AutoGranularity can be used with kgctl to obtain
// the granularity automatically.
AutoGranularity Granularity = "auto"
)
// Node represents a node in the network.
@@ -68,6 +71,7 @@ type Node struct {
WireGuardIP *net.IPNet
DiscoveredEndpoints map[string]*wireguard.Endpoint
AllowedLocationIPs []*net.IPNet
Granularity Granularity
}
// Ready indicates whether or not the node is ready.