Documentation ¶
Index ¶
- Constants
- func RemoveRolloutWorkloadRefGeneration(rollout *v1alpha1.Rollout)
- 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
- func SetRolloutWorkloadRefGeneration(rollout *v1alpha1.Rollout, workloadGeneration string) bool
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 ¶
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 ¶
SetRolloutRevision updates the revision for a rollout.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.