annotations

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

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"
)

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

func SetRolloutRevision

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

SetRolloutRevision updates the revision 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