timflannagan/rukpak

update BundleInstance's status

github-actions opened this issue · 1 comments

// TODO: update BundleInstance's status

		}
	}()

	bundle, oldBundles, err := r.ensureDesiredBundle(ctx, bi)
	if err != nil {
		// TODO: update BundleInstance's status
		l.Error(err, "failed to ensure the desired bundle")
		return ctrl.Result{}, err
	}

	// TODO: status hasn't been wiped after installation was successful
	desiredObjects, err := r.loadBundle(ctx, bundle, bi.GetName())
	if err != nil {
		var bnuErr *errBundleNotUnpacked
		if errors.As(err, &bnuErr) {
			reason := fmt.Sprintf("BundleUnpack%s", bundle.Status.Phase)
			if bundle.Status.Phase == rukpakv1alpha1.PhaseUnpacking {
				reason = "BundleUnpackRunning"
			}
			// TODO: no message being outputted in this case
			meta.SetStatusCondition(&bi.Status.Conditions, metav1.Condition{
				Type:   rukpakv1alpha1.TypeInstalled,
				Status: metav1.ConditionFalse,
				Reason: reason,
			})
			return ctrl.Result{RequeueAfter: 15 * time.Second}, nil
		}
		meta.SetStatusCondition(&bi.Status.Conditions, metav1.Condition{
			Type:    rukpakv1alpha1.TypeHasValidBundle,

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.