Documentation ¶
Index ¶
- Constants
- func GetDesiredReplicasAnnotation(rs *appsv1.ReplicaSet) (int32, bool)
- func IsSaturated(rollout *v1alpha1.Rollout, rs *appsv1.ReplicaSet) bool
- func ReplicasAnnotationsNeedUpdate(rs *appsv1.ReplicaSet, desiredReplicas int32) bool
- func SetNewReplicaSetAnnotations(rollout *v1alpha1.Rollout, newRS *appsv1.ReplicaSet, newRevision string, ...) bool
- func SetReplicasAnnotations(rs *appsv1.ReplicaSet, desiredReplicas int32) bool
- func SetRolloutRevision(rollout *v1alpha1.Rollout, revision string) bool
Constants ¶
const ( // RolloutLabel key value for the label in the annotations and selector RolloutLabel = "rollout.argoproj.io" // RevisionAnnotation is the revision annotation of a rollout's replica sets which records its rollout sequence RevisionAnnotation = RolloutLabel + "/revision" // RevisionHistoryAnnotation maintains the history of all old revisions that a replica set has served for a rollout. RevisionHistoryAnnotation = RolloutLabel + "/revision-history" // DesiredReplicasAnnotation is the desired replicas for a rollout recorded as an annotation // in its replica sets. Helps in separating scaling events from the rollout process and for // determining if the new replica set for a rollout is really saturated. DesiredReplicasAnnotation = RolloutLabel + "/desired-replicas" )
Variables ¶
This section is empty.
Functions ¶
func GetDesiredReplicasAnnotation ¶
func GetDesiredReplicasAnnotation(rs *appsv1.ReplicaSet) (int32, bool)
GetDesiredReplicasAnnotation returns the number of desired replicas
func IsSaturated ¶
func IsSaturated(rollout *v1alpha1.Rollout, rs *appsv1.ReplicaSet) bool
IsSaturated checks if the new replica set is saturated by comparing its size with its rollout size. Both the rollout and the replica set have to believe this replica set can own all of the desired replicas in the rollout and the annotation helps in achieving that. All pods of the ReplicaSet need to be available.
func ReplicasAnnotationsNeedUpdate ¶
func ReplicasAnnotationsNeedUpdate(rs *appsv1.ReplicaSet, desiredReplicas int32) bool
ReplicasAnnotationsNeedUpdate return true if ReplicasAnnotations need to be updated
func SetNewReplicaSetAnnotations ¶
func SetNewReplicaSetAnnotations(rollout *v1alpha1.Rollout, newRS *appsv1.ReplicaSet, newRevision string, exists bool) bool
SetNewReplicaSetAnnotations sets new replica set's annotations appropriately by updating its revision and copying required rollout annotations to it; it returns true if replica set's annotation is changed.
func SetReplicasAnnotations ¶
func SetReplicasAnnotations(rs *appsv1.ReplicaSet, desiredReplicas int32) bool
SetReplicasAnnotations sets the desiredReplicas into the annotations
Types ¶
This section is empty.