mirror of
https://github.com/siderolabs/omni.git
synced 2025-08-10 03:26:58 +02:00
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>
23 lines
559 B
Go
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()
|
|
}
|