From 286f8d02e4c006fdf2eb617c600912047ae6b4c6 Mon Sep 17 00:00:00 2001 From: xuezhao Date: Thu, 16 May 2024 09:56:57 +0800 Subject: [PATCH] Fix: add a condition of manifestapplied for hosted addon. (#267) Signed-off-by: xuezhaojun --- pkg/addonmanager/controllers/agentdeploy/controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/addonmanager/controllers/agentdeploy/controller.go b/pkg/addonmanager/controllers/agentdeploy/controller.go index e5e7bed3..20fa9ab9 100644 --- a/pkg/addonmanager/controllers/agentdeploy/controller.go +++ b/pkg/addonmanager/controllers/agentdeploy/controller.go @@ -392,6 +392,12 @@ func (c *addonDeployController) buildDeployManifestWorksFunc(addonWorkBuilder *a return nil, nil, err } if len(objects) == 0 { + meta.SetStatusCondition(&addon.Status.Conditions, metav1.Condition{ + Type: appliedType, + Status: metav1.ConditionTrue, + Reason: addonapiv1alpha1.AddonManifestAppliedReasonManifestsApplied, + Message: "no manifest need to apply", + }) return nil, nil, nil }