You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apis/placement/v1beta1/stageupdate_types.go
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -154,27 +154,27 @@ type State string
154
154
const (
155
155
// StateNotStarted describes user intent to initialize but not execute the update run.
156
156
// This is the default state when an update run is created.
157
-
StateNotStartedState="NotStarted"
157
+
StateNotStartedState="Initialize"
158
158
159
159
// StateStarted describes user intent to execute (or resume execution if paused).
160
-
// Users can subsequently set the state to Stopped or Abandoned.
161
-
StateStartedState="Started"
160
+
// Users can subsequently set the state to Pause or Abandon.
161
+
StateStartedState="Execute"
162
162
163
163
// StateStopped describes user intent to pause the update run.
164
-
// Users can subsequently set the state to Started or Abandoned.
165
-
StateStoppedState="Stopped"
164
+
// Users can subsequently set the state to Execute or Abandon.
165
+
StateStoppedState="Pause"
166
166
167
167
// StateAbandoned describes user intent to abandon the update run.
168
168
// This is a terminal state; once set, it cannot be changed.
169
-
StateAbandonedState="Abandoned"
169
+
StateAbandonedState="Abandon"
170
170
)
171
171
172
172
// UpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated.
173
173
// It specifies a stage-by-stage update process across selected clusters for the given ResourcePlacement object.
174
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.state) || oldSelf.state != 'NotStarted' || self.state != 'Stopped'",message="invalid state transition: cannot transition from NotStarted to Stopped"
175
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.state) || oldSelf.state != 'Started' || self.state != 'NotStarted'",message="invalid state transition: cannot transition from Started to NotStarted"
176
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.state) || oldSelf.state != 'Stopped' || self.state != 'NotStarted'",message="invalid state transition: cannot transition from Stopped to NotStarted"
177
-
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.state) || oldSelf.state != 'Abandoned' || self.state == 'Abandoned'",message="invalid state transition: Abandoned is a terminal state and cannot transition to any other state"
174
+
// +kubebuilder:validation:XValidation:rule="!(has(oldSelf.state) && oldSelf.state == 'Initialize' && self.state == 'Pause')",message="invalid state transition: cannot transition from Initialize to Pause"
175
+
// +kubebuilder:validation:XValidation:rule="!(has(oldSelf.state) && oldSelf.state == 'Execute' && self.state == 'Initialize')",message="invalid state transition: cannot transition from Execute to Initialize"
176
+
// +kubebuilder:validation:XValidation:rule="!(has(oldSelf.state) && oldSelf.state == 'Pause' && self.state == 'Initialize')",message="invalid state transition: cannot transition from Pause to Initialize"
177
+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.state) || oldSelf.state != 'Abandon' || self.state == 'Abandon'",message="invalid state transition: Abandon is a terminal state and cannot transition to any other state"
178
178
typeUpdateRunSpecstruct {
179
179
// PlacementName is the name of placement that this update run is applied to.
180
180
// There can be multiple active update runs for each placement, but
0 commit comments