failuredomains

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Overview

Package failuredomains implements FailureDomain utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickFewest

func PickFewest(ctx context.Context, failureDomains clusterv1.FailureDomains, allMachines, upToDateMachines collections.Machines) *string

PickFewest returns the failure domain that will be used for placement of a new control plane machine, which is the failure domain with the fewest number of up-to-date, not deleted machines.

Ensuring proper spreading of up-to-date, not deleted machines, is the highest priority to achieve ideal spreading of machines at stable state/when only up-to-date machines will exist.

In case of tie (more failure domain with the same number of up-to-date, not deleted machines) the failure domain with the fewest number of machine overall is picked to ensure a better spreading of machines while the rollout is performed.

func PickMost

func PickMost(ctx context.Context, failureDomains clusterv1.FailureDomains, allMachines, eligibleMachines collections.Machines) *string

PickMost returns the failure domain from which we have to delete a control plane machine, which is the failure domain with most machines and at least one eligible machine in it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳