hlab

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HLAB_LABEL = "hlab.githedgehog.com/env"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env         string              `json:"env,omitempty"`
	MgmtNetwork string              `json:"mgmtNetwork,omitempty"`
	Disk        DiskConfig          `json:"disk,omitempty"`
	VMs         map[string]VMConfig `json:"vms,omitempty"`
}

func (*Config) Validate

func (c *Config) Validate() error

type DiskConfig

type DiskConfig struct {
	ImageID      string `json:"imageID,omitempty"`
	StorageClass string `json:"storageClass,omitempty"`
}

type HostDevice

type HostDevice struct {
	Name       string `json:"name,omitempty"`
	DeviceName string `json:"deviceName,omitempty"`
}

type Service

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

func Load

func Load(svcCfg *ServiceConfig) (*Service, error)

func (*Service) CleanupVMs

func (s *Service) CleanupVMs() error

func (*Service) CreateVMs

func (s *Service) CreateVMs(cleanupExisting bool) error

type ServiceConfig

type ServiceConfig struct {
	DryRun            bool
	Basedir           string
	ControlIgnition   string
	ServerIgnitionDir string
	FilesDir          string
	Config            string
	Kubeconfig        string
}

type VMConfig

type VMConfig struct {
	Description string       `json:"description,omitempty"`
	CPU         int          `json:"cpu,omitempty"`
	Memory      string       `json:"memory,omitempty"`
	Disk        string       `json:"disk,omitempty"`
	MgmtNetwork bool         `json:"mgmtNetwork,omitempty"`
	HostDevices []HostDevice `json:"hostDevices,omitempty"`
}

Jump to

Keyboard shortcuts

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