timflannagan/rukpak

should we be deleting Bundles that have a different spec.ProvisionerClassName

github-actions opened this issue · 1 comments

compared to the BI's BundleTemplate value?

// TODO: should we be deleting Bundles that have a different spec.ProvisionerClassName

			Spec: bi.Spec.Template.Spec,
		}
		if err := r.Create(ctx, b); err != nil {
			return nil, nil, err
		}
	}
	return b, existingBundles, err
}

// reconcileOldBundles is responsible for garbage collecting any Bundles
// that no longer match the desired Bundle template.
func (r *BundleInstanceReconciler) reconcileOldBundles(ctx context.Context, oldBundles []*rukpakv1alpha1.Bundle, currBundle *rukpakv1alpha1.Bundle) (int, error) {
	var (
		errors         []error
		deletedBundles int
	)
	for _, b := range oldBundles {
		if b.GetName() == currBundle.GetName() {
			continue
		}
		// TODO: should we be deleting Bundles that have a different spec.ProvisionerClassName
		// compared to the BI's BundleTemplate value?
		if err := r.Delete(ctx, b); err != nil {
			errors = append(errors, err)
			continue
		}
		deletedBundles++
	}
	return deletedBundles, utilerrors.NewAggregate(errors)
}

type releaseState string

This issue has become stale because it has been open 60 days with no activity. The maintainers of this repo will remove this label during issue triage or it will be removed automatically after an update. Adding the lifecycle/frozen label will cause this issue to ignore lifecycle events.