Skip to content

Commit

Permalink
chore: changed name to phaseReason
Browse files Browse the repository at this point in the history
  • Loading branch information
turytsia committed Jan 2, 2025
1 parent a6b2bea commit 3c2b8b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions deploy/helm/events-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ processors:
- set(attributes["sw.k8s.pod.status"], body["status"]["phase"]) where body["kind"] == "Pod" and body["status"]["phase"] != nil

# status reason
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"]) where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"] != nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"]) where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"] != nil
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"]) where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"] != nil
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"]) where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"] != nil

transform/set_labels_and_annotations_for_entities:
error_mode: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ Custom events filter with new syntax:
statements:
- set(attributes["sw.k8s.pod.status"], body["status"]["phase"]) where body["kind"]
== "Pod" and body["status"]["phase"] != nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"]
!= nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"]
!= nil
transform/severity:
Expand Down Expand Up @@ -941,10 +941,10 @@ Custom events filter with old syntax:
statements:
- set(attributes["sw.k8s.pod.status"], body["status"]["phase"]) where body["kind"]
== "Pod" and body["status"]["phase"] != nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"]
!= nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"]
!= nil
transform/severity:
Expand Down Expand Up @@ -1492,10 +1492,10 @@ Events config should match snapshot when using default values:
statements:
- set(attributes["sw.k8s.pod.status"], body["status"]["phase"]) where body["kind"]
== "Pod" and body["status"]["phase"] != nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"]
!= nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"]
!= nil
transform/severity:
Expand Down Expand Up @@ -2042,10 +2042,10 @@ Events config should not contain manifest collection pipeline when disabled:
statements:
- set(attributes["sw.k8s.pod.status"], body["status"]["phase"]) where body["kind"]
== "Pod" and body["status"]["phase"] != nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["waiting"]["reason"]
!= nil
- set(attributes["sw.k8s.pod.statusReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
- set(attributes["sw.k8s.pod.phaseReason"], body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"])
where body["kind"] == "Pod" and body["status"]["containerStatuses"][0]["state"]["terminated"]["reason"]
!= nil
transform/severity:
Expand Down

0 comments on commit 3c2b8b3

Please sign in to comment.