Skip to content

Commit

Permalink
New condition types (#282)
Browse files Browse the repository at this point in the history
* Adds BundleLookupFailed condition type

It was previously defined and used in the operator codebase.

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>

* Adds new Subscription condition types

These conditions will be used to indicate unpack status on the subscription level.

Previously unpack status was indicated on the InstallPlan, but since we now
want to prevent InstallPlan from being created in a case of unpack job failure
we need to indicate unpack job failures in Subscription conditions.

---------

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
  • Loading branch information
m1kola committed Apr 13, 2023
1 parent 0ab3deb commit de0138f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/operators/v1alpha1/installplan_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ const (
// BundleLookupPending describes BundleLookups that are not complete.
BundleLookupPending BundleLookupConditionType = "BundleLookupPending"

// BundleLookupFailed describes conditions types for when BundleLookups fail
BundleLookupFailed BundleLookupConditionType = "BundleLookupFailed"

crdKind = "CustomResourceDefinition"
)

Expand Down
6 changes: 6 additions & 0 deletions pkg/operators/v1alpha1/subscription_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ const (

// SubscriptionResolutionFailed indicates that the dependency resolution in the namespace in which the subscription is created has failed
SubscriptionResolutionFailed SubscriptionConditionType = "ResolutionFailed"

// SubscriptionBundleUnpacking indicates that the unpack job is currently running
SubscriptionBundleUnpacking SubscriptionConditionType = "BundleUnpacking"

// SubscriptionBundleUnpackFailed indicates that the unpack job failed
SubscriptionBundleUnpackFailed SubscriptionConditionType = "BundleUnpackFailed"
)

const (
Expand Down

0 comments on commit de0138f

Please sign in to comment.