From cb4cfd2c89ba9e8756ae56ece1e821c02e6afa16 Mon Sep 17 00:00:00 2001 From: Mike Ng Date: Fri, 29 Jul 2022 12:02:37 -0400 Subject: [PATCH] fix appsubreport not generating for local-cluster when the pod dealing with HelmRelease is the standalone pod (#237) Signed-off-by: Mike Ng --- pkg/synchronizer/kubernetes/sync_appsubstatus.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/synchronizer/kubernetes/sync_appsubstatus.go b/pkg/synchronizer/kubernetes/sync_appsubstatus.go index 1288f007..d949801e 100644 --- a/pkg/synchronizer/kubernetes/sync_appsubstatus.go +++ b/pkg/synchronizer/kubernetes/sync_appsubstatus.go @@ -78,7 +78,8 @@ func (sync *KubeSynchronizer) SyncAppsubClusterStatus(appsub *appv1.Subscription appsubName := appsubClusterStatus.AppSub.Name pkgstatusNs := appsubClusterStatus.AppSub.Namespace isLocalCluster := (sync.hub && !sync.standalone) || - (appsubClusterStatus.Cluster == localCluster && strings.HasSuffix(appsubName, localSuffix)) + (appsubClusterStatus.Cluster == localCluster && strings.HasSuffix(appsubName, localSuffix)) || + (sync.standalone && strings.HasSuffix(appsubName, localSuffix)) if isLocalCluster || sync.standalone && skipOrphanDel { if strings.HasSuffix(appsubName, localSuffix) {