Skip to content

Commit

Permalink
Rm InstalledStatus->nil on upack & add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Brett Tofel <btofel@redhat.com>
  • Loading branch information
bentito committed Jul 3, 2024
1 parent e0ff96d commit 5758f10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/v1alpha1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 0 additions & 1 deletion internal/controllers/common_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5758f10

Please sign in to comment.