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
// StateNotStarted describes user intent to initialize but not execute the update run.
155
+
// StateInitialize describes user intent to initialize but not run the update run.
156
156
// This is the default state when an update run is created.
157
-
StateNotStartedState="Initialize"
157
+
// Users can subsequently set the state to Run.
158
+
StateInitializeState="Initialize"
158
159
159
-
// StateStarted describes user intent to execute (or resume execution if paused).
160
-
// Users can subsequently set the state to Pause or Abandon.
161
-
StateStartedState="Execute"
160
+
// StateRun describes user intent to execute (or resume execution if stopped).
161
+
// Users can subsequently set the state to Stop.
162
+
StateRunState="Run"
162
163
163
-
// StateStopped describes user intent to pause the update run.
164
-
// Users can subsequently set the state to Execute or Abandon.
165
-
StateStoppedState="Pause"
166
-
167
-
// StateAbandoned describes user intent to abandon the update run.
168
-
// This is a terminal state; once set, it cannot be changed.
169
-
StateAbandonedState="Abandon"
164
+
// StateStop describes user intent to stop the update run.
165
+
// Users can subsequently set the state to Run.
166
+
StateStopState="Stop"
170
167
)
171
168
172
169
// UpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated.
173
170
// 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 == '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"
171
+
// +kubebuilder:validation:XValidation:rule="!(has(oldSelf.state) && oldSelf.state == 'Initialize' && self.state == 'Stop')",message="invalid state transition: cannot transition from Initialize to Stop"
172
+
// +kubebuilder:validation:XValidation:rule="!(has(oldSelf.state) && oldSelf.state == 'Run' && self.state == 'Initialize')",message="invalid state transition: cannot transition from Run to Initialize"
173
+
// +kubebuilder:validation:XValidation:rule="!(has(oldSelf.state) && oldSelf.state == 'Stop' && self.state == 'Initialize')",message="invalid state transition: cannot transition from Stop to Initialize"
178
174
typeUpdateRunSpecstruct {
179
175
// PlacementName is the name of placement that this update run is applied to.
180
176
// There can be multiple active update runs for each placement, but
@@ -200,12 +196,11 @@ type UpdateRunSpec struct {
200
196
201
197
// State indicates the desired state of the update run.
202
198
// Initialize: The update run should be initialized but execution should not start (default).
203
-
// Execute: The update run should execute or resume execution.
204
-
// Pause: The update run should pause execution.
205
-
// Abandon: The update run should be abandoned and terminated.
199
+
// Run: The update run should execute or resume execution.
0 commit comments