diff --git a/api/v1alpha1/clusterextension_types.go b/api/v1alpha1/clusterextension_types.go index 7fc8bd9b0..afcd439f3 100644 --- a/api/v1alpha1/clusterextension_types.go +++ b/api/v1alpha1/clusterextension_types.go @@ -160,6 +160,8 @@ type BundleMetadata struct { } // ClusterExtensionStatus defines the observed state of ClusterExtension +// InstalledBundle should only be modified when a new bundle is successfully installed, that way if you've previously successfully installed a bundle before, +// if an upgrade fails it is still appropriately communicated to you that there is still a bundle that is currently installed and owned by the ClusterExtension type ClusterExtensionStatus struct { // +optional InstalledBundle *BundleMetadata `json:"installedBundle,omitempty"` diff --git a/internal/controllers/common_controller.go b/internal/controllers/common_controller.go index 640d557f3..dff4aceb1 100644 --- a/internal/controllers/common_controller.go +++ b/internal/controllers/common_controller.go @@ -119,7 +119,6 @@ func setStatusUnpackFailed(ext *ocv1alpha1.ClusterExtension, message string) { } func setStatusInstallFalseUnpackFailed(ext *ocv1alpha1.ClusterExtension, message string) { - ext.Status.InstalledBundle = nil apimeta.SetStatusCondition(&ext.Status.Conditions, metav1.Condition{ Type: ocv1alpha1.TypeUnpacked, Status: metav1.ConditionFalse,