annotations

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterCodeAnnotation = "cluster-code"
	// RolloutLabel key value for the label in the annotations and selector
	RolloutLabel = "rollout"
	// RevisionAnnotation is the revision annotation of a rollout's replica sets which records its rollout sequence
	RevisionAnnotation = RolloutLabel + "/revision"
	// RevisionLastAnnotation 最近一次的revision,用于乐观锁判断
	RevisionLastAnnotation = RolloutLabel + "/last-revision"

	CurrentStepAnnotation = RolloutLabel + "/current-step"
	// 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 RemoveRolloutWorkloadRefGeneration

func RemoveRolloutWorkloadRefGeneration(rollout *v1alpha1.Rollout)

RemoveRolloutWorkloadRefGeneration remove the annotation of workload ref generation

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

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