siderolink

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package siderolink provides the function for encoding machine join configs and kernel args.

Index

Constants

This section is empty.

Variables

View Source
var MinSupportedSecureTokensVersion = semver.MustParse("1.6.0")

MinSupportedSecureTokensVersion is 1.6.0. Below 1.6.0 Talos doesn't properly report node unique tokens to Omni.

Functions

func GetListenHost

func GetListenHost() string

GetListenHost returns the default Omni wireguard peer endpoint inside the virtual network.

func SupportsSecureJoinTokens added in v1.1.0

func SupportsSecureJoinTokens(talosVersion string) bool

SupportsSecureJoinTokens checks if the Talos version supports secure join tokens.

Types

type JoinConfigOption

type JoinConfigOption func(*JoinConfigOptions)

JoinConfigOption is the additional options for the RenderJoinConfig function.

func WithEventSinkPort

func WithEventSinkPort(value int) JoinConfigOption

WithEventSinkPort specifies event sink port. Without the port it will not render the EventSink config section.

func WithGRPCTunnel

func WithGRPCTunnel(value bool) JoinConfigOption

WithGRPCTunnel overrides the gRPC tunnel config.

func WithJoinToken

func WithJoinToken(token string) JoinConfigOption

WithJoinToken adds the join token to the machine API URL. Without the token it will try to use tokenless access to Omni.

func WithJoinTokenVersion

func WithJoinTokenVersion(version string) JoinConfigOption

WithJoinTokenVersion sets the version of the join token.

If not set, it will default to jointoken.Version2.

func WithLogServerPort

func WithLogServerPort(value int) JoinConfigOption

WithLogServerPort specifies log server port. Without the port it will not render the KmsgLog config section.

func WithMachine

func WithMachine(machine *omni.Machine) JoinConfigOption

WithMachine renders the connection for the particular machine, it will take care of keeping the gRPC tunnel connection enabled, will populate the machine request ID if it's there.

func WithMachineAPIURL

func WithMachineAPIURL(value string) JoinConfigOption

WithMachineAPIURL sets the machine API URL. Without the API URL it will not render the SideroLink config section.

func WithMachineRequestID

func WithMachineRequestID(id string) JoinConfigOption

WithMachineRequestID renders the connection with the machine request ID encoded into the join token.

func WithProvider

func WithProvider(provider *infra.Provider) JoinConfigOption

WithProvider renders the join config for the provider.

func WithoutMachineAPIURL

func WithoutMachineAPIURL() JoinConfigOption

WithoutMachineAPIURL allows generating the config without the SideroLinkAPI section.

type JoinConfigOptions

type JoinConfigOptions struct {
	// contains filtered or unexported fields
}

JoinConfigOptions is the struct with all optional args for the RenderJoinConfig function.

type JoinOptions

type JoinOptions struct {
	// contains filtered or unexported fields
}

JoinOptions is the intermediate struct used in the kernel args and the partial config generation.

func NewJoinOptions

func NewJoinOptions(opts ...JoinConfigOption) (*JoinOptions, error)

NewJoinOptions creates the new JoinOptions.

func (*JoinOptions) GetKernelArgs

func (opts *JoinOptions) GetKernelArgs() []string

GetKernelArgs creates the Talos kernel arguments from the JoinOptions.

func (*JoinOptions) RenderJoinConfig

func (opts *JoinOptions) RenderJoinConfig(extraDocuments ...config.Document) ([]byte, error)

RenderJoinConfig creates the raw join config from the JoinOptions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL