Skip to content

v0.13.0

Choose a tag to compare

@Alphadelta14 Alphadelta14 released this 29 Sep 19:14
· 24 commits to main since this release
d292109

Added

  • Reconciliation metrics. Controller::with_observer reports every
    reconciliation pass to a ReconcileObserver, with its Phase (init,
    apply, cleanup, or delete), Outcome (completed, waiting,
    skipped, failed, or abandoned), and duration. Reconcilers can time
    named steps of their work with TraceMetadata::step, and override a
    pass's outcome with TraceMetadata::set_outcome. Passes cancelled mid-way
    (for instance, on losing a leadership lease) are reported as abandoned.
  • PrometheusMetrics, behind the new prometheus feature, a
    ReconcileObserver exporting <namespace>_reconciliations_total,
    <namespace>_reconciliation_duration_seconds,
    <namespace>_reconciliation_steps_total, and
    <namespace>_reconciliation_step_duration_seconds, with histogram
    buckets from 10ms to 30s by default.
  • Kubernetes events, in the new events module. EventRecorder publishes
    events.k8s.io/v1 events on behalf of one controller, aggregating
    identical repeats into a single event's series, truncating overlong
    notes, and giving up after a timeout (5 seconds by default).
    Controller::with_event_recorder publishes an event on the resource
    whenever reconciling it fails, as determined by the new
    Context::failure_event hook, and enables TraceMetadata::publish_event
    for reconcilers' own events.
  • The conditions module, for maintaining a resource's standard
    status.conditions. conditions::set applies a DesiredCondition,
    keeping lastTransitionTime unless the condition's status changes, and
    reports whether anything changed (and so whether the status needs
    writing). conditions::find_observed ignores conditions determined from
    an older generation of the resource.
  • Controller::with_name, naming a controller in its metrics and tracing
    span.
  • Error is now exported, along with Error::display_chain, so that
    Context::error_action can be overridden outside this crate.

Changed

  • The controller field of the reconcile tracing span now defaults to the
    resource kind for contexts without a finalizer, rather than being empty.
  • The reconcile tracing span has a new outcome field.