Skip to content

Commit e50614a

Browse files
committed
Updated Status Messages and Types
Signed-off-by: Lucifergene <[email protected]>
1 parent f7909c3 commit e50614a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

api/v1alpha1/common_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const (
1313
// ConditionProgressing is True when the operator is progressing
1414
ConditionProgressing ConditionType = "Progressing"
1515

16-
// ConditionApplicationReady is True when the application is ready
17-
ConditionApplicationReady ConditionType = "ApplicationReady"
16+
// ConditionReady is True when the application is ready
17+
ConditionReady ConditionType = "Ready"
1818

1919
// ConditionGitRepoReachable is True if the Git repository is reachable
2020
ConditionGitRepoReachable ConditionType = "GitRepoReachable"

controller/consoleapplication_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (r *ConsoleApplicationReconciler) Reconcile(ctx context.Context, req ctrl.R
112112
return NoRequeue()
113113
}
114114

115-
// Add the Strategy Service here
115+
// Add the Strategy Service here: Return the list of resources config that needs to be created
116116

117117
logger.Info("All done!")
118118
SetSucceeded(operatorCR)

controller/status.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ func SetStarted(operatorCR *appsv1alpha1.ConsoleApplication) {
3939
Status: metav1.ConditionTrue,
4040
Reason: "Reconciling",
4141
LastTransitionTime: metav1.NewTime(time.Now()),
42-
Message: "Reconciliation in progress",
42+
Message: "Requirements are being met",
4343
})
4444
}
4545

4646
// SetFailed sets the Operator Progressing and Application Ready conditions to False with the provided reason and message.
4747
func SetFailed(operatorCR *appsv1alpha1.ConsoleApplication, reason, message string) {
4848
meta.SetStatusCondition(&operatorCR.Status.Conditions, metav1.Condition{
49-
Type: appsv1alpha1.ConditionApplicationReady.String(),
49+
Type: appsv1alpha1.ConditionReady.String(),
5050
Status: metav1.ConditionFalse,
5151
Reason: reason,
5252
LastTransitionTime: metav1.NewTime(time.Now()),
@@ -57,14 +57,14 @@ func SetFailed(operatorCR *appsv1alpha1.ConsoleApplication, reason, message stri
5757
Status: metav1.ConditionFalse,
5858
Reason: appsv1alpha1.ReasonReconcileFailed.String(),
5959
LastTransitionTime: metav1.NewTime(time.Now()),
60-
Message: "Reconciliation failed",
60+
Message: message,
6161
})
6262
}
6363

6464
// SetSucceeded sets the Operator Progressing and Application Ready conditions to True.
6565
func SetSucceeded(operatorCR *appsv1alpha1.ConsoleApplication) {
6666
meta.SetStatusCondition(&operatorCR.Status.Conditions, metav1.Condition{
67-
Type: appsv1alpha1.ConditionApplicationReady.String(),
67+
Type: appsv1alpha1.ConditionReady.String(),
6868
Status: metav1.ConditionTrue,
6969
Reason: appsv1alpha1.ReasonAllResourcesReady.String(),
7070
LastTransitionTime: metav1.NewTime(time.Now()),
@@ -75,7 +75,7 @@ func SetSucceeded(operatorCR *appsv1alpha1.ConsoleApplication) {
7575
Status: metav1.ConditionFalse,
7676
Reason: appsv1alpha1.ReasonReconcileCompleted.String(),
7777
LastTransitionTime: metav1.NewTime(time.Now()),
78-
Message: "Reconciliation completed successfully",
78+
Message: "All requirements are met",
7979
})
8080
}
8181

0 commit comments

Comments
 (0)