kubeslice / worker-operator

Kubeslice Worker Operator Opensource Repository: The KubeSlice Worker Operator is a Kubernetes operator that manages the lifecycle of KubeSlice worker clusters.
Apache License 2.0
59 stars 19 forks source link

Worker operator events #232

Closed gourishkb closed 1 year ago

gourishkb commented 1 year ago

This PR adds events for slice and refactors existing events to use monitoring framework events.

The following have been changed :

  1. use of a util package which has RecordEvent function to systematically handle raising of events and reporting of error in case the event is raised unsuccessfully.
  2. All events are listed under worker-events.yaml file which will act as the source of truth for documentation as well as eventSchema for our code.
  3. Delete operations are marked as Warning type to highlight to the user that a operation of potential concern has happened.
  4. Tests are refactored across the controllers to verify the events are raised and are with the appropriate format.