Track runner spec updates with an actionable revision (#4638)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Nikola Jokic
2026-09-11 12:44:03 +00:00
committed by GitHub
co-authored by Copilot App Copilot Autofix powered by AI
parent 5581cd0c54
commit 6f89d057c0
14 changed files with 1010 additions and 40 deletions
@@ -36,12 +36,23 @@ type EphemeralRunnerSetSpec struct {
// but does not apply to existing ephemeral runners.
// +optional
EphemeralRunnerMetadata *ResourceMeta `json:"ephemeralRunnerMetadata,omitempty"`
// ActionableRevision is the desired runner-spec revision. It increments whenever
// Spec.EphemeralRunnerSpec changes, enabling the EphemeralRunnerSet controller
// to detect spec updates.
// Unset defaults to 0.
// +optional
ActionableRevision int64 `json:"actionableRevision,omitempty"`
}
// EphemeralRunnerSetStatus defines the observed state of EphemeralRunnerSet
type EphemeralRunnerSetStatus struct {
// +optional
Phase EphemeralRunnerSetPhase `json:"phase"`
// AppliedActionableRevision is a restart-safe applied marker tracking the last successfully
// applied ActionableRevision value. Advances only after spec cleanup succeeds.
// Unset defaults to 0.
// +optional
AppliedActionableRevision int64 `json:"appliedActionableRevision,omitempty"`
}
// EphemeralRunnerSetPhase is the phase of the ephemeral runner set resource
@@ -71,11 +82,6 @@ type EphemeralRunnerSet struct {
Status EphemeralRunnerSetStatus `json:"status,omitempty"`
}
// EphemeralRunnerSpecHash computes the hash value of the EphemeralRunnerSpec and returns it as a string.
func (ers *EphemeralRunnerSet) EphemeralRunnerSpecHash() string {
return ers.Spec.EphemeralRunnerSpec.Hash()
}
func (ers *EphemeralRunnerSet) GitHubConfigSecret() string {
return ers.Spec.EphemeralRunnerSpec.GitHubConfigSecret
}