Skip to content

atecontroller: emit Kubernetes Events from WorkerPool and ActorTemplate reconcilers - #881

Open
Alex Bulankou (AlexBulankou) wants to merge 1 commit into
agent-substrate:mainfrom
AlexBulankou:a4s1/controllers-eventrecorder
Open

atecontroller: emit Kubernetes Events from WorkerPool and ActorTemplate reconcilers#881
Alex Bulankou (AlexBulankou) wants to merge 1 commit into
agent-substrate:mainfrom
AlexBulankou:a4s1/controllers-eventrecorder

Conversation

@AlexBulankou

Copy link
Copy Markdown
Collaborator

Neither controller wires a record.EventRecorder, so reconcile progress and failures never surface in kubectl describe — an undebuggable reconcile loop for operators. This wires one into both controllers, following the controller-runtime idiom already used elsewhere in the operator:

  • WorkerPoolDeleting (Normal), ReconcileFailed (Warning), Synced (Normal — gated behind the existing status-change DeepEqual check so it fires once per real change, not on every requeue).
  • ActorTemplate — golden-actor lifecycle breadcrumbs across the phase machine: GoldenActorCreated / GoldenActorResumed / Ready (Normal), and GoldenActorCreateFailed / GoldenActorResumeFailed / GoldenSnapshotFailed (Warning).

go build ./..., go vet, and the controller test suite pass locally.

…te reconcilers

Neither controller wired an EventRecorder, so reconcile progress and
failures were invisible to kubectl describe. Wire record.EventRecorder
into both, following the controller-runtime idiom:

- WorkerPool: Deleting (Normal), ReconcileFailed (Warning), Synced
  (Normal - gated behind the existing status-change DeepEqual check so
  it fires once per real change, not every requeue).
- ActorTemplate: golden-actor lifecycle breadcrumbs across the phase
  machine - GoldenActorCreated / GoldenActorResumed / Ready (Normal),
  GoldenActorCreateFailed / GoldenActorResumeFailed /
  GoldenSnapshotFailed (Warning).

Signed-off-by: Alex Bulankou <alexbu@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant