package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev

# Functions

DeploymentComplete considers a deployment to be complete once all of its desired replicas are updated and available, and no old pods are running.
DeploymentProgressing reports progress for a deployment.
DeploymentTimedOut 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.
EqualIgnoreHash returns true if two given podTemplateSpec are equal, ignoring the diff in value of Labels[pod-template-hash] We ignore pod-template-hash because: 1.
FindActiveOrLatest returns the only active or the latest replica set in case there is at most one active replica set.
FindNewReplicaSet returns the new RS this given deployment targets (the one with the same pod template).
FindOldReplicaSets returns the old replica sets targeted by the given Deployment, with the given slice of RSes.
GetActualReplicaCountForReplicaSets returns the sum of actual replicas of the given replica sets.
GetAvailableReplicaCountForReplicaSets returns the number of available pods corresponding to the given replica sets.
GetDeploymentCondition returns the condition with the provided type.
GetDeploymentsForReplicaSet returns a list of Deployments that potentially match a ReplicaSet.
GetDesiredReplicasAnnotation returns the number of desired replicas.
GetReadyReplicaCountForReplicaSets returns the number of ready pods corresponding to the given replica sets.
GetReplicaCountForReplicaSets returns the sum of Replicas of the given replica sets.
GetReplicaSetProportion will estimate the proportion for the provided replica set using 1.
GetTerminatingReplicaCountForReplicaSets returns the number of terminating pods for all replica sets or returns an error if any replica sets have been synced by the controller but do not report their terminating count.
HasProgressDeadline checks if the Deployment d is expected to surface the reason "ProgressDeadlineExceeded" when the Deployment progress takes longer than expected time.
HasRevisionHistoryLimit checks if the Deployment d is expected to keep a specified number of old replicaSets.
IsRollingUpdate returns true if the strategy type is a rolling update.
IsSaturated checks if the new replica set is saturated by comparing its size with its deployment size.
LastRevision finds the second max revision number in all replica sets (the last revision).
ListPods returns a list of pods the given deployment targets.
ListReplicaSets returns a slice of RSes the given deployment targets.
MaxRevision finds the highest revision in the replica sets.
MaxSurge returns the maximum surge pods a rolling deployment can take.
MaxUnavailable returns the maximum unavailable pods a rolling deployment can take.
MinAvailable returns the minimum available pods of a given deployment.
NewDeploymentCondition creates a new deployment condition.
NewRSNewReplicas calculates the number of replicas a deployment's new RS should have.
RemoveDeploymentCondition removes the deployment condition with the provided type.
ReplicasAnnotationsNeedUpdate return true if ReplicasAnnotations need to be updated.
ReplicaSetToDeploymentCondition converts a replica set condition into a deployment condition.
ResolveFenceposts resolves both maxSurge and maxUnavailable.
Revision returns the revision number of the input object.
RsListFromClient returns an rsListFunc that wraps the given client.
SetDeploymentAnnotationsTo sets deployment's annotations as given RS's annotations.
SetDeploymentCondition updates the deployment to include the provided condition.
SetDeploymentRevision updates the revision for a deployment.
SetFromReplicaSetTemplate sets the desired PodTemplateSpec from a replica set template to the given deployment.
SetNewReplicaSetAnnotations sets new replica set's annotations appropriately by updating its revision and copying required deployment annotations to it; it returns true if replica set's annotation is changed.
SetReplicasAnnotations sets the desiredReplicas and maxReplicas into the annotations.
WaitForObservedDeployment polls for deployment to be updated so that deployment.Status.ObservedGeneration >= desiredGeneration.

# Constants

DesiredReplicasAnnotation is the desired replicas for a deployment recorded as an annotation in its replica sets.
FailedRSCreateReason is added in a deployment when it cannot create a new replica set.
FoundNewRSReason is added in a deployment when it adopts an existing replica set.
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.
NewReplicaSetReason is added in a deployment when it creates a new replica set.
NewRSAvailableReason is added in a deployment when its newest replica set is made available ie.
PausedDeployReason is added in a deployment when it is paused.
ReplicaSetUpdatedReason is added in a deployment when one of its replica sets is updated as part of the rollout process.
ResumedDeployReason is added in a deployment when it is resumed.
RevisionAnnotation is the revision annotation of a deployment's replica sets which records its rollout sequence.
RevisionHistoryAnnotation maintains the history of all old revisions that a replica 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.
TimedOutReason is added in a deployment when its newest replica set fails to show any progress within the given deadline (progressDeadlineSeconds).

# Type aliases

ReplicaSetsByRevision sorts a list of ReplicaSet by revision, using their creation timestamp or name as a tie breaker.
RsListFunc returns the ReplicaSet from the ReplicaSet namespace and the List metav1.ListOptions.