timflannagan / rukpak

Rukpak runs in a Kubernetes cluster and defines an API for installing cloud native bundle content
Apache License 2.0
0 stars 0 forks source link

status hasn't been wiped after installation was successful #37

Open github-actions[bot] opened 2 years ago

github-actions[bot] commented 2 years ago

https://github.com/timflannagan/rukpak/blob/78956e26d6757f6b8308172a7eecfaa47c29e8b3/internal/provisioner/plain/controllers/bundleinstance_controller.go#L111


        }
    }()

    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,
github-actions[bot] commented 2 years ago

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.