Resources / Remediation

Remediation

What the platform may do by itself when a condition holds: one bounded action, with a budget, a backoff and a cooldown (spec 0047 section 6). When the budget is used up an Incident is opened.

Overview

APIplatform.etorm.com/v1alpha1
Resourceremediations (cluster-scoped inside its cluster)
Short namesremed
Available inthe platform and project clusters
Statuswritten by a controller through /status

Minimal example

apiVersion: platform.etorm.com/v1alpha1
kind: Remediation
metadata:
  name: example
spec:
  when:
    group: "<group>"
    version: "<version>"
    plural: "<plural>"
    condition:
      type: "<type>"
      status: 'True'
  action:
    type: RollbackRelease

Spec

FieldTypeRequiredDefaultAllowedDescription
modestring (one of)"plan"plan, applyplan records what would be done and does nothing; apply performs the action. A policy starts in plan.
whenobjectyesWhich objects and which condition trigger the action.
when.groupstringyesAPI group of the watched kind.
when.versionstringyesAPI version.
when.pluralstringyesPlural resource name of the watched kind.
when.clusterstring"root"Logical cluster to look in (default root).
when.conditionobjectyesThe condition that must hold.
when.condition.typestringyesCondition type, for example Ready.
when.condition.statusstring (one of)yesTrue, False, UnknownThe status the condition must have.
when.condition.reasonstringIf set, the condition must also have this reason (for example OutOfFuel).
when.forSecondsinteger120at least 0For how long it must have held (since its last transition).
when.failingLinkstringup to 63 charactersFor an Intent target: act only while this link of its chain is the failing one (status.failingLink). Empty means any.
when.namestringup to 63 charactersIf set, only the object of this name (a one-off action for one object, such as one an agent proposed).
when.invariantstringup to 63 charactersIf set, the targets are the objects the named Invariant (same cluster as the policy) lists as violating, of this kind, instead of objects that hold a condition: the action runs on the violators under this policy's budget, backoff and cooldown (spec 0047 section 6.4). The condition is then not read.
when.labelsobjectIf set, only objects that carry every one of these labels (for example the Git processes of Forge, whatever their names).
actionobjectyesThe one bounded action. The list is closed: a new action needs a spec change.
action.typestring (one of)yesRollbackRelease, RedeployComponent, ResetDurableObject, ApplyDeclared, ReplaceNode, FailoverDNS, RestartPlacement, RerunBootstrapRequest, RotateNow, RederiveListenerTarget, RestartProcess, RaiseFuel, ReplaceGitProcess, RestoreIngressAffinity, RestartLogShipper, ScaleOutWhich action.
action.paramsobject (free-form)Parameters the action's owner defines.
budgetobjectAt most this many executions per target in the window.
budget.maxinteger2at least 1Executions allowed.
budget.windowSecondsinteger3600at least 60The window.
backoffobjectThe wait after a failed attempt grows by the factor up to the maximum.
backoff.initialSecondsinteger60at least 1The first wait.
backoff.factornumber2at least 1Growth per consecutive failure.
backoff.maxSecondsinteger1800at least 1The longest wait.
cooldownSecondsinteger600at least 0No other action on the same target for this long after one.
afterPolicyobjectEscalation order: this policy acts on a target only after the named policy has used its whole budget on that target and its attempts have finished. The incident for an exhausted budget is opened by the last policy of the chain, not by the ones that escalate.
afterPolicy.namestringyesup to 63 charactersThe policy this one follows.

Status

FieldTypeRequiredDefaultAllowedDescription
phasestringIdle, Acting or Exhausted.
lastEvaluatedTargetsintegerHow many targets matched at the last evaluation.
conditionslist of objectReady, Progressing and Degraded.
conditions[].typestringCondition type.
conditions[].statusstringTrue, False or Unknown.

Columns in listings

ColumnFrom
Action.spec.action.type
Mode.spec.mode
Phase.status.phase

All resources