Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 83
✨ Cleanups after bumping Rukpak#928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -110,7 +110,6 @@ const ( | ||
| ReasonUnpackPending = "UnpackPending" | ||
| ReasonUnpackSuccess = "UnpackSuccess" | ||
| ReasonUnpackFailed = "UnpackFailed" | ||
| ReasonUnpacking = "Unpacking" | ||
bentito marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ReasonErrorGettingReleaseState = "ErrorGettingReleaseState" | ||
| ReasonCreateDynamicWatchFailed = "CreateDynamicWatchFailed" | ||
| @@ -142,7 +141,6 @@ func init() { | ||
| ReasonHasValidBundleUnknown, | ||
| ReasonUnpackPending, | ||
| ReasonUnpackSuccess, | ||
bentito marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ReasonUnpacking, | ||
| ReasonUnpackFailed, | ||
| ReasonErrorGettingReleaseState, | ||
| ReasonCreateDynamicWatchFailed, | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -63,6 +63,7 @@ import ( | ||
| "github.com/operator-framework/operator-registry/alpha/declcfg" | ||
| "github.com/operator-framework/operator-registry/alpha/property" | ||
| rukpakv1alpha2 "github.com/operator-framework/rukpak/api/v1alpha2" | ||
| registryv1handler "github.com/operator-framework/rukpak/pkg/handler" | ||
| helmpredicate "github.com/operator-framework/rukpak/pkg/helm-operator-plugins/predicate" | ||
| rukpaksource "github.com/operator-framework/rukpak/pkg/source" | ||
| "github.com/operator-framework/rukpak/pkg/storage" | ||
| @@ -73,7 +74,6 @@ import ( | ||
| catalogfilter "github.com/operator-framework/operator-controller/internal/catalogmetadata/filter" | ||
| catalogsort "github.com/operator-framework/operator-controller/internal/catalogmetadata/sort" | ||
| "github.com/operator-framework/operator-controller/internal/conditionsets" | ||
| "github.com/operator-framework/operator-controller/internal/handler" | ||
| "github.com/operator-framework/operator-controller/internal/labels" | ||
| ) | ||
| @@ -85,7 +85,7 @@ type ClusterExtensionReconciler struct { | ||
| Unpacker rukpaksource.Unpacker | ||
| ActionClientGetter helmclient.ActionClientGetter | ||
| Storage storage.Storage | ||
| Handler handler.Handler | ||
| Handler registryv1handler.Handler | ||
| dynamicWatchMutex sync.RWMutex | ||
| dynamicWatchGVKs map[schema.GroupVersionKind]struct{} | ||
| controller crcontroller.Controller | ||
| @@ -248,11 +248,6 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp | ||
| setHasValidBundleUnknown(ext, "unpack pending") | ||
| setInstalledStatusConditionUnknown(ext, "installation has not been attempted as unpack is pending") | ||
| return ctrl.Result{}, nil | ||
| case rukpaksource.StateUnpacking: | ||
| setStatusUnpacking(ext, unpackResult.Message) | ||
| setHasValidBundleUnknown(ext, "unpack pending") | ||
| setInstalledStatusConditionUnknown(ext, "installation has not been attempted as unpack is pending") | ||
| return ctrl.Result{}, nil | ||
| case rukpaksource.StateUnpacked: | ||
| // TODO: Add finalizer to clean the stored bundles, after https://github.com/operator-framework/rukpak/pull/897 | ||
| @@ -274,7 +269,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp | ||
| return ctrl.Result{}, err | ||
| } | ||
| chrt, values, err := r.Handler.Handle(ctx, bundleFS, ext) | ||
| chrt, values, err := r.Handler.Handle(ctx, bundleFS, bd) | ||
bentito marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if err != nil { | ||
| setInstalledStatusConditionFailed(ext, err.Error()) | ||
| return ctrl.Result{}, err | ||
| @@ -533,6 +528,7 @@ func (r *ClusterExtensionReconciler) generateBundleDeploymentForUnpack(bundlePat | ||
| UID: ce.UID, | ||
| }, | ||
| Spec: rukpakv1alpha2.BundleDeploymentSpec{ | ||
| InstallNamespace: ce.Spec.InstallNamespace, | ||
| Source: rukpakv1alpha2.BundleSource{ | ||
| Type: rukpakv1alpha2.SourceTypeImage, | ||
| Image: &rukpakv1alpha2.ImageSource{ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -152,18 +152,6 @@ func setStatusUnpackPending(ext *ocv1alpha1.ClusterExtension, message string) { | ||
| }) | ||
| } | ||
| // TODO: verify if we need to update the installBundle status or leave it as is. | ||
| func setStatusUnpacking(ext *ocv1alpha1.ClusterExtension, message string) { | ||
| ext.Status.InstalledBundle = nil | ||
| apimeta.SetStatusCondition(&ext.Status.Conditions, metav1.Condition{ | ||
| Type: ocv1alpha1.TypeUnpacked, | ||
| Status: metav1.ConditionFalse, | ||
| Reason: ocv1alpha1.ReasonUnpacking, | ||
| Message: message, | ||
| ObservedGeneration: ext.GetGeneration(), | ||
| }) | ||
| } | ||
| func setStatusUnpacked(ext *ocv1alpha1.ClusterExtension, message string) { | ||
bentito marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| apimeta.SetStatusCondition(&ext.Status.Conditions, metav1.Condition{ | ||
| Type: ocv1alpha1.TypeUnpacked, | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.