Documentation ¶
Index ¶
- Constants
- func AreBootVolumesReady(templateParams v1alpha1.BootVolumeTemplate, volumes []v1alpha1.Volume) (bool, bool)
- func AreServersReady(templateParams v1alpha1.ServerSetTemplateSpec, servers []v1alpha1.Server) (areServersUpToDate, areServersAvailable bool)
- func ComputeReplicaIdx(log logging.Logger, idxLabel string, labels map[string]string) int
- func GetNICsOfSSet(ctx context.Context, kube client.Client, name string) ([]v1alpha1.Nic, error)
- func GetServersOfSSet(ctx context.Context, kube client.Client, name string) ([]v1alpha1.Server, error)
- func GetVolumesOfSSet(ctx context.Context, kube client.Client, name string) ([]v1alpha1.Volume, error)
- func GetZoneFromIndex(index int) string
- func ListResFromSSetWithIndex(ctx context.Context, kube client.Client, serversetName, resType string, ...) error
- func SetupServerSet(mgr ctrl.Manager, opts *utils.ConfigurationOptions) error
Constants ¶
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 ¶
ComputeReplicaIdx - extracts the replica index from the labels
func GetNICsOfSSet ¶
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 ¶
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.