Upgrade Runs
Upgrade Runs represent the execution of an Upgrade Plan. Each Upgrade Run references an Upgrade Plan and tracks the progress of upgrading resources according to the plan's rollout groups.
Upgrade Runs are cluster-scoped resources. They can be created by SKE when an Upgrade Plan's execution policy triggers, but they can also be created manually.
An Upgrade Run looks like this:
apiVersion: platform.syntasso.io/v1alpha1
kind: UpgradeRun
metadata:
name: redis-v1-to-v2-run-001
spec:
upgradePlanRef:
# Name of the UpgradePlan this run executes. Immutable after creation.
name: redis-v1-to-v2
# Set to true to pause execution. Defaults to false.
suspend: false
Upgrade Plan Reference
The upgradePlanRef field references the Upgrade Plan that this run executes. This field is immutable: once set, it
cannot be changed.
spec:
upgradePlanRef:
name: redis-v1-to-v2
When the referenced Upgrade Plan exists, the Upgrade Run will resolve the plan and begin execution.
If the plan does not exist, the Upgrade Run will set a PlanResolved condition with status False and reason PlanNotFound.
A run that starts before its plan exists can still resolve later if the plan appears.
Suspending an Upgrade Run
You can pause an in-progress Upgrade Run by setting suspend to true:
spec:
suspend: true
Setting suspend back to false resumes execution. This allows you to temporarily halt an upgrade without deleting the
run.
Previewing an upgrade before it runs
You can review exactly which resources an Upgrade Run will touch before any of them are upgraded by creating the run suspended:
apiVersion: platform.syntasso.io/v1alpha1
kind: UpgradeRun
metadata:
name: redis-v1-to-v2-preview
spec:
upgradePlanRef:
name: redis-v1-to-v2
suspend: true
A run created with suspend: true still takes its snapshot of eligible resources and writes the
snapshot ConfigMap, but it does not patch any Resource Bindings. This gives you a stable, per-rollout-group list of what
the run set out to change, without changing anything.
Once you are happy with the snapshot, set suspend back to false to let the run proceed. If you decide not to go
ahead, delete the run; the snapshot ConfigMap is cleaned up with it.
Superseded runs
When an Upgrade Plan is on a schedule and the next trigger fires while a run is still Pending or InProgress, SKE does
not start a second run alongside the first. It supersedes the active run instead:
- The active run is patched with
spec.suspend: true, so it stops starting new resource upgrades. - Its
status.supersededByis set to the name of the new run. - The new run starts in its place.
This keeps a single run rolling out at a time for a given plan, even when a schedule fires during a long-running upgrade.
How an UpgradeRun executes
When an UpgradeRun starts, it:
- Takes a snapshot of all Resource Bindings for the Promise that are on an eligible
fromversion. The snapshot records each resource's version at the moment the run begins. This baseline is used throughout the run to detect drift. - Waits for the target PromiseRevision to exist before the snapshot is finalised. If the target Promise Revision is not yet available, the run requeues until it appears.
- Processes rollout groups in plan order. For each group, it patches the
spec.versionon each matching Resource Binding to the target version and waits for Kratix to apply the upgrade. Only once every resource in the current group is accounted for does the run move to the next group.
Resource Outcomes
When a run processes a rollout group, each snapshotted resource is evaluated against its current live state. Because the run re-checks bindings on every reconcile cycle, resources can change between when the snapshot was taken and when their group is reached.
| Outcome | When it applies |
|---|---|
| Succeeded | The binding's lastAppliedVersion equals the target version; the upgrade was applied. This includes resources that were already applied at the target version by the time their group was reached. |
| Skipped | The binding no longer exists (resource was deleted), or the resource was upgraded to a different version externally. |
| Failed | Kratix reported an upgrade failure on the binding (UpgradeSucceeded=False) during the current run. The failure is part of the current run when the condition's lastTransitionTime is at or after the Upgrade Run's creationTimestamp. The entire run stops immediately. |
| Pending | The binding has been patched to the target version but Kratix has not yet applied it. If the binding is already at the target spec.version and the only upgrade failure was recorded before this Upgrade Run was created, the run treats that failure as the result of an earlier run. It sets kratix.io/manual-reconciliation: "true" on the Resource Binding to request a retry, then requeues and waits. |
Skipped resources count towards group completion and do not block the run from advancing to the next group. A single failed resource stops the run entirely. Subsequent groups are not processed. Upgrade failures recorded before the Upgrade Run was created do not fail the current run.