Prevent delete from wiping all artifacts for kind
This commit is contained in:
parent
3e0810aefe
commit
4bde6bf880
|
|
@ -110,7 +110,7 @@ func (r *GitRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error {
|
|||
return false
|
||||
}
|
||||
// delete artifacts
|
||||
artifact := r.Storage.ArtifactFor(gvk.Kind, e.Meta, "", "")
|
||||
artifact := r.Storage.ArtifactFor(gvk.Kind, e.Meta, "*", "")
|
||||
if err := r.Storage.RemoveAll(artifact); err != nil {
|
||||
r.Log.Error(err, "unable to delete artifacts",
|
||||
gvk.Kind, fmt.Sprintf("%s/%s", e.Meta.GetNamespace(), e.Meta.GetName()))
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ func (r *HelmChartReconciler) SetupWithManager(mgr ctrl.Manager) error {
|
|||
return false
|
||||
}
|
||||
// delete artifacts
|
||||
artifact := r.Storage.ArtifactFor(gvk.Kind, e.Meta, "", "")
|
||||
artifact := r.Storage.ArtifactFor(gvk.Kind, e.Meta, "*", "")
|
||||
if err := r.Storage.RemoveAll(artifact); err != nil {
|
||||
r.Log.Error(err, "unable to delete artifacts",
|
||||
gvk.Kind, fmt.Sprintf("%s/%s", e.Meta.GetNamespace(), e.Meta.GetName()))
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ func (r *HelmRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error {
|
|||
return false
|
||||
}
|
||||
// delete artifacts
|
||||
artifact := r.Storage.ArtifactFor(gvk.Kind, e.Meta, "", "")
|
||||
artifact := r.Storage.ArtifactFor(gvk.Kind, e.Meta, "*", "")
|
||||
if err := r.Storage.RemoveAll(artifact); err != nil {
|
||||
r.Log.Error(err, "unable to delete artifacts",
|
||||
gvk.Kind, fmt.Sprintf("%s/%s", e.Meta.GetNamespace(), e.Meta.GetName()))
|
||||
|
|
|
|||
Loading…
Reference in New Issue