From a181a181087a29ded03af1e8c22eecad0382b733 Mon Sep 17 00:00:00 2001 From: jnathangreeg Date: Sun, 25 Aug 2024 14:01:10 +0300 Subject: [PATCH] logic that support fields enrichment Signed-off-by: jnathangreeg --- admission/exporter/http_exporter.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admission/exporter/http_exporter.go b/admission/exporter/http_exporter.go index ba5883b..9b628bc 100644 --- a/admission/exporter/http_exporter.go +++ b/admission/exporter/http_exporter.go @@ -116,9 +116,8 @@ func (exporter *HTTPExporter) SendAdmissionAlert(ruleFailure rules.RuleFailure) return } // populate the RuntimeAlert struct with the data from the failedRule - k8sDetails := apitypes.RuntimeAlertK8sDetails{ - ClusterName: exporter.ClusterName, - } + k8sDetails := ruleFailure.GetRuntimeAlertK8sDetails() + k8sDetails.ClusterName = exporter.ClusterName httpAlert := apitypes.RuntimeAlert{ Message: ruleFailure.GetRuleAlert().RuleDescription,