omni/internal/pkg/siderolink/siderolink.go
Utku Ozdemir 331fc31984
feat: run embedded discovery service in Omni
Run a discovery service instance inside Omni (enabled by default).

It listens only on the SideroLink interface on port 8093.

Clusters can opt in to use this embedded discovery service instead of the `discovery.talos.dev`. It is added as a new cluster feature both on frontend and in cluster templates.

Closes siderolabs/omni#20.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2024-06-06 01:11:17 +02:00

23 lines
559 B
Go

// Copyright (c) 2024 Sidero Labs, Inc.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
// Package siderolink implements siderolink manager.
package siderolink
import (
"net/netip"
"github.com/siderolabs/siderolink/pkg/wireguard"
)
// ListenHost is the host SideroLink should listen.
var ListenHost string
func init() {
siderolinkNetworkPrefix := wireguard.NetworkPrefix("")
ListenHost = netip.PrefixFrom(siderolinkNetworkPrefix.Addr().Next(), siderolinkNetworkPrefix.Bits()).Addr().String()
}