Skip to content

Log event before Kubernetes de-dups them #1559

Description

@PakDLiu

Describe the bug
I am trying to log Kubernetes events as they come in. However, it seems like Kubernetes will correlate the events and if it finds a similar one, it will just increase that event's count

Is there anyway to get events as they come in before Kubernetes de-dupes them?
Here is my code right now, but it will only log if there is a new event and it doesn't log if the event correlates with an existing event.

        var events = client.CoreV1.ListEventForAllNamespacesWithHttpMessagesAsync(watch: true);
        await foreach (var (_, e) in events.WatchAsync<Corev1Event, Corev1EventList>())
        {
           log(e.Message);
        }

Kubernetes C# SDK Client Version
13.0.26

Server Kubernetes Version
1.28.5

Dotnet Runtime Version
N/A

To Reproduce
Have Kubernetes correlate the event

Expected behavior
A separate log message for every event that comes in

KubeConfig
N/A

Where do you run your app with Kubernetes SDK (please complete the following information):

  • OS: Linux
  • Environment: container
  • Cloud: Azure

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions