@@ -92,7 +92,7 @@ type UpdateRunObjList interface {
9292// +kubebuilder:printcolumn:JSONPath=`.spec.resourceSnapshotIndex`,name="Resource-Snapshot-Index",type=string
9393// +kubebuilder:printcolumn:JSONPath=`.status.policySnapshotIndexUsed`,name="Policy-Snapshot-Index",type=string
9494// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Initialized")].status`,name="Initialized",type=string
95- // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Started ")].status`,name="Started ",type=string
95+ // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Progressing ")].status`,name="Progressing ",type=string
9696// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Succeeded")].status`,name="Succeeded",type=string
9797// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
9898// +kubebuilder:printcolumn:JSONPath=`.spec.stagedRolloutStrategyName`,name="Strategy",priority=1,type=string
@@ -153,11 +153,18 @@ func (c *ClusterStagedUpdateRun) SetUpdateRunStatus(status UpdateRunStatus) {
153153type State string
154154
155155const (
156- // StateStart indicates the update run should be started and actively executing.
156+ // StateNotStarted indicates the update run has been initialized but execution has not started.
157+ // This is the default state after initialization completes.
158+ StateNotStarted State = "NotStarted"
159+
160+ // StateStart indicates the update run should execute (or resume execution if paused).
157161 StateStart State = "Start"
158162
159- // StateStop indicates the update run should be stopped and not executing .
163+ // StateStop indicates the update run should pause execution .
160164 StateStop State = "Stop"
165+
166+ // StateAbandon indicates the update run should be abandoned and terminated.
167+ StateAbandon State = "Abandon"
161168)
162169
163170// UpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated.
@@ -183,11 +190,13 @@ type UpdateRunSpec struct {
183190 StagedUpdateStrategyName string `json:"stagedRolloutStrategyName"`
184191
185192 // State indicates the desired state of the update run.
186- // When "Stop", the update run will initialize but not execute.
187- // When "Start", the update run will begin or continue execution.
193+ // NotStarted: The update run is initialized but execution has not started (default).
194+ // Start: The update run should execute or resume execution.
195+ // Stop: The update run should pause execution.
196+ // Abandon: The update run should be abandoned and terminated.
188197 // +kubebuilder:validation:Optional
189- // +kubebuilder:validation:Enum=Start;Stop
190- // +kubebuilder:default=Stop
198+ // +kubebuilder:validation:Enum=NotStarted; Start;Stop;Abandon
199+ // +kubebuilder:default=NotStarted
191200 State State `json:"state"`
192201}
193202
@@ -387,7 +396,7 @@ type UpdateRunStatus struct {
387396 // +listMapKey=type
388397 //
389398 // Conditions is an array of current observed conditions for StagedUpdateRun.
390- // Known conditions are "Initialized", "Started ", "Progressing ", "Succeeded ".
399+ // Known conditions are "Initialized", "Progressing ", "Succeeded ", "Abandoned ".
391400 // +kubebuilder:validation:Optional
392401 Conditions []metav1.Condition `json:"conditions,omitempty"`
393402}
@@ -405,12 +414,6 @@ const (
405414 // - "Unknown": The staged update run initialization has started.
406415 StagedUpdateRunConditionInitialized StagedUpdateRunConditionType = "Initialized"
407416
408- // StagedUpdateRunConditionStarted indicates whether the staged update run has been started.
409- // Its condition status can be one of the following:
410- // - "True": The staged update run has been started and is ready to progress.
411- // - "False": The staged update run is stopped or not yet started.
412- StagedUpdateRunConditionStarted StagedUpdateRunConditionType = "Started"
413-
414417 // StagedUpdateRunConditionProgressing indicates whether the staged update run is making progress.
415418 // Its condition status can be one of the following:
416419 // - "True": The staged update run is making progress.
@@ -423,6 +426,11 @@ const (
423426 // - "True": The staged update run is completed successfully.
424427 // - "False": The staged update run encountered an error and stopped.
425428 StagedUpdateRunConditionSucceeded StagedUpdateRunConditionType = "Succeeded"
429+
430+ // StagedUpdateRunConditionAbandoned indicates whether the staged update run has been abandoned.
431+ // Its condition status can be one of the following:
432+ // - "True": The staged update run has been abandoned by user request.
433+ StagedUpdateRunConditionAbandoned StagedUpdateRunConditionType = "Abandoned"
426434)
427435
428436// StageUpdatingStatus defines the status of the update run in a stage.
@@ -773,7 +781,7 @@ func (c *ClusterApprovalRequestList) GetApprovalRequestObjs() []ApprovalRequestO
773781// +kubebuilder:printcolumn:JSONPath=`.spec.resourceSnapshotIndex`,name="Resource-Snapshot-Index",type=string
774782// +kubebuilder:printcolumn:JSONPath=`.status.policySnapshotIndexUsed`,name="Policy-Snapshot-Index",type=string
775783// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Initialized")].status`,name="Initialized",type=string
776- // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Started ")].status`,name="Started ",type=string
784+ // +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Progressing ")].status`,name="Progressing ",type=string
777785// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Succeeded")].status`,name="Succeeded",type=string
778786// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
779787// +kubebuilder:printcolumn:JSONPath=`.spec.stagedRolloutStrategyName`,name="Strategy",priority=1,type=string
0 commit comments