serverset

package
v1.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func AreBootVolumesReady

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

AreBootVolumesReady checks if template params are equal to volume obj params

func AreServersReady

func AreServersReady(templateParams v1alpha1.ServerSetTemplateSpec, servers []v1alpha1.Server) (areServersUpToDate, areServersAvailable bool)

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

func ComputeReplicaIdx

func ComputeReplicaIdx(log logging.Logger, idxLabel string, labels map[string]string) int

ComputeReplicaIdx - extracts the replica index from the labels

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 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 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

func SetupServerSet(mgr ctrl.Manager, opts *utils.ConfigurationOptions) error

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