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 <soule@weave.works> Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
parent
d22758643b
commit
9fe287d912
|
@ -577,8 +577,8 @@ func (r *HelmRepositoryReconciler) garbageCollect(ctx context.Context, obj *sour
|
|||
// Clean status sub-resource
|
||||
obj.Status.Artifact = nil
|
||||
obj.Status.URL = ""
|
||||
// Remove the condition as the artifact doesn't exist.
|
||||
conditions.Delete(obj, sourcev1.ArtifactInStorageCondition)
|
||||
// Remove any stale conditions.
|
||||
obj.Status.Conditions = nil
|
||||
return nil
|
||||
}
|
||||
if obj.GetArtifact() != nil {
|
||||
|
|
Loading…
Reference in New Issue