From d2bd8b4b62aa03dd9a5785ac7fc489495480ce8f Mon Sep 17 00:00:00 2001 From: Gianluca Mardente Date: Tue, 24 Feb 2026 22:05:01 +0100 Subject: [PATCH] (bug) Ignore missing resources in templateResourceRefs When undeploying a Helm chart, the process should no longer fail if resources listed in templateResourceRefs are missing. The system will now skip these errors and proceed with the undeployment. --- controllers/handlers_helm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/handlers_helm.go b/controllers/handlers_helm.go index 27464fbd..392b3a94 100644 --- a/controllers/handlers_helm.go +++ b/controllers/handlers_helm.go @@ -344,7 +344,9 @@ func undeployHelmCharts(ctx context.Context, c client.Client, mgmtResources, err := collectTemplateResourceRefs(ctx, clusterSummary) if err != nil { - return err + if !apierrors.IsNotFound(err) { + return err + } } err = undeployHelmChartResources(ctx, c, clusterSummary, kubeconfig, mgmtResources, logger)