serverset

package
v0.1.0-test Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ResourceServer name for server used for serverset
	ResourceServer = "server"
)

Variables

This section is empty.

Functions

func AreServersUpToDate

func AreServersUpToDate(templateParams v1alpha1.ServerSetTemplateSpec, servers []v1alpha1.Server) bool

AreServersUpToDate checks if replicas and template params are equal to server obj params

func AreVolumesUpToDate

func AreVolumesUpToDate(templateParams v1alpha1.BootVolumeTemplate, volumes []v1alpha1.Volume) bool

AreVolumesUpToDate checks if template params are equal to volume obj params

func GetNICsOfSSet

func GetNICsOfSSet(ctx context.Context, kube client.Client, name string) ([]v1alpha1.Nic, error)

GetNICsOfSSet - gets all volumes of a server set

func GetServersOfSSet

func GetServersOfSSet(ctx context.Context, kube client.Client, name string) ([]v1alpha1.Server, error)

GetServersOfSSet - gets servers from a server set based on the ionoscloud.com/serverset label

func GetVolumesOfSSet

func GetVolumesOfSSet(ctx context.Context, kube client.Client, name string) ([]v1alpha1.Volume, error)

GetVolumesOfSSet - gets volumes from a server set based on the ionoscloud.com/serverset label

func GetZoneFromIndex

func GetZoneFromIndex(index int) string

GetZoneFromIndex returns ZONE_2 for odd and ZONE_1 for even index

func ListResFromSSetWithIndex

func ListResFromSSetWithIndex(ctx context.Context, kube client.Client, serversetName, resType string, index int, list client.ObjectList) error

ListResFromSSetWithIndex - lists resources from a server set with a specific index label

func SetupServerSet

SetupServerSet adds a controller that reconciles ServerSet managed resources.

Types

This section is empty.

Jump to

Keyboard shortcuts

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