mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-30 18:21:11 +02:00
The issue is not so easy to fix, as GRPC tunnel on/off change requires two different flow for the link (interface): * no tunnel -> Talos link controller should create in-kernel `wireguard` link and no userspace components * tunnel on -> Talos link controller should never create the link, and only adjust WG settings via UAPI, while the actual link is created by the userspace implementation (it's a `tun` device) Transition between those two links is impossible for the link controller to distinguish, as it doesn't know that it has to drop old link and skip creating new one based on the information available. So, instead, use different names for the link in two states: `siderolink` for the kernel flow, and `siderolinktun` for the userspace flow. This fixes the issue of proper link cleanup/re-creation. Add integration tests. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
35 lines
804 B
Protocol Buffer
Executable File
35 lines
804 B
Protocol Buffer
Executable File
syntax = "proto3";
|
|
|
|
package talos.resource.definitions.siderolink;
|
|
|
|
option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/siderolink";
|
|
option java_package = "dev.talos.api.resource.definitions.siderolink";
|
|
|
|
import "common/common.proto";
|
|
|
|
// ConfigSpec describes Siderolink configuration.
|
|
message ConfigSpec {
|
|
string api_endpoint = 1;
|
|
string host = 2;
|
|
string join_token = 3;
|
|
bool insecure = 4;
|
|
bool tunnel = 5;
|
|
}
|
|
|
|
// StatusSpec describes Siderolink status.
|
|
message StatusSpec {
|
|
string host = 1;
|
|
bool connected = 2;
|
|
string link_name = 3;
|
|
bool grpc_tunnel = 4;
|
|
}
|
|
|
|
// TunnelSpec describes Siderolink GRPC Tunnel configuration.
|
|
message TunnelSpec {
|
|
string api_endpoint = 1;
|
|
string link_name = 2;
|
|
int64 mtu = 3;
|
|
common.NetIPPort node_address = 4;
|
|
}
|
|
|