storageplan

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreStoragePlansAlike

func AreStoragePlansAlike(storagePlans []*StoragePlan) bool

By alikeness, I mean, the 2 disks across which the ZFS pool will be running, must be the same across all the nodes in the node-group. This makes the command to create a ZFS pool to be the same across the nodes, for e.g. :

zpool create primary mirror /dev/nvme0n1 /dev/nvme1n1

For all the nodes in a node-group, we have a single KubeadmControlPlane / KubeadmConfig resource. And the ZFS pool creation command goes in the postKubeadm section of that resource. So, it must be same for all the nodes.

Types

type Disk

type Disk struct {
	Name,
	WWN,
	Type,
	PartitionTableType string

	Size int // GB.

	// Whether the server to which this disk is attached, has a NIC (Network Interface Card)
	// with speed >= 5 GBPS.
	// If yes, and this disk is an SSD / NVMe, then the priority score for CEPH installation
	// increases : since the CEPH OSDs can leverage the increased network bandwidth for higher
	// disk IOPS.
	WithHighSpeedNIC bool

	PriorityScores PriorityScores

	Allocations struct {
		OS,
		ZFS,
		CEPH int // GB.
	}
}

func (*Disk) Allocated

func (d *Disk) Allocated() int

Returns the total amount of storage space allocated until now.

func (*Disk) AssignPriorityScores

func (d *Disk) AssignPriorityScores()

Assigns priority scores to the disk, for OS and ZFS installations.

func (*Disk) Unallocated

func (d *Disk) Unallocated() int

type NodeGroupName

type NodeGroupName = string

type PriorityScores

type PriorityScores struct {
	OS,
	ZFS int
}

type StoragePlan

type StoragePlan struct {
	ServerID string

	Disks,

	OS,

	ZFS,

	CEPH []*Disk
}

type StoragePlans

type StoragePlans map[NodeGroupName][]*StoragePlan

func (*StoragePlans) GetApproval

func (s *StoragePlans) GetApproval(ctx context.Context)

func (StoragePlans) PrettyPrint

func (s StoragePlans) PrettyPrint()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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