Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames golang field names for blueGreen/canary to eliminate two API violations #206

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pkg/apis/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStatus,HPAReplicas
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStrategy,BlueGreenStrategy
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStrategy,CanaryStrategy
5 changes: 2 additions & 3 deletions pkg/apis/rollouts/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,11 @@ const (
)

// RolloutStrategy defines strategy to apply during next rollout
// TODO(jessesuen): rename field names to match json tags to remove api violations
type RolloutStrategy struct {
// +optional
BlueGreenStrategy *BlueGreenStrategy `json:"blueGreen,omitempty"`
BlueGreen *BlueGreenStrategy `json:"blueGreen,omitempty"`
// +optional
CanaryStrategy *CanaryStrategy `json:"canary,omitempty"`
Canary *CanaryStrategy `json:"canary,omitempty"`
}

// BlueGreenStrategy defines parameters for Blue Green deployment
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/kubectl-argo-rollouts/cmd/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func newCanaryRollout() *v1alpha1.Rollout {
Spec: v1alpha1.RolloutSpec{
Replicas: pointer.Int32Ptr(5),
Strategy: v1alpha1.RolloutStrategy{
CanaryStrategy: &v1alpha1.CanaryStrategy{
Canary: &v1alpha1.CanaryStrategy{
Steps: []v1alpha1.CanaryStep{
{
SetWeight: pointer.Int32Ptr(10),
Expand Down Expand Up @@ -64,7 +64,7 @@ func newBlueGreenRollout() *v1alpha1.Rollout {
Spec: v1alpha1.RolloutSpec{
Replicas: pointer.Int32Ptr(5),
Strategy: v1alpha1.RolloutStrategy{
BlueGreenStrategy: &v1alpha1.BlueGreenStrategy{},
BlueGreen: &v1alpha1.BlueGreenStrategy{},
},
},
Status: v1alpha1.RolloutStatus{
Expand Down
12 changes: 6 additions & 6 deletions pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func newRolloutInfo(ro v1alpha1.Rollout) rolloutInfo {
ri.step = "-"
ri.setWeight = "-"

if ro.Spec.Strategy.CanaryStrategy != nil {
if ro.Spec.Strategy.Canary != nil {
ri.strategy = "Canary"
if ro.Status.CurrentStepIndex != nil && len(ro.Spec.Strategy.CanaryStrategy.Steps) > 0 {
ri.step = fmt.Sprintf("%d/%d", *ro.Status.CurrentStepIndex, len(ro.Spec.Strategy.CanaryStrategy.Steps))
if ro.Status.CurrentStepIndex != nil && len(ro.Spec.Strategy.Canary.Steps) > 0 {
ri.step = fmt.Sprintf("%d/%d", *ro.Status.CurrentStepIndex, len(ro.Spec.Strategy.Canary.Steps))
}
// NOTE that this is desired weight, not the actual current weight
ri.setWeight = strconv.Itoa(int(replicasetutil.GetCurrentSetWeight(&ro)))
Expand All @@ -59,7 +59,7 @@ func newRolloutInfo(ro v1alpha1.Rollout) rolloutInfo {
// } else {
// ri.weight = fmt.Sprintf("%d", (ro.Status.UpdatedReplicas*100)/ro.Status.AvailableReplicas)
// }
} else if ro.Spec.Strategy.BlueGreenStrategy != nil {
} else if ro.Spec.Strategy.BlueGreen != nil {
ri.strategy = "BlueGreen"
}
ri.status = rolloutStatus(&ro)
Expand Down Expand Up @@ -121,13 +121,13 @@ func rolloutStatus(ro *v1alpha1.Rollout) string {
// updated replicas are still becoming available
return "Progressing"
}
if ro.Spec.Strategy.BlueGreenStrategy != nil {
if ro.Spec.Strategy.BlueGreen != nil {
if ro.Status.BlueGreen.ActiveSelector != "" && ro.Status.BlueGreen.ActiveSelector == ro.Status.CurrentPodHash {
return "Healthy"
}
// service cutover pending
return "Progressing"
} else if ro.Spec.Strategy.CanaryStrategy != nil {
} else if ro.Spec.Strategy.Canary != nil {
if ro.Status.Canary.StableRS != "" && ro.Status.Canary.StableRS == ro.Status.CurrentPodHash {
return "Healthy"
}
Expand Down
4 changes: 2 additions & 2 deletions rollout/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (c *RolloutController) reconcileBackgroundAnalysisRun(roCtx *canaryContext)
newRS := roCtx.NewRS()
currentArs := roCtx.CurrentAnalysisRuns()
currentAr := analysisutil.FilterAnalysisRunsByName(currentArs, rollout.Status.Canary.CurrentBackgroundAnalysisRun)
if rollout.Spec.Strategy.CanaryStrategy.Analysis == nil {
if rollout.Spec.Strategy.Canary.Analysis == nil {
err := c.cancelAnalysisRuns(roCtx, []*v1alpha1.AnalysisRun{currentAr})
if err != nil {
return nil, err
Expand All @@ -96,7 +96,7 @@ func (c *RolloutController) reconcileBackgroundAnalysisRun(roCtx *canaryContext)
if currentAr == nil {
podHash := replicasetutil.GetPodTemplateHash(newRS)
backgroundLabels := analysisutil.BackgroundLabels(podHash)
currentAr, err := c.createAnalysisRun(roCtx, rollout.Spec.Strategy.CanaryStrategy.Analysis, backgroundLabels)
currentAr, err := c.createAnalysisRun(roCtx, rollout.Spec.Strategy.Canary.Analysis, backgroundLabels)
if err == nil {
roCtx.Log().WithField(logutil.AnalysisRunKey, currentAr.Name).Info("Created background AnalysisRun")
}
Expand Down
6 changes: 3 additions & 3 deletions rollout/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func TestCreateBackgroundAnalysisRun(t *testing.T) {
r1 := newCanaryRollout("foo", 10, nil, steps, pointer.Int32Ptr(0), intstr.FromInt(0), intstr.FromInt(1))
r2 := bumpVersion(r1)
ar := analysisRun(at, v1alpha1.RolloutTypeBackgroundRunLabel, r2)
r2.Spec.Strategy.CanaryStrategy.Analysis = &v1alpha1.RolloutAnalysisStep{
r2.Spec.Strategy.Canary.Analysis = &v1alpha1.RolloutAnalysisStep{
TemplateName: at.Name,
}

Expand Down Expand Up @@ -198,7 +198,7 @@ func TestFailCreateBackgroundAnalysisRunIfInvalidTemplateRef(t *testing.T) {

r1 := newCanaryRollout("foo", 1, nil, steps, pointer.Int32Ptr(0), intstr.FromInt(0), intstr.FromInt(1))
r2 := bumpVersion(r1)
r2.Spec.Strategy.CanaryStrategy.Analysis = &v1alpha1.RolloutAnalysisStep{
r2.Spec.Strategy.Canary.Analysis = &v1alpha1.RolloutAnalysisStep{
TemplateName: "invalid-template-ref",
}

Expand Down Expand Up @@ -232,7 +232,7 @@ func TestDoNothingWithAnalysisRunsWhileBackgroundAnalysisRunRunning(t *testing.T

r1 := newCanaryRollout("foo", 1, nil, steps, pointer.Int32Ptr(0), intstr.FromInt(0), intstr.FromInt(1))
r2 := bumpVersion(r1)
r2.Spec.Strategy.CanaryStrategy.Analysis = &v1alpha1.RolloutAnalysisStep{
r2.Spec.Strategy.Canary.Analysis = &v1alpha1.RolloutAnalysisStep{
TemplateName: at.Name,
}
ar := analysisRun(at, v1alpha1.RolloutTypeBackgroundRunLabel, r2)
Expand Down
10 changes: 5 additions & 5 deletions rollout/bluegreen.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (c *RolloutController) reconcileBlueGreenPause(activeSvc, previewSvc *corev
}

pauseStartTime := rollout.Status.PauseStartTime
autoPromoteActiveServiceDelaySeconds := rollout.Spec.Strategy.BlueGreenStrategy.AutoPromotionSeconds
autoPromoteActiveServiceDelaySeconds := rollout.Spec.Strategy.BlueGreen.AutoPromotionSeconds
if autoPromoteActiveServiceDelaySeconds != nil && pauseStartTime != nil {
c.checkEnqueueRolloutDuringWait(rollout, *pauseStartTime, *autoPromoteActiveServiceDelaySeconds)
}
Expand All @@ -167,7 +167,7 @@ func (c *RolloutController) scaleDownOldReplicaSetsForBlueGreen(oldRSs []*appsv1
scaleDownAtTime, err := time.Parse(time.RFC3339, scaleDownAtStr)
if err != nil {
logCtx.Warnf("Unable to read scaleDownAt label on rs '%s'", targetRS.Name)
} else if rollout.Spec.Strategy.BlueGreenStrategy.ScaleDownDelayRevisionLimit != nil && annotationedRSs == *rollout.Spec.Strategy.BlueGreenStrategy.ScaleDownDelayRevisionLimit {
} else if rollout.Spec.Strategy.BlueGreen.ScaleDownDelayRevisionLimit != nil && annotationedRSs == *rollout.Spec.Strategy.BlueGreen.ScaleDownDelayRevisionLimit {
logCtx.Info("At ScaleDownDelayRevisionLimit and scaling down the rest")
} else {
now := metav1.Now()
Expand Down Expand Up @@ -247,7 +247,7 @@ func calculateScaleUpPreviewCheckPoint(roCtx *blueGreenContext, activeRS *appsv1
r := roCtx.Rollout()
newRS := roCtx.NewRS()
newRSAvailableCount := replicasetutil.GetAvailableReplicaCountForReplicaSets([]*appsv1.ReplicaSet{newRS})
if r.Spec.Strategy.BlueGreenStrategy.PreviewReplicaCount != nil && newRSAvailableCount == *r.Spec.Strategy.BlueGreenStrategy.PreviewReplicaCount {
if r.Spec.Strategy.BlueGreen.PreviewReplicaCount != nil && newRSAvailableCount == *r.Spec.Strategy.BlueGreen.PreviewReplicaCount {
return true
} else if reconcileBlueGreenTemplateChange(roCtx) {
return false
Expand Down Expand Up @@ -290,8 +290,8 @@ func (c *RolloutController) scaleBlueGreen(rollout *v1alpha1.Rollout, newRS *app
previewRS, _ := replicasetutil.GetReplicaSetByTemplateHash(allRS, rollout.Status.BlueGreen.PreviewSelector)
if previewRS != nil {
previewReplicas := rolloutReplicas
if rollout.Spec.Strategy.BlueGreenStrategy.PreviewReplicaCount != nil && !rollout.Status.BlueGreen.ScaleUpPreviewCheckPoint {
previewReplicas = *rollout.Spec.Strategy.BlueGreenStrategy.PreviewReplicaCount
if rollout.Spec.Strategy.BlueGreen.PreviewReplicaCount != nil && !rollout.Status.BlueGreen.ScaleUpPreviewCheckPoint {
previewReplicas = *rollout.Spec.Strategy.BlueGreen.PreviewReplicaCount
}
if *(previewRS.Spec.Replicas) != previewReplicas {
_, _, err := c.scaleReplicaSetAndRecordEvent(previewRS, previewReplicas, rollout)
Expand Down
34 changes: 17 additions & 17 deletions rollout/bluegreen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (

func newBlueGreenRollout(name string, replicas int, revisionHistoryLimit *int32, activeSvc string, previewSvc string) *v1alpha1.Rollout {
rollout := newRollout(name, replicas, revisionHistoryLimit, map[string]string{"foo": "bar"})
rollout.Spec.Strategy.BlueGreenStrategy = &v1alpha1.BlueGreenStrategy{
rollout.Spec.Strategy.BlueGreen = &v1alpha1.BlueGreenStrategy{
ActiveService: activeSvc,
PreviewService: previewSvc,
}
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)
rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs2 := newReplicaSetWithStatus(r2, 1, 1)
Expand Down Expand Up @@ -174,7 +174,7 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
Expand Down Expand Up @@ -214,7 +214,7 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
Expand Down Expand Up @@ -248,9 +248,9 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)
r2.Spec.Strategy.BlueGreenStrategy.AutoPromotionSeconds = pointer.Int32Ptr(10)
r2.Spec.Strategy.BlueGreen.AutoPromotionSeconds = pointer.Int32Ptr(10)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs2 := newReplicaSetWithStatus(r2, 1, 1)
Expand Down Expand Up @@ -283,9 +283,9 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)
r2.Spec.Strategy.BlueGreenStrategy.AutoPromotionSeconds = pointer.Int32Ptr(10)
r2.Spec.Strategy.BlueGreen.AutoPromotionSeconds = pointer.Int32Ptr(10)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs2 := newReplicaSetWithStatus(r2, 1, 1)
Expand Down Expand Up @@ -339,7 +339,7 @@ func TestBlueGreenHandlePause(t *testing.T) {
rs2PodHash := rs2.Labels[v1alpha1.DefaultRolloutUniqueLabelKey]

r2 = updateBlueGreenRolloutStatus(r2, "", rs1PodHash, 1, 1, 2, 1, false, true)
r2.Spec.Strategy.BlueGreenStrategy.ScaleDownDelaySeconds = pointer.Int32Ptr(10)
r2.Spec.Strategy.BlueGreen.ScaleDownDelaySeconds = pointer.Int32Ptr(10)

progressingCondition, _ := newProgressingCondition(conditions.NewReplicaSetReason, rs2)
conditions.SetRolloutCondition(&r2.Status, progressingCondition)
Expand Down Expand Up @@ -381,7 +381,7 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
Expand Down Expand Up @@ -423,7 +423,7 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs1PodHash := rs1.Labels[v1alpha1.DefaultRolloutUniqueLabelKey]
Expand Down Expand Up @@ -467,15 +467,15 @@ func TestBlueGreenHandlePause(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r1)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs2 := newReplicaSetWithStatus(r2, 1, 1)
rs1PodHash := rs1.Labels[v1alpha1.DefaultRolloutUniqueLabelKey]
rs2PodHash := rs2.Labels[v1alpha1.DefaultRolloutUniqueLabelKey]

r2.Spec.Strategy.BlueGreenStrategy.ScaleDownDelaySeconds = pointer.Int32Ptr(10)
r2.Spec.Strategy.BlueGreen.ScaleDownDelaySeconds = pointer.Int32Ptr(10)
r2 = updateBlueGreenRolloutStatus(r2, rs2PodHash, rs1PodHash, 1, 1, 2, 1, false, true)
now := metav1.Now()
r2.Status.PauseStartTime = &now
Expand Down Expand Up @@ -568,7 +568,7 @@ func TestBlueGreenAddScaleDownDelayToPreviousActiveService(t *testing.T) {
f.kubeobjects = append(f.kubeobjects, s, rs1, rs2)
f.replicaSetLister = append(f.replicaSetLister, rs1, rs2)

r2.Spec.Strategy.BlueGreenStrategy.ScaleDownDelaySeconds = pointer.Int32Ptr(10)
r2.Spec.Strategy.BlueGreen.ScaleDownDelaySeconds = pointer.Int32Ptr(10)
r2 = updateBlueGreenRolloutStatus(r2, "", rs1PodHash, 1, 1, 2, 1, false, true)
f.rolloutLister = append(f.rolloutLister, r2)
f.objects = append(f.objects, r2)
Expand Down Expand Up @@ -601,7 +601,7 @@ func TestBlueGreenRolloutStatusHPAStatusFieldsActiveSelectorSet(t *testing.T) {
defer f.Close()

r := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r.Spec.Strategy.BlueGreenStrategy.AutoPromotionEnabled = pointer.BoolPtr(false)
r.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r2 := bumpVersion(r)

rs1 := newReplicaSetWithStatus(r, 1, 1)
Expand Down Expand Up @@ -715,7 +715,7 @@ func TestBlueGreenRolloutIgnoringScalingUsePreviewRSCount(t *testing.T) {
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1.Spec.Strategy.BlueGreenStrategy.PreviewReplicaCount = pointer.Int32Ptr(3)
r1.Spec.Strategy.BlueGreen.PreviewReplicaCount = pointer.Int32Ptr(3)
rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs1.Spec.Replicas = pointer.Int32Ptr(2)
r2 := bumpVersion(r1)
Expand Down Expand Up @@ -966,7 +966,7 @@ func TestScaleDownLimit(t *testing.T) {
r1 := newBlueGreenRollout("foo", 1, nil, "bar", "")
r2 := bumpVersion(r1)
r3 := bumpVersion(r2)
r3.Spec.Strategy.BlueGreenStrategy.ScaleDownDelayRevisionLimit = pointer.Int32Ptr(2)
r3.Spec.Strategy.BlueGreen.ScaleDownDelayRevisionLimit = pointer.Int32Ptr(2)

rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs2 := newReplicaSetWithStatus(r2, 1, 1)
Expand Down
8 changes: 4 additions & 4 deletions rollout/canary.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ func (c *RolloutController) reconcileStableRS(roCtx *canaryContext) (bool, error
func (c *RolloutController) reconcileCanaryPause(roCtx *canaryContext) bool {
rollout := roCtx.Rollout()
logCtx := roCtx.Log()
if len(rollout.Spec.Strategy.CanaryStrategy.Steps) == 0 {
if len(rollout.Spec.Strategy.Canary.Steps) == 0 {
logCtx.Info("Rollout does not have any steps")
return false
}
currentStep, currentStepIndex := replicasetutil.GetCurrentCanaryStep(rollout)

if len(rollout.Spec.Strategy.CanaryStrategy.Steps) <= int(*currentStepIndex) {
if len(rollout.Spec.Strategy.Canary.Steps) <= int(*currentStepIndex) {
logCtx.Info("No Steps remain in the canary steps")
return false
}
Expand Down Expand Up @@ -242,7 +242,7 @@ func (c *RolloutController) syncRolloutStatusCanary(roCtx *canaryContext) error
currentStep, currentStepIndex := replicasetutil.GetCurrentCanaryStep(r)
newStatus.Canary.StableRS = r.Status.Canary.StableRS
newStatus.CurrentStepHash = conditions.ComputeStepHash(r)
stepCount := int32(len(r.Spec.Strategy.CanaryStrategy.Steps))
stepCount := int32(len(r.Spec.Strategy.Canary.Steps))

if replicasetutil.PodTemplateOrStepsChanged(r, newRS) {
newStatus.CurrentStepIndex = replicasetutil.ResetCurrentStepIndex(r)
Expand Down Expand Up @@ -315,7 +315,7 @@ func (c *RolloutController) syncRolloutStatusCanary(roCtx *canaryContext) error
if completedCurrentCanaryStep(roCtx) {
*currentStepIndex++
newStatus.CurrentStepIndex = currentStepIndex
if int(*currentStepIndex) == len(r.Spec.Strategy.CanaryStrategy.Steps) {
if int(*currentStepIndex) == len(r.Spec.Strategy.Canary.Steps) {
c.recorder.Event(r, corev1.EventTypeNormal, "SettingStableRS", "Completed all steps")
}
logCtx.Infof("Incrementing the Current Step Index to %d", *currentStepIndex)
Expand Down
Loading