script

package
v0.0.0-...-08b716b Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomScript = `` /* 139-byte string literal not displayed */

CustomScript is the template for the custom script. It will either chain to a URL or execute an iPXE script.

View Source
var HookScript = `` /* 678-byte string literal not displayed */

HookScript is the default iPXE script for loading Hook.

Functions

func GenerateTemplate

func GenerateTemplate(d any, script string) (string, error)

Types

type Custom

type Custom struct {
	Chain  *url.URL
	Script string
}

Custom holds either a URL to chain to or a script to execute. There is no validation of the script.

type Handler

type Handler struct {
	Logger             logr.Logger
	Backend            handler.BackendReader
	OSIEURL            string
	ExtraKernelParams  []string
	PublicSyslogFQDN   string
	TinkServerTLS      bool
	TinkServerGRPCAddr string
}

func (*Handler) HandlerFunc

func (h *Handler) HandlerFunc() http.HandlerFunc

HandlerFunc returns a http.HandlerFunc that serves the ipxe script. It is expected that the request path is /<mac address>/auto.ipxe.

type Hook

type Hook struct {
	Arch              string   // example x86_64
	Console           string   // example ttyS1,115200
	DownloadURL       string   // example https://location:8080/to/kernel/and/initrd
	ExtraKernelParams []string // example tink_worker_image=quay.io/tinkerbell/tink-worker:v0.8.0
	Facility          string
	HWAddr            string // example 3c:ec:ef:4c:4f:54
	SyslogHost        string
	TinkerbellTLS     bool
	TinkGRPCAuthority string // example 192.168.2.111:42113
	TraceID           string
	VLANID            string // string number between 1-4095
	WorkerID          string // example 3c:ec:ef:4c:4f:54 or worker1
}

Hook holds the values used to generate the iPXE script that loads the Hook OS.

Jump to

Keyboard shortcuts

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