Skip to content

Sometimes workload is undefined in Notification Grouping #1681

@SergiiBieliaievskyi

Description

@SergiiBieliaievskyi

Describe the bug
Here is slack sink configuration:

- slack_sink:
    name: main_slack_sink
    slack_channel: alerts-xxxx
    api_key: "{{ env.MAIN_SLACK_SINK }}"
    grouping:
      group_by:
      - workload
      - severity
      interval: 86400
      notification_mode:
        summary:
          threaded: true
          by:
          - workload
          - severity

Nofifications are sent but if pod was killed by OOM or crush reason is CrashLoopBackOff. worload is undefined.

Matching criteria: severity: HIGH, workload: (undefined)

To Reproduce
See above

Expected behavior
As far as I understand the worload name is the name of a parent object ["Deployment", "ReplicaSet", "DaemonSet", "StatefulSet", "Pod", "Job"]:

event.operation in [K8sOperationType.CREATE, K8sOperationType.UPDATE]
        and event.obj.kind in ["Deployment", "ReplicaSet", "DaemonSet", "StatefulSet", "Pod", "Job"]

I expect the name of the parent object has to be assigned to the workload name.

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Slack client
  • Version [e.g. 22]

Smartphone (please complete the following information):
Not applicable.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions