Skip to content

✨ Fix linter #826

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

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion api/v1alpha1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ type ClusterExtensionStatus struct {
InstalledBundle *BundleMetadata `json:"installedBundle,omitempty"`
// +optional
ResolvedBundle *BundleMetadata `json:"resolvedBundle,omitempty"`

// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
Expand Down
6 changes: 1 addition & 5 deletions internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
if err := r.Storage.Store(ctx, ext, unpackResult.Bundle); err != nil {
return ctrl.Result{}, updateStatusUnpackFailing(&ext.Status, err)
}
contentURL, err := r.Storage.URLFor(ctx, ext)
if err != nil {
return ctrl.Result{}, updateStatusUnpackFailing(&ext.Status, err)
}
updateStatusUnpacked(&ext.Status, unpackResult, contentURL)
updateStatusUnpacked(&ext.Status, unpackResult)
default:
return ctrl.Result{}, updateStatusUnpackFailing(&ext.Status, err)
}
Expand Down
6 changes: 1 addition & 5 deletions internal/controllers/clusterextension_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ func updateStatusUnpacking(status *ocv1alpha1.ClusterExtensionStatus, result *so
})
}

func updateStatusUnpacked(status *ocv1alpha1.ClusterExtensionStatus, result *source.Result, contentURL string) {
// TODO: Expose content URL through CE status.
status.ResolvedBundle = &ocv1alpha1.BundleMetadata{
Name: result.ResolvedSource.Image.Ref,
}
func updateStatusUnpacked(status *ocv1alpha1.ClusterExtensionStatus, result *source.Result) {
meta.SetStatusCondition(&status.Conditions, metav1.Condition{
Type: rukpakv1alpha2.TypeUnpacked,
Status: metav1.ConditionTrue,
Expand Down
11 changes: 0 additions & 11 deletions internal/controllers/common_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ func setResolvedStatusConditionSuccess(conditions *[]metav1.Condition, message s
})
}

// setInstalledStatusConditionUnknown sets the installed status condition to unknown.
func setInstalledStatusConditionUnknown(conditions *[]metav1.Condition, message string, generation int64) {
apimeta.SetStatusCondition(conditions, metav1.Condition{
Type: ocv1alpha1.TypeInstalled,
Status: metav1.ConditionUnknown,
Reason: ocv1alpha1.ReasonInstallationStatusUnknown,
Message: message,
ObservedGeneration: generation,
})
}

// setResolvedStatusConditionFailed sets the resolved status condition to failed.
func setResolvedStatusConditionFailed(conditions *[]metav1.Condition, message string, generation int64) {
apimeta.SetStatusCondition(conditions, metav1.Condition{
Expand Down