Skip to content

Commit d3e3eef

Browse files
author
Dmitriy Matrenichev
committed
chore: support WG over GRPC in Omni
This PR adds the support for WG over GRPC. New field `VirtualAddrport` in `SiderolinkSpec` should allow for both setting the virtual addr and loading it after the Omni restart. Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
1 parent 1cc5fb9 commit d3e3eef

9 files changed

Lines changed: 338 additions & 73 deletions

File tree

‎client/api/omni/specs/siderolink.pb.go‎

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

‎client/api/omni/specs/siderolink.proto‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ message SiderolinkSpec {
2424
bool connected = 4;
2525
reserved 5;
2626
reserved 6;
27+
string virtual_addrport = 7;
2728
}
2829

2930
// SiderolinkConnectionSpec describes each node connection information.

‎client/api/omni/specs/siderolink_vtproto.pb.go‎

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

‎go.mod‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ require (
6969
github.com/siderolabs/image-factory v0.2.2
7070
github.com/siderolabs/kms-client v0.1.0
7171
github.com/siderolabs/omni/client v0.0.0-00010101000000-000000000000
72-
github.com/siderolabs/siderolink v0.3.4
72+
github.com/siderolabs/siderolink v0.3.5
7373
github.com/siderolabs/talos/pkg/machinery v1.7.0-beta.0
7474
github.com/sirupsen/logrus v1.9.3
7575
github.com/spf13/cobra v1.8.0
@@ -87,6 +87,7 @@ require (
8787
golang.org/x/sync v0.6.0
8888
golang.org/x/text v0.14.0
8989
golang.org/x/tools v0.19.0
90+
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
9091
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
9192
google.golang.org/grpc v1.62.1
9293
google.golang.org/protobuf v1.33.0
@@ -237,7 +238,6 @@ require (
237238
golang.org/x/term v0.18.0 // indirect
238239
golang.org/x/time v0.5.0 // indirect
239240
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
240-
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb // indirect
241241
google.golang.org/appengine v1.6.8 // indirect
242242
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
243243
google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda // indirect

‎go.sum‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ github.com/siderolabs/net v0.4.0 h1:1bOgVay/ijPkJz4qct98nHsiB/ysLQU0KLoBC4qLm7I=
491491
github.com/siderolabs/net v0.4.0/go.mod h1:/ibG+Hm9HU27agp5r9Q3eZicEfjquzNzQNux5uEk0kM=
492492
github.com/siderolabs/protoenc v0.2.1 h1:BqxEmeWQeMpNP3R6WrPqDatX8sM/r4t97OP8mFmg6GA=
493493
github.com/siderolabs/protoenc v0.2.1/go.mod h1:StTHxjet1g11GpNAWiATgc8K0HMKiFSEVVFOa/H0otc=
494-
github.com/siderolabs/siderolink v0.3.4 h1:850JRSSrD3EEDh35h6wiSTtRiGuclEc/6k4wx/It4nU=
495-
github.com/siderolabs/siderolink v0.3.4/go.mod h1:juxlSF9cBzeBHsOjS7hVS3s0NDpC034i/OZunVReqmo=
494+
github.com/siderolabs/siderolink v0.3.5 h1:sU4WNGCRGQYZ/sQZaVQbGfUNOqS561oL4kafKlo4FDY=
495+
github.com/siderolabs/siderolink v0.3.5/go.mod h1:/7Dg0Nkh4q/8yqsY/VirDOTOFOqRvPikagCoyf3+Mf4=
496496
github.com/siderolabs/talos/pkg/machinery v1.7.0-beta.0 h1:fOn3uKNKA1bzHGCeOoaE8Dy40UH9Z6PHaf/XYdFwVy8=
497497
github.com/siderolabs/talos/pkg/machinery v1.7.0-beta.0/go.mod h1:YBl9KDCD45Uc7N0rXBY1JqovUn1n46ekUPSNbEVZzQU=
498498
github.com/siderolabs/tcpproxy v0.1.0 h1:IbkS9vRhjMOscc1US3M5P1RnsGKFgB6U5IzUk+4WkKA=
@@ -738,8 +738,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
738738
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
739739
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
740740
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
741-
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb h1:c5tyN8sSp8jSDxdCCDXVOpJwYXXhmTkNMt+g0zTSOic=
742-
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA=
741+
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 h1:/jFs0duh4rdb8uIfPMv78iAJGcPKDeqAFnaLBropIC4=
742+
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA=
743743
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 h1:CawjfCvYQH2OU3/TnxLx97WDSUDRABfT18pCOYwc2GE=
744744
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6/go.mod h1:3rxYc4HtVcSG9gVaTs2GEBdehh+sYPOwKtyUWEOTb80=
745745
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=

‎hack/compose/docker-compose.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ version: '3.8'
77
services:
88
omni:
99
network_mode: host
10+
devices:
11+
- /dev/net/tun
1012
depends_on:
1113
- vault-dev
1214
- node-dev

0 commit comments

Comments
 (0)