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

# Functions

DeploymentComplete considers a deployment to be complete once its desired replicas equals its updatedReplicas, no old pods are running, and it doesn't violate minimum availability.
No description provided by the author
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 the hash result would be different upon podTemplateSpec API changes (e.g.
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.
GetAllReplicaSets returns the old and new replica sets targeted by the given Deployment.
GetAvailableReplicaCountForReplicaSets returns the number of available pods corresponding to the given replica sets.
GetDeploymentCondition returns the condition with the provided type.
TODO: remove the duplicate GetDeploymentConditionInternal returns the condition with the provided type.
GetDesiredReplicasAnnotation returns the number of desired replicas.
TODO: remove the duplicate.
GetNewReplicaSet returns a replica set that matches the intent of the given deployment; get ReplicaSetList from client interface.
GetNewReplicaSetTemplate returns the desired PodTemplateSpec for the new ReplicaSet corresponding to the given ReplicaSet.
TODO: remove the duplicate GetNewReplicaSetTemplateInternal returns the desired PodTemplateSpec for the new ReplicaSet corresponding to the given ReplicaSet.
GetOldReplicaSets returns the old replica sets targeted by the given Deployment; get PodList and ReplicaSetList from client interface.
No description provided by the author
No description provided by the author
GetProportion will estimate the proportion for the provided replica set using 1.
GetReadyReplicaCountForReplicaSets returns the number of ready pods corresponding to the given replica sets.
GetReplicaCountForReplicaSets returns the sum of Replicas of the given replica sets.
GetReplicaSetHash returns the pod template hash of a ReplicaSet's pod template space.
GetReplicaSetHashFnv returns the pod template hash of a ReplicaSet's pod template spec.
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.
LabelPodsWithHash labels all pods in the given podList with the new hash label.
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.
ListReplicaSetsInternal is ListReplicaSets for internalextensions.
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.
MaxUnavailableInternal 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.
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.
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.
UpdatePodWithRetries updates a pod with given applyUpdate function.
UpdateRSWithRetries updates a RS with given applyUpdate function.
WaitForObservedDeployment polls for deployment to be updated so that deployment.Status.ObservedGeneration >= desiredGeneration.
TODO: remove the duplicate WaitForObservedInternalDeployment polls for deployment to be updated so that deployment.Status.ObservedGeneration >= desiredGeneration.
WaitForPodsHashPopulated polls the replica set until updated and fully labeled.
WaitForReplicaSetUpdated polls the replica set until it is updated.

# 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.
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.
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.
OverlapAnnotation marks deployments with overlapping selector with other deployments TODO: Delete this annotation when we no longer need to support a client talking to a server older than v1.6.
PausedDeployReason is added in a deployment when it is paused.
Reasons for deployment conditions Progressing: 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).