From fe9ca973d9a9addcd6cbaa12b90f17bcbedcadbc Mon Sep 17 00:00:00 2001 From: Francisc Munteanu Date: Wed, 23 Aug 2023 10:34:09 +0200 Subject: [PATCH] feat: Implement SpaceBindingRequest controller main logic (#372) * add SpaceBindingRequest provisioning reasons --- api/v1alpha1/spacebindingrequest_types.go | 17 +++++++++++++++++ api/v1alpha1/usersignup_types.go | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) 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