Skip to content

Commit

Permalink
Handle event refs with no apiVersion/kind fields at all
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Vasilyev <[email protected]>
  • Loading branch information
nolar committed Dec 13, 2024
1 parent 7f50469 commit da5e5fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kopf/_cogs/clients/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def post_event(

# Prevent "event explosion", when core v1 events are handled and create other core v1 events.
# This can happen with `EVERYTHING` without additional filters, or by explicitly serving them.
if ref['apiVersion'] == 'v1' and ref['kind'] == 'Event':
if ref.get('apiVersion') == 'v1' and ref.get('kind') == 'Event':
return

# See #164. For cluster-scoped objects, use the current namespace from the current context.
Expand Down

0 comments on commit da5e5fb

Please sign in to comment.