-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement SpaceBindingRequest controller main logic (#322)
* add spacebindingrequest conditions
- Loading branch information
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
pkg/test/spacebindingrequest/spacebindingrequest_assertions.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package spacebindingrequest | ||
|
||
import ( | ||
toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1" | ||
corev1 "k8s.io/api/core/v1" | ||
) | ||
|
||
func Provisioning() toolchainv1alpha1.Condition { | ||
return toolchainv1alpha1.Condition{ | ||
Type: toolchainv1alpha1.ConditionReady, | ||
Status: corev1.ConditionFalse, | ||
Reason: toolchainv1alpha1.SpaceBindingRequestProvisioningReason, | ||
} | ||
} | ||
|
||
func Ready() toolchainv1alpha1.Condition { | ||
return toolchainv1alpha1.Condition{ | ||
Type: toolchainv1alpha1.ConditionReady, | ||
Status: corev1.ConditionTrue, | ||
Reason: toolchainv1alpha1.SpaceBindingRequestProvisionedReason, | ||
} | ||
} | ||
|
||
func Terminating() toolchainv1alpha1.Condition { | ||
return toolchainv1alpha1.Condition{ | ||
Type: toolchainv1alpha1.ConditionReady, | ||
Status: corev1.ConditionFalse, | ||
Reason: toolchainv1alpha1.SpaceBindingRequestTerminatingReason, | ||
} | ||
} | ||
|
||
func TerminatingFailed(msg string) toolchainv1alpha1.Condition { | ||
return toolchainv1alpha1.Condition{ | ||
Type: toolchainv1alpha1.ConditionReady, | ||
Status: corev1.ConditionFalse, | ||
Reason: toolchainv1alpha1.SpaceBindingRequestTerminatingFailedReason, | ||
Message: msg, | ||
} | ||
} | ||
|
||
func UnableToCreateSpaceBinding(msg string) toolchainv1alpha1.Condition { | ||
return toolchainv1alpha1.Condition{ | ||
Type: toolchainv1alpha1.ConditionReady, | ||
Status: corev1.ConditionFalse, | ||
Reason: toolchainv1alpha1.SpaceBindingRequestUnableToCreateSpaceBindingReason, | ||
Message: msg, | ||
} | ||
} |