ironcore-dev / ironcore

Cloud Native Infrastructure as a Service
https://ironcore-dev.github.io/ironcore
Apache License 2.0
23 stars 4 forks source link

Extend Runtime Interface to Support Cross-Cluster Events #1070

Closed lukasfrank closed 6 days ago

lukasfrank commented 1 month ago

Summary

This proposal aims to extend the Runtime interface to support cross-cluster events, enhancing observability and debug-ability.

Basic example

To support events, the following components need to be updated:

Example runtime extension:

  rpc ListEvents(ListEventsRequest) returns (ListEventsResponse) {};

Motivation

Currently, understanding why a resource is in a Pending state can be challenging. Dependencies such as a Volume or a NIC might introduce delays, preventing a Machine from transitioning to the Running state. Kubernetes events offer a common pattern for attaching context to objects. By introducing events and enabling synchronization between clusters, users can use kubectl describe machine to gain meaningful context about an object's status.

Reference: Kubernetes events

ushabelgur commented 1 month ago

This is how we are recording in events: for eg:

r.Eventf(machine, corev1.EventTypeNormal, events.VolumeNotReady, "Volume %s does not access information", volume.Name)

Proposed event spec:

message EventSpec {
  string machine_id = 1; //instead of InvolvedObject(or regarding) from k8s Event can we just have machine_id? 
  string reason = 2;
  string message = 3;
  string type = 4;
  int64 event_time = 5;
  EventSeries {
      int64 count
      int64 lastObservedTime 
  }
}

These fields are deprecated in latest kubernetes version, so do we really need them ? first_timestamp last_timestamp count

lukasfrank commented 1 month ago

Thanks for your proposal: As already discussed offline, let's leave the deprecated fields out of our spec.