Skip to content

Commit 9fe287d

Browse files
darkowlzzsouleb
andcommitted
helmrepo: rm stale condition when type switching
Remove stale condition from HelmRepo during garbage collection when a type switch to OCI HelmRepo occurs. This ensures the OCI HelmRepo does not have any conditions from the previous type. Co-authored-by: Soule BA <[email protected]> Signed-off-by: Sunny <[email protected]>
1 parent d227586 commit 9fe287d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/helmrepository_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ func (r *HelmRepositoryReconciler) garbageCollect(ctx context.Context, obj *sour
577577
// Clean status sub-resource
578578
obj.Status.Artifact = nil
579579
obj.Status.URL = ""
580-
// Remove the condition as the artifact doesn't exist.
581-
conditions.Delete(obj, sourcev1.ArtifactInStorageCondition)
580+
// Remove any stale conditions.
581+
obj.Status.Conditions = nil
582582
return nil
583583
}
584584
if obj.GetArtifact() != nil {

0 commit comments

Comments
 (0)