provider

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MPL-2.0 Imports: 41 Imported by: 0

Documentation

Overview

Package provider implements the bare metal infra provider.

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	Name:                   "Bare Metal",
	Description:            "Bare metal infrastructure provider",
	ImageFactoryBaseURL:    "https://factory.talos.dev",
	ImageFactoryPXEBaseURL: "https://pxe.factory.talos.dev",
	AgentModeTalosVersion:  "v1.9.3",
	BootFromDiskMethod:     string(ipxe.BootIPXEExit),
	IPMIPXEBootMode:        string(pxe.BootModeUEFI),
	APIPort:                50042,
	MinRebootInterval:      5 * time.Minute,
	Redfish:                redfish.DefaultOptions,
	TLS: TLSOptions{
		Enabled:         false,
		APIPort:         50043,
		AgentSkipVerify: false,
		CATTL:           30 * 365 * 24 * time.Hour,
		CertTTL:         24 * time.Hour,
	},
}

DefaultOptions returns the default provider options.

Functions

func BuildCOSIRuntime added in v0.1.1

func BuildCOSIRuntime(state state.State, enableResourceCache bool, logger *zap.Logger) (*runtime.Runtime, error)

BuildCOSIRuntime creates a new COSI runtime wrapping the given state, registering the provider-specific resources.

func RegisterResources added in v0.1.2

func RegisterResources() error

RegisterResources registers the provider-specific resources' protobuf marshaler/unmarshalers.

Types

type Options

type Options struct {
	Name                   string
	Description            string
	OmniAPIEndpoint        string
	ImageFactoryBaseURL    string
	ImageFactoryPXEBaseURL string
	AgentModeTalosVersion  string // todo: get this from Omni. Warning: needs to be Talos 1.9 with agent code inside
	APIListenAddress       string
	APIAdvertiseAddress    string
	APIPowerMgmtStateDir   string
	DHCPProxyIfaceOrIP     string
	BootFromDiskMethod     string
	IPMIPXEBootMode        string
	MachineLabels          []string
	APIPort                int

	EnableResourceCache   bool
	AgentTestMode         bool
	InsecureSkipTLSVerify bool
	UseLocalBootAssets    bool
	ClearState            bool
	WipeWithZeroes        bool
	DisableDHCPProxy      bool

	TLS     TLSOptions
	Redfish redfish.Options

	MinRebootInterval time.Duration
}

Options contains the provider options.

type Provider

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

Provider implements the bare metal infra provider.

func New

func New(options Options, logger *zap.Logger) *Provider

New creates a new Provider.

func (*Provider) Run

func (p *Provider) Run(ctx context.Context) error

Run runs the provider.

type TLSOptions added in v0.1.1

type TLSOptions struct {
	APIPort         int
	CATTL           time.Duration
	CertTTL         time.Duration
	Enabled         bool
	AgentSkipVerify bool
}

TLSOptions contains the TLS options.

Directories

Path Synopsis
Package agent implements the metal agent service.
Package agent implements the metal agent service.
bmc
Package bmc provides BMC functionality for machines.
Package bmc provides BMC functionality for machines.
api
Package api provides BMC functionality using an HTTP API, e.g., the HTTP API run by 'talosctl cluster create'.
Package api provides BMC functionality using an HTTP API, e.g., the HTTP API run by 'talosctl cluster create'.
ipmi
Package ipmi provides BMC functionality using IPMI.
Package ipmi provides BMC functionality using IPMI.
pxe
Package pxe contains types related to PXE booting.
Package pxe contains types related to PXE booting.
redfish
Package redfish provides BMC functionality using Redfish.
Package redfish provides BMC functionality using Redfish.
Package config serves machine configuration to the machines that request it via talos.config kernel argument.
Package config serves machine configuration to the machines that request it via talos.config kernel argument.
Package constants provides constants for the provider package.
Package constants provides constants for the provider package.
Package controllers implements COSI controllers for the bare metal provider.
Package controllers implements COSI controllers for the bare metal provider.
Package debug provides a way to check if the build is a debug build.
Package debug provides a way to check if the build is a debug build.
Package dhcp implements DHCP proxy and other DHCP related functionality.
Package dhcp implements DHCP proxy and other DHCP related functionality.
Package imagefactory provides an abstraction to the image factory for the bare metal infra provider.
Package imagefactory provides an abstraction to the image factory for the bare metal infra provider.
Package ip provides IP address related functionality.
Package ip provides IP address related functionality.
Package ipxe provides iPXE functionality.
Package ipxe provides iPXE functionality.
Package machine provides utilities for determining the required state of a machine.
Package machine provides utilities for determining the required state of a machine.
Package machineconfig builds the machine configuration for the bare-metal provider.
Package machineconfig builds the machine configuration for the bare-metal provider.
Package meta contains meta information about the provider.
Package meta contains meta information about the provider.
Package resources contains the resources internal to the provider.
Package resources contains the resources internal to the provider.
Package server implements the HTTP and GRPC servers.
Package server implements the HTTP and GRPC servers.
Package tftp implements a TFTP server.
Package tftp implements a TFTP server.
Package tls provides the TLS configuration for the provider.
Package tls provides the TLS configuration for the provider.

Jump to

Keyboard shortcuts

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