annotations

package
v1.6.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
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"
	// WorkloadGenerationAnnotation is the generation of the referenced workload
	WorkloadGenerationAnnotation = RolloutLabel + "/workload-generation"
)

Variables

This section is empty.

Functions

func GetDesiredReplicasAnnotation

func GetDesiredReplicasAnnotation(rs *appsv1.ReplicaSet) (int32, bool)

GetDesiredReplicasAnnotation returns the number of desired replicas

func GetRevisionAnnotation added in v1.6.0

func GetRevisionAnnotation(ro *v1alpha1.Rollout) (int32, bool)

GetRevisionAnnotation returns revision of rollout

func GetWorkloadGenerationAnnotation added in v1.1.0

func GetWorkloadGenerationAnnotation(ro *v1alpha1.Rollout) (int32, bool)

GetWorkloadGenerationAnnotation returns generation of referenced workload

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 RemoveRolloutWorkloadRefGeneration added in v1.1.0

func RemoveRolloutWorkloadRefGeneration(rollout *v1alpha1.Rollout)

RemoveRolloutWorkloadRefGeneration remove the annotation of workload ref generation

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

func SetRolloutRevision

func SetRolloutRevision(rollout *v1alpha1.Rollout, revision string) bool

SetRolloutRevision updates the revision for a rollout.

func SetRolloutWorkloadRefGeneration added in v1.1.0

func SetRolloutWorkloadRefGeneration(rollout *v1alpha1.Rollout, workloadGeneration string) bool

SetRolloutWorkloadRefGeneration updates the workflow generation annotation for a rollout.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL