@@ -91,7 +91,7 @@ type UpdateRunObjList interface {
9191// +kubebuilder:printcolumn:JSONPath=`.spec.resourceSnapshotIndex`,name="Resource-Snapshot-Index",type=string
9292// +kubebuilder:printcolumn:JSONPath=`.status.policySnapshotIndexUsed`,name="Policy-Snapshot-Index",type=string
9393// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Initialized")].status`,name="Initialized",type=string
94- // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Started ")].status`,name="Started ",type=string
94+ // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Progressing ")].status`,name="Progressing ",type=string
9595// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Succeeded")].status`,name="Succeeded",type=string
9696// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
9797// +kubebuilder:printcolumn:JSONPath=`.spec.stagedRolloutStrategyName`,name="Strategy",priority=1,type=string
@@ -152,11 +152,18 @@ func (c *ClusterStagedUpdateRun) SetUpdateRunStatus(status UpdateRunStatus) {
152152type State string
153153
154154const (
155- // StateStart indicates the update run should be started and actively executing.
155+ // StateNotStarted indicates the update run has been initialized but execution has not started.
156+ // This is the default state after initialization completes.
157+ StateNotStarted State = "NotStarted"
158+
159+ // StateStart indicates the update run should execute (or resume execution if paused).
156160 StateStart State = "Start"
157161
158- // StateStop indicates the update run should be stopped and not executing .
162+ // StateStop indicates the update run should pause execution .
159163 StateStop State = "Stop"
164+
165+ // StateAbandon indicates the update run should be abandoned and terminated.
166+ StateAbandon State = "Abandon"
160167)
161168
162169// UpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated.
@@ -182,11 +189,13 @@ type UpdateRunSpec struct {
182189 StagedUpdateStrategyName string `json:"stagedRolloutStrategyName"`
183190
184191 // State indicates the desired state of the update run.
185- // When "Stop", the update run will initialize but not execute.
186- // When "Start", the update run will begin or continue execution.
192+ // NotStarted: The update run is initialized but execution has not started (default).
193+ // Start: The update run should execute or resume execution.
194+ // Stop: The update run should pause execution.
195+ // Abandon: The update run should be abandoned and terminated.
187196 // +kubebuilder:validation:Optional
188- // +kubebuilder:validation:Enum=Start;Stop
189- // +kubebuilder:default=Stop
197+ // +kubebuilder:validation:Enum=NotStarted; Start;Stop;Abandon
198+ // +kubebuilder:default=NotStarted
190199 State State `json:"state"`
191200}
192201
@@ -367,7 +376,7 @@ type UpdateRunStatus struct {
367376 // +listMapKey=type
368377 //
369378 // Conditions is an array of current observed conditions for StagedUpdateRun.
370- // Known conditions are "Initialized", "Started ", "Progressing ", "Succeeded ".
379+ // Known conditions are "Initialized", "Progressing ", "Succeeded ", "Abandoned ".
371380 // +kubebuilder:validation:Optional
372381 Conditions []metav1.Condition `json:"conditions,omitempty"`
373382}
@@ -385,12 +394,6 @@ const (
385394 // - "Unknown": The staged update run initialization has started.
386395 StagedUpdateRunConditionInitialized StagedUpdateRunConditionType = "Initialized"
387396
388- // StagedUpdateRunConditionStarted indicates whether the staged update run has been started.
389- // Its condition status can be one of the following:
390- // - "True": The staged update run has been started and is ready to progress.
391- // - "False": The staged update run is stopped or not yet started.
392- StagedUpdateRunConditionStarted StagedUpdateRunConditionType = "Started"
393-
394397 // StagedUpdateRunConditionProgressing indicates whether the staged update run is making progress.
395398 // Its condition status can be one of the following:
396399 // - "True": The staged update run is making progress.
@@ -403,6 +406,11 @@ const (
403406 // - "True": The staged update run is completed successfully.
404407 // - "False": The staged update run encountered an error and stopped.
405408 StagedUpdateRunConditionSucceeded StagedUpdateRunConditionType = "Succeeded"
409+
410+ // StagedUpdateRunConditionAbandoned indicates whether the staged update run has been abandoned.
411+ // Its condition status can be one of the following:
412+ // - "True": The staged update run has been abandoned by user request.
413+ StagedUpdateRunConditionAbandoned StagedUpdateRunConditionType = "Abandoned"
406414)
407415
408416// StageUpdatingStatus defines the status of the update run in a stage.
@@ -748,7 +756,7 @@ func (c *ClusterApprovalRequestList) GetApprovalRequestObjs() []ApprovalRequestO
748756// +kubebuilder:printcolumn:JSONPath=`.spec.resourceSnapshotIndex`,name="Resource-Snapshot-Index",type=string
749757// +kubebuilder:printcolumn:JSONPath=`.status.policySnapshotIndexUsed`,name="Policy-Snapshot-Index",type=string
750758// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Initialized")].status`,name="Initialized",type=string
751- // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Started ")].status`,name="Started ",type=string
759+ // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Progressing ")].status`,name="Progressing ",type=string
752760// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Succeeded")].status`,name="Succeeded",type=string
753761// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
754762// +kubebuilder:printcolumn:JSONPath=`.spec.stagedRolloutStrategyName`,name="Strategy",priority=1,type=string
0 commit comments