Skip to content

Commit

Permalink
Remove status.resolution
Browse files Browse the repository at this point in the history
Fixes: operator-framework#1306

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
  • Loading branch information
LalatenduMohanty committed Sep 25, 2024
1 parent eea61cf commit 1c21642
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 72 deletions.
12 changes: 0 additions & 12 deletions api/v1alpha1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,6 @@ type BundleMetadata struct {
type ClusterExtensionStatus struct {
Install *ClusterExtensionInstallStatus `json:"install,omitempty"`

Resolution *ClusterExtensionResolutionStatus `json:"resolution,omitempty"`

// conditions is a representation of the current state for this ClusterExtension.
// The status is represented by a set of "conditions".
//
Expand Down Expand Up @@ -513,16 +511,6 @@ type ClusterExtensionInstallStatus struct {
Bundle BundleMetadata `json:"bundle"`
}

type ClusterExtensionResolutionStatus struct {
// bundle is a representation of the bundle that was identified during
// resolution to meet all installation/upgrade constraints and is slated to be
// installed or upgraded to.
//
// A "bundle" is a versioned set of content that represents the resources that
// need to be applied to a cluster to install a package.
Bundle BundleMetadata `json:"bundle"`
}

//+kubebuilder:object:root=true
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:subresource:status
Expand Down
21 changes: 0 additions & 21 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -572,34 +572,6 @@ spec:
required:
- bundle
type: object
resolution:
properties:
bundle:
description: |-
bundle is a representation of the bundle that was identified during
resolution to meet all installation/upgrade constraints and is slated to be
installed or upgraded to.
A "bundle" is a versioned set of content that represents the resources that
need to be applied to a cluster to install a package.
properties:
name:
description: |-
name is a required field and is a reference
to the name of a bundle
type: string
version:
description: |-
version is a required field and is a reference
to the version that this bundle represents
type: string
required:
- name
- version
type: object
required:
- bundle
type: object
type: object
type: object
served: true
Expand Down
7 changes: 0 additions & 7 deletions internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
// as much status as possible before returning, or at least keeps previous state if
// it is properly labeled with its observed generation.
setInstallStatus(ext, nil)
setResolutionStatus(ext, nil)
setResolvedStatusConditionFailed(ext, err.Error())
ensureAllConditionsWithReason(ext, ocv1alpha1.ReasonFailed, err.Error())
return ctrl.Result{}, err
Expand All @@ -225,7 +224,6 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
if err != nil {
// Note: We don't distinguish between resolution-specific errors and generic errors
setInstallStatus(ext, nil)
setResolutionStatus(ext, nil)
setResolvedStatusConditionFailed(ext, err.Error())
ensureAllConditionsWithReason(ext, ocv1alpha1.ReasonFailed, err.Error())
return ctrl.Result{}, err
Expand All @@ -246,11 +244,6 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
// the deprecation status to unknown? Or perhaps we somehow combine the deprecation information from
// all catalogs?
SetDeprecationStatus(ext, resolvedBundle.Name, resolvedDeprecation)

resStatus := &ocv1alpha1.ClusterExtensionResolutionStatus{
Bundle: bundleutil.MetadataFor(resolvedBundle.Name, *resolvedBundleVersion),
}
setResolutionStatus(ext, resStatus)
setResolvedStatusConditionSuccess(ext, fmt.Sprintf("resolved to %q", resolvedBundle.Image))

bundleSource := &rukpaksource.BundleSource{
Expand Down
4 changes: 0 additions & 4 deletions internal/controllers/common_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ func setStatusUnpacked(ext *ocv1alpha1.ClusterExtension, message string) {
})
}

func setResolutionStatus(ext *ocv1alpha1.ClusterExtension, resStatus *ocv1alpha1.ClusterExtensionResolutionStatus) {
ext.Status.Resolution = resStatus
}

func setInstallStatus(ext *ocv1alpha1.ClusterExtension, installStatus *ocv1alpha1.ClusterExtensionInstallStatus) {
ext.Status.Install = installStatus
}

0 comments on commit 1c21642

Please sign in to comment.