# Packages
No description provided by the author
# Functions
AddOrUpdateAnnotationOnNode add annotations to the node.
BenchmarkAdler is used to fetch machineTemplateSpecOldHash.
BenchmarkFnv is used the computeHash.
ComputeHash returns a hash value calculated from machine template and a collisionCount to avoid hash collision.
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 the hash result would be different upon machineTemplateSpec API changes (e.g.
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).
FindActiveOrLatest returns the only active or the latest machine set in case there is at most one active machine set.
FindNewMachineSet returns the new RS 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 RSes.
GetActualReplicaCountForMachineSets returns the sum of actual replicas of the given machine sets.
GetAllMachineSets returns the old and new machine sets targeted by the given Deployment.
GetAnnotationsFromNode returns all the annotations of the provided node.
GetAvailableReplicaCountForMachineSets returns the number of available machines corresponding to the given machine sets.
GetCondition returns a MachineSet condition with the provided type if it exists.
GetDesiredReplicasAnnotation returns the number of desired replicas.
GetFakeMachineFromTemplate passes the machine template spec to return the machine object.
GetMachineDeploymentCondition returns the condition with the provided type.
GetMachineDeploymentConditionInternal returns the condition with the provided type.
GetMachineFromTemplate passes the machine template spec to return the machine object.
GetMachineSetHash returns the hash of a machineSet.
GetNewMachineSet returns a machine set that matches the intent of the given deployment; get MachineSetList from client interface.
GetOldMachineSets returns the old machine sets targeted by the given Deployment; get MachineList and MachineSetList from client interface.
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.
IsListFromClient returns an rsListFunc that wraps the given client.
IsMachineActive checks if machine was active.
IsMachineFailed checks if machine has failed.
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.
LabelMachinesWithHash labels all machines in the given machineList with the new hash label.
LastRevision finds the second max revision number in all machine sets (the last revision).
ListMachines for given machineDeployment.
ListMachineSets returns a slice of RSes the given deployment targets.
ListMachineSetsInternal is ListMachineSets for v1alpha1.
MachineDeploymentComplete considers a deployment to be complete once all of its desired replicas are updated and available, and no old machines are running.
MachineDeploymentProgressing reports progress for a deployment.
MachineDeploymentTimedOut considers a deployment to have timed out once its condition that reports progress is older than progressDeadlineSeconds or a Progressing condition with a TimedOutReason reason already exists.
MachineKey is the function used to get the machine name from machine object ToCheck : as machine-namespace does not matter.
MachineSetToMachineDeploymentCondition converts a machine set condition into a deployment condition.
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.
MinAvailable returns the minimum available machines of a given deployment.
NewContExpectations returns a store for ContExpectations.
NewController returns a new Node controller.
NewDrainOptions creates a new DrainOptions struct and returns a pointer to it.
NewISNewReplicas calculates the number of replicas a deployment's new IS should have.
NewMachineControllerRefManager returns a MachineControllerRefManager that exposes methods to manage the controllerRef of Machines.
NewMachineDeploymentCondition creates a new deployment condition.
NewMachineSetCondition creates a new MachineSet condition.
NewMachineSetControllerRefManager returns a MachineSetControllerRefManager that exposes methods to manage the controllerRef of MachineSets.
NewUIDTrackingContExpectations returns a wrapper around ContExpectations that is aware of deleteKeys.
NoResyncPeriodFunc Returns 0 for resyncPeriod in case resyncing is not needed.
RecheckDeletionTimestamp returns a CanAdopt() function to recheck deletion.
RemoveAnnotationsOffNode is for cleaning up annotations temporarily added to node, won't fail if target annotation doesn't exist or has been removed.
RemoveCondition removes the condition with the provided type from the MachineSet status.
RemoveMachineDeploymentCondition removes the deployment condition with the provided type.
ResolveFenceposts resolves both maxSurge and maxUnavailable.
Revision returns the revision number of the input object.
SetCondition adds/replaces the given condition in the MachineSet status.
SetFromMachineSetTemplate sets the desired MachineTemplateSpec from a machine set template to the given deployment.
SetMachineDeploymentAnnotationsTo sets deployment's annotations as given RS's annotations.
SetMachineDeploymentCondition updates the deployment to include the provided condition.
SetMachineDeploymentRevision 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.
SetNewMachineSetConfig sets new machine set's config appropriately by updating its revision and copying required deployment nodeTemplates to it; it returns true if machine set's config is changed.
SetNewMachineSetNodeTemplate sets new machine set's nodeTemplates appropriately by updating its revision and copying required deployment nodeTemplates to it; it returns true if machine set's nodeTemplate is changed.
SetReplicasAnnotations sets the desiredReplicas and maxReplicas into the annotations.
StaticResyncPeriodFunc returns the resync period specified.
SupportEviction uses Discovery API to find out if the server support eviction subresource If support, it will return its groupVersion; Otherwise, it will return "".
SyncMachineAnnotations syncs the annotations of the machine with node-objects.
SyncMachineLabels syncs the labels of the machine with node-objects.
SyncMachineTaints syncs the taints of the machine with node-objects.
TestMachineTemplateSpecHash tests the templateSpecHash for any collisions.
UpdateISWithRetries updates a RS with given applyUpdate function.
UpdateMachineSetClassKind updates class.Kind appropriately by updating its revision and copying required deployment class.Kind to it; it returns true if machine set's class.Kind is changed.
UpdateMachineWithRetries updates a machine with given applyUpdate function.
UpdateNodeAnnotations is for updating the node annotations from oldNode to the newNode using the nodes Update() method.
WaitForCacheSync is a wrapper around cache.WaitForCacheSync that generates log messages indicating that the controller identified by controllerName is waiting for syncs, followed by either a successful or failed sync.
WaitForMachineSetUpdated polls the machine set until it is updated.
WaitForMachinesHashPopulated polls the machine set until updated and fully labeled.
WaitForObservedDeploymentInternal polls for deployment to be updated so that deployment.Status.ObservedGeneration >= desiredGeneration.
WaitForObservedMachineDeployment polls for deployment to be updated so that deployment.Status.ObservedGeneration >= desiredGeneration.
# Constants
AlicloudMachineClassKind is used to identify the machineClassKind as Alicloud.
AWSMachineClassKind is used to identify the machineClassKind as AWS.
AzureMachineClassKind is used to identify the machineClassKind as Azure.
BurstReplicas - Realistic value of the burstReplica field for the machine set manager based off performance requirements for kubernetes 1.0.
ClassAnnotation is the annotation used to identify a machine class.
DefaultMachineDrainTimeout is the default value for MachineDrainTimeout.
DeleteFinalizerName is the finalizer used to identify the controller acting on an object.
DesiredReplicasAnnotation is the desired replicas for a deployment recorded as an annotation in its machine sets.
EvictionKind is the kind used for eviction.
EvictionSubresource is the kind used for evicting pods.
ExpectationsTimeout - If a watch drops a delete event for a machine, it'll take this long before a dormant controller waiting for those packets is woken up anyway.
FailedCreateMachineReason is added in an event and in a machine set condition when a machine for a machine set is failed to be created.
FailedDeleteMachineReason is added in an event and in a machine set condition when a machine for a machine set is failed to be deleted.
FailedISCreateReason is added in a deployment when it cannot create a new machine set.
FoundNewISReason is added in a deployment when it adopts an existing machine set.
GCPMachineClassKind is used to identify the machineClassKind as GCP.
GetPvDetailsMaxRetries is the number of max retries to get PV details.
GetPvDetailsRetryInterval is the interval in which to retry getting PV details.
Interval is the default Poll interval.
LastAppliedALTAnnotation contains the last configuration of annotations, labels & taints applied on the node object.
MachineDeploymentStateSync freeze reason when machineDeployment was found with inconsistent state.
MachineEnqueueRetryPeriod period after which a machine object is re-enqueued upon creation or deletion failures.
MachineIDAnnotation is the annotation used to identify a machine ID.
MachinePriority is the annotation used to specify priority associated with a machine while deleting it.
MachineSetUpdatedReason is added in a deployment when one of its machine sets is updated as part of the rollout process.
MaxReplicasAnnotation is the maximum replicas a deployment can have at a given point, which is deployment.spec.replicas + maxSurge.
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.
NewISAvailableReason is added in a deployment when its newest machine set is made available ie.
NewMachineSetReason is added in a deployment when it creates a new machine set.
NodeScaledDown is a node termination reason for healthy deleted machines.
NodeTerminationCondition describes nodes that are terminating.
NodeUnhealthy is a node termination reason for failed machines.
OpenStackMachineClassKind is used to identify the machineClassKind as OpenStack.
OverShootingReplicaCount freeze reason when replica count overshoots.
PacketMachineClassKind is used to identify the machineClassKind as Packet.
PausedMachineDeployReason is added in a deployment when it is paused.
PodEvictionRetryInterval is the interval in which to retry eviction for pods.
PodsWithoutPVDrainGracePeriod defines the grace period to wait for the pods without PV during machine drain.
PreferNoScheduleKey is used to identify machineSet nodes on which PreferNoSchedule taint is added on older machineSets during a rolling update.
ResumedMachineDeployReason is added in a deployment when it is resumed.
RevisionAnnotation is the revision annotation of a 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 deployment.
RollbackDone is the done rollback event reason.
RollbackRevisionNotFound is not found rollback event reason.
RollbackTemplateUnchanged is the template unchanged rollback event reason.
SlowStartInitialBatchSize - When batching machine creates, is the size of the initial batch.
SuccessfulCreateMachineReason is added in an event when a machine for a machine set is successfully created.
SuccessfulDeletemachineReason is added in an event when a machine for a machine set is successfully deleted.
TimedOutReason is added in a deployment when its newest machine set fails to show any progress within the given deadline (progressDeadlineSeconds).
TimeoutOccurred freeze reason when machineSet timeout occurs.
UnfreezeAnnotation indicates the controllers to unfreeze this object.
VolumeDetachPollInterval is the interval in which to recheck if the volume is detached from the node.
# Variables
Backoff is the backoff period used while updating nodes.
DefaultMaxEvictRetries is the default value for MaxEvictRetries.
ExpKeyFunc to parse out the key from a ControlleeExpectation.
GroupVersionKind is the version kind used to identify objects managed by machine-controller-manager.
KeyFunc is the variable that stores the function that retreives the object key from an object.
UIDSetKeyFunc to parse out the key from a UIDSet.
UpdateAnnotationBackoff is the backoff period used while updating the annotation.
# Structs
BaseControllerRefManager is the struct is used to identify the base controller of the object.
ContExpectations is a cache mapping controllers to what they expect to see before being woken up for a sync.
ControlleeExpectations track controllee creates/deletes.
DrainOptions are configurable options while draining a node before deletion.
FakeMachineControl is the fake implementation of machineControlInterface.
MachineControllerRefManager is the struct used to manage the machines.
MachineSetControllerRefManager is used to manage controllerRef of MachineSets.
RealControllerRevisionControl is the default implementation of RevisionControlInterface.
RealMachineControl is the default implementation of machineControlInterface.
RealMachineSetControl is the default implementation of RSControllerInterface.
UIDSet holds a key and a set of UIDs.
UIDTrackingContExpectations tracks the UID of the machines it deletes.
# Interfaces
Controller describes a controller for.
Expectations are either fulfilled, or expire naturally.
ExpectationsInterface is an interface that allows users to set and wait on expectations.
MachineControlInterface is the interface used by the machine-set controller to interact with the machine controller.
MachineDeploymentListerExpansion allows custom methods to be added to MachineDeploymentLister.
MachineDeploymentNamespaceListerExpansion allows custom methods to be added to MachineDeploymentNamespaceLister.
MachineSetControlInterface is an interface that knows how to add or delete MachineSets, as well as increment or decrement them.
RevisionControlInterface is an interface that knows how to patch ControllerRevisions, as well as increment or decrement them.
# Type aliases
ActiveMachines type allows custom sorting of machines so a controller can pick the best ones to delete.
ControllersByCreationTimestamp sorts a list of ReplicationControllers by creation timestamp, using their names as a tie breaker.
IsListFunc is used to list all machineSets for a given list option TODO: switch this to full namespacers.
MachineSetsByCreationTimestamp sorts a list of MachineSet by creation timestamp, using their names as a tie breaker.***************** For MachineSet **********************/.
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.
ResyncPeriodFunc is the function that returns the resync duration.