types

package
v0.0.0-...-ba1867d Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBSizes = map[string]DBSize{
	"small": DBSize{
		Name: "small",
		RAM:  1024,
		CPU:  1,
		Disk: 10,
	},
	"medium": DBSize{
		Name: "medium",
		RAM:  2048,
		CPU:  2,
		Disk: 20,
	},
	"large": DBSize{
		Name: "large",
		RAM:  4096,
		CPU:  4,
		Disk: 40,
	},
}

DBSizes is a map of database sizes.

View Source
var DBTypes = map[string]DBType{
	"mysql": DBType{
		Name:      "mysql",
		Image:     "mysql:8.0",
		MountPath: "/var/lib/mysql",
		Port:      3306,
	},
	"postgres": DBType{
		Name:      "postgres",
		Image:     "postgres:15",
		MountPath: "/var/lib/postgresql/data",
		Port:      5432,
	},
}

DBTypes is a map of database types.

View Source
var LLMTypes = map[string]LLM{
	"llama3": LLM{
		Name:   "llama3",
		Image:  "llama3",
		Memory: 1024,
		CPU:    1,
	},
}
View Source
var ReservedNamespaces = map[string]bool{
	"default":              true,
	"longhorn-system":      true,
	"kube-system":          true,
	"kube-public":          true,
	"kube-node-lease":      true,
	"cnpg-system":          true,
	"clickhouse-system":    true,
	"kubevirt-manager":     true,
	"kubevirt":             true,
	"kubernetes-dashboard": true,
	"monitoring":           true,
	"mysql-operator":       true,
}

ReservedNamespaces is a map of reserved namespaces

View Source
var VMImages = map[string]VMImage{
	"ubuntu24": VMImage{
		Image: "quay.io/containerdisks/ubuntu:24.04",
	},
	"fedora41": VMImage{
		Image: "quay.io/containerdisks/fedora:41",
	},
}

VMImages is a map of virtual machine images.

View Source
var VMSizes = map[string]VMSize{
	"small": VMSize{
		Name: "small",
		RAM:  1024,
		CPU:  1,
		Disk: 10,
	},
	"medium": VMSize{
		Name: "medium",
		RAM:  2048,
		CPU:  2,
		Disk: 20,
	},
	"large": VMSize{
		Name: "large",
		RAM:  4096,
		CPU:  4,
		Disk: 40,
	},
}

VMSizes is a map of virtual machine sizes.

Functions

This section is empty.

Types

type Container

type Container struct {
	// Name is the name of the container.
	Name string `json:"name"`
	// Namespace is the namespace of the container.
	Namespace string `json:"namespace"`
	// Image is the image of the container.
	Image string `json:"image"`
	// Port is the port of the container.
	Port int `json:"port"`
	// CPU is the CPU of the container.
	CPU int `json:"cpu"`
	// RAM is the RAM of the container.
	RAM int `json:"ram"`
	// Disk is the disk of the container.
	Disk int `json:"disk"`
	// Volume is the volume of the container.
	Volume string `json:"volume"`
	// MountPath is the mount path of the container.
	MountPath string `json:"mountPath"`
	// Env is the environment variables of the container.
	Env []string `json:"env"`
}

Container is a container.

type DB

type DB struct {
	// Name is the name of the database.
	Name string `json:"name"`
	// Namespace is the namespace of the database.
	Namespace string `json:"namespace"`
	// Type is the type of the database.
	Type string `json:"type"`
	// Size is the size of the database.
	Size string `json:"size"`
	// Volume is the volume of the database.
	Volume string `json:"volume"`
}

DB is a database.

type DBSize

type DBSize struct {
	// Name is the name of the database size.
	Name string `json:"name"`
	// RAM is the RAM of the database size.
	RAM int `json:"ram"`
	// CPU is the CPU of the database size.
	CPU int `json:"cpu"`
	// Disk is the disk of the database size.
	Disk int `json:"disk"`
}

DBSize is a database size.

type DBType

type DBType struct {
	// Name is the name of the database type.
	Name string `json:"name"`
	// Image is the image of the database type.
	Image string `json:"image"`
	// MountPath is the mount path of the database volume.
	MountPath string `json:"mountPath"`
	// Port is the port of the database.
	Port int `json:"port"`
}

DBType is a database type.

type DBVolume

type DBVolume struct {
	// Name is the name of the database volume.
	Name string `json:"name"`
	// Size is the size of the database volume.
	Size int `json:"size"`
}

DBVolume is a database volume.

type LLM

type LLM struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Type      string `json:"type"`
	Image     string `json:"image"`
	Memory    int    `json:"memory"`
	CPU       int    `json:"cpu"`
}

type Namespace

type Namespace struct {
	Name string `json:"name"`
}

Namespace is a namespace

type Node

type Node struct {
	Name       string `json:"name"`
	Host       string `json:"host"`
	User       string `json:"user"`
	Key        string `json:"key"`
	Password   string `json:"password"`
	MasterHost string `json:"master_host"`
	Status     string `json:"status"`
	MacAddress string `json:"mac_address"`
}

Node represents a node in the cluster

type ServerConfig

type ServerConfig struct {
	Host       string
	Port       string
	User       string
	Password   string
	Key        string
	MasterHost string
}

type VM

type VM struct {
	// Name is the name of the virtual machine.
	Name string `json:"name"`
	// Image is the image of the virtual machine.
	Image string `json:"image"`
	// Size is the size of the virtual machine.
	Size string `json:"size"`
	// Ports is the ports of the virtual machine.
	Ports []VMPort `json:"ports"`
	// Namespace is the namespace of the virtual machine.
	Namespace string `json:"namespace"`
	// Disk is the disk of the virtual machine.
	Disk string `json:"disk"`
	// Status is the status of the virtual machine.
	Status string `json:"status"`
}

VM is a virtual machine.

type VMDisk

type VMDisk struct {
	// Name is the name of the virtual machine disk.
	Name string `json:"name"`
	// Size is the size of the virtual machine disk.
	Size int `json:"size"`
}

VMDisk is a virtual machine disk.

type VMImage

type VMImage struct {
	// Image is the Image of the virtual machine image.
	Image string `json:"image"`
}

VMImage is a virtual machine image.

type VMPort

type VMPort struct {
	// Name is the name of the virtual machine port.
	Name string `json:"name"`
	// SourcePort is the port of the virtual machine.
	SourcePort int `json:"port"`
	// DestinationPort is the port of the LB.
	DestinationPort int `json:"destinationPort"`
}

VMPort is a virtual machine port.

type VMSize

type VMSize struct {
	// Name is the name of the virtual machine size.
	Name string `json:"name"`
	// RAM is the RAM of the virtual machine size.
	RAM int `json:"ram"`
	// CPU is the CPU of the virtual machine size.
	CPU int `json:"cpu"`
	// Disk is the disk of the virtual machine size.
	Disk int `json:"disk"`
}

VMSize is a virtual machine size.

type Volume

type Volume struct {
	Name   string
	Size   string
	Status string
}

Volume represents a volume

Jump to

Keyboard shortcuts

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