From 6d8633a3bcf30cd8978cfae2df46f824fa545258 Mon Sep 17 00:00:00 2001 From: Francisc Munteanu Date: Mon, 14 Aug 2023 10:36:08 +0200 Subject: [PATCH 1/3] add SpaceBinding provisioning reasons --- api/v1alpha1/spacebinding_types.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/v1alpha1/spacebinding_types.go b/api/v1alpha1/spacebinding_types.go index 1fcd8dde..aa68a9c0 100644 --- a/api/v1alpha1/spacebinding_types.go +++ b/api/v1alpha1/spacebinding_types.go @@ -10,6 +10,13 @@ const ( // SpaceBindingMasterUserRecordLabelKey is used to label the SpaceBinding with the name of the MasterUserRecord it belongs to SpaceBindingMasterUserRecordLabelKey = LabelKeyPrefix + "masteruserrecord" + + // status condition reason + SpaceBindingTerminatingReason = terminatingReason + SpaceBindingTerminatingFailedReason = terminatingFailedReason + SpaceBindingProvisioningFailedReason = "UnableToProvision" + SpaceBindingProvisioningReason = provisioningReason + SpaceBindingProvisionedReason = provisionedReason ) // SpaceBindingSpec defines the desired state of SpaceBinding From ecb17d11847471382188c7677ee984f60319c2fa Mon Sep 17 00:00:00 2001 From: Francisc Munteanu Date: Mon, 14 Aug 2023 16:40:46 +0200 Subject: [PATCH 2/3] add comments to status condition reasons --- api/v1alpha1/spacebinding_types.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/api/v1alpha1/spacebinding_types.go b/api/v1alpha1/spacebinding_types.go index aa68a9c0..88947470 100644 --- a/api/v1alpha1/spacebinding_types.go +++ b/api/v1alpha1/spacebinding_types.go @@ -11,12 +11,22 @@ const ( // SpaceBindingMasterUserRecordLabelKey is used to label the SpaceBinding with the name of the MasterUserRecord it belongs to SpaceBindingMasterUserRecordLabelKey = LabelKeyPrefix + "masteruserrecord" - // status condition reason - SpaceBindingTerminatingReason = terminatingReason - SpaceBindingTerminatingFailedReason = terminatingFailedReason + // --- Status condition reasons --- + + // SpaceBindingTerminatingReason represents the reason for space binding termination. + SpaceBindingTerminatingReason = terminatingReason + + // SpaceBindingTerminatingFailedReason represents the reason for a failed space binding termination. + SpaceBindingTerminatingFailedReason = terminatingFailedReason + + // SpaceBindingProvisioningFailedReason represents the reason for a failed space binding provisioning. SpaceBindingProvisioningFailedReason = "UnableToProvision" - SpaceBindingProvisioningReason = provisioningReason - SpaceBindingProvisionedReason = provisionedReason + + // SpaceBindingProvisioningReason represents the reason for space binding provisioning. + SpaceBindingProvisioningReason = provisioningReason + + // SpaceBindingProvisionedReason represents the reason for a successfully provisioned space binding. + SpaceBindingProvisionedReason = provisionedReason ) // SpaceBindingSpec defines the desired state of SpaceBinding From fac7152b505d175370c282439051ef2a852b707d Mon Sep 17 00:00:00 2001 From: Francisc Munteanu Date: Wed, 16 Aug 2023 12:08:36 +0200 Subject: [PATCH 3/3] move conditions to spacebindingrequest types --- api/v1alpha1/spacebinding_types.go | 17 ----------------- api/v1alpha1/spacebindingrequest_types.go | 17 +++++++++++++++++ api/v1alpha1/usersignup_types.go | 3 ++- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/api/v1alpha1/spacebinding_types.go b/api/v1alpha1/spacebinding_types.go index 88947470..1fcd8dde 100644 --- a/api/v1alpha1/spacebinding_types.go +++ b/api/v1alpha1/spacebinding_types.go @@ -10,23 +10,6 @@ const ( // SpaceBindingMasterUserRecordLabelKey is used to label the SpaceBinding with the name of the MasterUserRecord it belongs to SpaceBindingMasterUserRecordLabelKey = LabelKeyPrefix + "masteruserrecord" - - // --- Status condition reasons --- - - // SpaceBindingTerminatingReason represents the reason for space binding termination. - SpaceBindingTerminatingReason = terminatingReason - - // SpaceBindingTerminatingFailedReason represents the reason for a failed space binding termination. - SpaceBindingTerminatingFailedReason = terminatingFailedReason - - // SpaceBindingProvisioningFailedReason represents the reason for a failed space binding provisioning. - SpaceBindingProvisioningFailedReason = "UnableToProvision" - - // SpaceBindingProvisioningReason represents the reason for space binding provisioning. - SpaceBindingProvisioningReason = provisioningReason - - // SpaceBindingProvisionedReason represents the reason for a successfully provisioned space binding. - SpaceBindingProvisionedReason = provisionedReason ) // SpaceBindingSpec defines the desired state of SpaceBinding diff --git a/api/v1alpha1/spacebindingrequest_types.go b/api/v1alpha1/spacebindingrequest_types.go index 70931220..6a0e0472 100644 --- a/api/v1alpha1/spacebindingrequest_types.go +++ b/api/v1alpha1/spacebindingrequest_types.go @@ -9,6 +9,23 @@ const ( SpaceBindingRequestLabelKey = LabelKeyPrefix + "spacebindingrequest" // SpaceBindingRequestNamespaceLabelKey is a label on the SpaceBinding, and will hold the namespace of the SpaceBindingRequest that created the SpaceBinding resource. SpaceBindingRequestNamespaceLabelKey = LabelKeyPrefix + "spacebindingrequest-namespace" + + // --- Status condition reasons --- + + // SpaceBindingRequestTerminatingReason represents the reason for space binding request termination. + SpaceBindingRequestTerminatingReason = terminatingReason + + // SpaceBindingRequestTerminatingFailedReason represents the reason for a failed space binding request termination. + SpaceBindingRequestTerminatingFailedReason = terminatingFailedReason + + // SpaceBindingRequestUnableToCreateSpaceBindingReason represents the reason for a failed space binding creation. + SpaceBindingRequestUnableToCreateSpaceBindingReason = UnableToCreateSpaceBinding + + // SpaceBindingRequestProvisioningReason represents the reason for space binding request provisioning. + SpaceBindingRequestProvisioningReason = provisioningReason + + // SpaceBindingRequestProvisionedReason represents the reason for a successfully provisioned space binding request. + SpaceBindingRequestProvisionedReason = provisionedReason ) // SpaceBindingRequestSpec defines the desired state of SpaceBindingRequest diff --git a/api/v1alpha1/usersignup_types.go b/api/v1alpha1/usersignup_types.go index 120445d7..c8647575 100644 --- a/api/v1alpha1/usersignup_types.go +++ b/api/v1alpha1/usersignup_types.go @@ -68,6 +68,7 @@ const ( UserSignupStateLabelValueBanned = "banned" // Status condition reasons + UnableToCreateSpaceBinding = "UnableToCreateSpaceBinding" UserSignupNoClusterAvailableReason = "NoClusterAvailable" UserSignupNoUserTierAvailableReason = "NoUserTierAvailable" UserSignupNoTemplateTierAvailableReason = "NoTemplateTierAvailable" @@ -77,7 +78,7 @@ const ( UserSignupUnableToUpdateStateLabelReason = "UnableToUpdateStateLabel" UserSignupUnableToDeleteMURReason = "UnableToDeleteMUR" UserSignupUnableToCreateSpaceReason = "UnableToCreateSpace" - UserSignupUnableToCreateSpaceBindingReason = "UnableToCreateSpaceBinding" + UserSignupUnableToCreateSpaceBindingReason = UnableToCreateSpaceBinding UserSignupProvisioningSpaceReason = "ProvisioningSpace" // The UserSignupUserDeactivatingReason constant will be replaced with UserSignupDeactivationInProgressReason