Fix docs and kgctl

This commit is contained in:
Simon Kirsten 2022-08-05 14:11:18 +02:00
parent fc0538c6d3
commit 268fdeb4ee
No known key found for this signature in database
GPG Key ID: 1F38AF0D1DE126FA
3 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,7 @@ var (
availableGranularities = strings.Join([]string{
string(mesh.LogicalGranularity),
string(mesh.FullGranularity),
string(mesh.CrossGranularity),
string(mesh.AutoGranularity),
}, ", ")
availableLogLevels = strings.Join([]string{
@ -80,6 +81,7 @@ func runRoot(c *cobra.Command, _ []string) error {
switch opts.granularity {
case mesh.LogicalGranularity:
case mesh.FullGranularity:
case mesh.CrossGranularity:
case mesh.AutoGranularity:
default:
return fmt.Errorf("mesh granularity %s unknown; posible values are: %s", granularity, availableGranularities)
@ -151,8 +153,9 @@ func determineGranularity(gr mesh.Granularity, ns []*mesh.Node) (mesh.Granularit
switch ret {
case mesh.LogicalGranularity:
case mesh.FullGranularity:
case mesh.CrossGranularity:
default:
return ret, fmt.Errorf("mesh granularity %s is not supported", opts.granularity)
return ret, fmt.Errorf("mesh granularity %s is not supported", ret)
}
return ret, nil
}

View File

@ -48,7 +48,7 @@ Flags:
--local Should Kilo manage routes within a location? (default true)
--log-level string Log level to use. Possible values: all, debug, info, warn, error, none (default "info")
--master string The address of the Kubernetes API server (overrides any value in kubeconfig).
--mesh-granularity string The granularity of the network mesh to create. Possible values: location, full (default "location")
--mesh-granularity string The granularity of the network mesh to create. Possible values: location, full, cross (default "location")
--mtu uint The MTU of the WireGuard interface created by Kilo. (default 1420)
--port int The port over which WireGuard peers should communicate. (default 51820)
--prioritise-private-addresses Prefer to assign a private IP address to the node's endpoint.

View File

@ -334,6 +334,7 @@ func translateNode(node *v1.Node, topologyLabel string) *mesh.Node {
switch meshGranularity {
case mesh.LogicalGranularity:
case mesh.FullGranularity:
case mesh.CrossGranularity:
default:
meshGranularity = ""
}