Skip to content

Conversation

@scotwells
Copy link
Contributor

Summary

This PR resolves an issue where a webhook batch wasn't being parsed correctly into individual audit log events that could be processed by the pipeline. This was resulting in clickhouse storing the entire batch of audit events in a single row.

{
  "kind": "EventList",
  "apiVersion": "audit.k8s.io/v1",
  "items": [
     { "kind": "Event", ... },
     { "kind": "Event", ... }
  ]
}

It's expected the pipeline will take the above batch of events sent to the webhook and convert it into individual logs:

{ "kind": "Event", ... },

Detail

The webhook processor should use the .items as the output from the stage because vector will automatically convert each array element into its own log entry. This will result in vector sending individual log events through the pipeline after this stage.

I also remove an unnecessary stage that was adding a source / cluster label to each log entry.


Relates to https://github.com/datum-cloud/engineering/issues/90

The webhook processor should use the `.items` as the output from the
stage because vector will automatically convert each array element into
it's own log entry.

This will result in vector sending individual log events through the
pipeline after this stage.

I also remove an unnecessary stage that was adding a source / cluster
label to each log entry.
@scotwells scotwells merged commit e9e124d into main Dec 24, 2025
3 of 4 checks passed
@scotwells scotwells deleted the fix/adjust-webhook-parsing branch December 24, 2025 18:18
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.

3 participants