package
2.0.0
Repository: https://github.com/chuckha/cluster-api.git
Documentation: pkg.go.dev

# Functions

Clones the given map and returns a new map with the given key and value added.
Clones the given selector and returns a new selector with the given key and value added.
No description provided by the author
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.
DeploymentComplete considers a deployment to be complete once all of its desired replicas are updated and available, and no old machines are running.
EqualIgnoreHash returns true if two given machineTemplateSpec are equal, ignoring the diff in value of Labels[machine-template-hash] We ignore machine-template-hash because: 1.
FilterActiveMachineSets returns machine sets that have (or at least ought to have) machines.
FilterMachineSets returns machine sets that are filtered by filterFn (all returned ones should match filterFn).
FindNewMachineSet returns the new MS this given deployment targets (the one with the same machine template).
FindOldMachineSets returns the old machine sets targeted by the given Deployment, with the given slice of MSes.
FindOneActiveOrLatest returns the only active or the latest machine set in case there is at most one active machine set.
GetActualReplicaCountForMachineSets returns the sum of actual replicas of the given machine sets.
GetAvailableReplicaCountForMachineSets returns the number of available machines corresponding to the given machine sets.
GetDesiredReplicasAnnotation returns the number of desired replicas.
GetProportion will estimate the proportion for the provided machine set using 1.
GetReadyReplicaCountForMachineSets returns the number of ready machines corresponding to the given machine sets.
GetReplicaCountForMachineSets returns the sum of Replicas of the given machine sets.
IsRollingUpdate returns true if the strategy type is a rolling update.
IsSaturated checks if the new machine set is saturated by comparing its size with its deployment size.
MaxRevision finds the highest revision in the machine sets.
MaxSurge returns the maximum surge machines a rolling deployment can take.
MaxUnavailable returns the maximum unavailable machines a rolling deployment can take.
NewMSNewReplicas calculates the number of replicas a deployment's new MS should have.
AnnotationsNeedUpdate return true if ReplicasAnnotations need to be updated.
ResolveFenceposts resolves both maxSurge and maxUnavailable.
Revision returns the revision number of the input object.
SetDeploymentRevision updates the revision for a deployment.
SetNewMachineSetAnnotations sets new machine set's annotations appropriately by updating its revision and copying required deployment annotations to it; it returns true if machine set's annotation is changed.
SetReplicasAnnotations sets the desiredReplicas and maxReplicas into the annotations.

# Constants

No description provided by the author
DesiredReplicasAnnotation is the desired replicas for a machine deployment recorded as an annotation in its machine sets.
FailedMSCreateReason is added in a machine deployment when it cannot create a new machine set.
FoundNewMSReason is added in a machine deployment when it adopts an existing machine set.
MaxReplicasAnnotation is the maximum replicas a deployment can have at a given point, which is machinedeployment.spec.replicas + maxSurge.
Available: MinimumReplicasAvailable is added in a deployment when it has its minimum replicas required available.
MinimumReplicasUnavailable is added in a deployment when it doesn't have the minimum required replicas available.
PausedDeployReason is added in a deployment when it is paused.
RevisionAnnotation is the revision annotation of a machine deployment's machine sets which records its rollout sequence.
RevisionHistoryAnnotation maintains the history of all old revisions that a machine set has served for a machine deployment.

# Type aliases

MachineSetsByCreationTimestamp sorts a list of MachineSet by creation timestamp, using their names as a tie breaker.
MachineSetsBySizeNewer sorts a list of MachineSet by size in descending order, using their creation timestamp or name as a tie breaker.
MachineSetsBySizeOlder sorts a list of MachineSet by size in descending order, using their creation timestamp or name as a tie breaker.