From de0138f9c02444413a5878c6dc770cff7a51e19f Mon Sep 17 00:00:00 2001 From: Mikalai Radchuk <509198+m1kola@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:50:00 +0100 Subject: [PATCH] New condition types (#282) * Adds BundleLookupFailed condition type It was previously defined and used in the operator codebase. Signed-off-by: Mikalai Radchuk * 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 --- pkg/operators/v1alpha1/installplan_types.go | 3 +++ pkg/operators/v1alpha1/subscription_types.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pkg/operators/v1alpha1/installplan_types.go b/pkg/operators/v1alpha1/installplan_types.go index 5210436d9..09deba525 100644 --- a/pkg/operators/v1alpha1/installplan_types.go +++ b/pkg/operators/v1alpha1/installplan_types.go @@ -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" ) diff --git a/pkg/operators/v1alpha1/subscription_types.go b/pkg/operators/v1alpha1/subscription_types.go index 900cc4657..2452f9a1c 100644 --- a/pkg/operators/v1alpha1/subscription_types.go +++ b/pkg/operators/v1alpha1/subscription_types.go @@ -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 (