diff --git a/deploy/helm/events-collector-config.yaml b/deploy/helm/events-collector-config.yaml index 280ed47d..c8a89eb1 100644 --- a/deploy/helm/events-collector-config.yaml +++ b/deploy/helm/events-collector-config.yaml @@ -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 diff --git a/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap b/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap index be008d1e..0ac6fada 100644 --- a/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap +++ b/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap @@ -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: @@ -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: @@ -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: @@ -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: