From 04abaeba7a78ce86e006ce696b3fa7deaa7ab984 Mon Sep 17 00:00:00 2001 From: Will Kutler Date: Mon, 27 Mar 2023 15:47:18 -0400 Subject: [PATCH] Fix compliance state on missing obj evt Signed-off-by: Will Kutler --- controllers/configurationpolicy_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/configurationpolicy_controller.go b/controllers/configurationpolicy_controller.go index fbc5404a..c684c955 100644 --- a/controllers/configurationpolicy_controller.go +++ b/controllers/configurationpolicy_controller.go @@ -1600,7 +1600,7 @@ func (r *ConfigurationPolicyReconciler) handleSingleObj( // error) _ = createStatus("", obj.gvr.Resource, compliantObject, obj.namespaced, obj.policy, obj.index, false, true) - + obj.policy.Status.ComplianceState = policyv1.NonCompliant statusStr := convertPolicyStatusToString(obj.policy) objLog.Info("Sending a noncompliant status event (object missing)", "policy", obj.policy.Name, "status", statusStr)