davidradl commented on code in PR #957:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/957#discussion_r2007887703


##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/status/FlinkDeploymentStatus.java:
##########
@@ -55,4 +60,175 @@ public class FlinkDeploymentStatus extends 
CommonStatus<FlinkDeploymentSpec> {
 
     /** Information about the TaskManagers for the scale subresource. */
     private TaskManagerInfo taskManager;
+
+    /** Condition of the CR . */
+    private List<Condition> conditions = new ArrayList<>();
+
+    private String phase;
+
+    public List<Condition> getConditions() {
+        if (reconciliationStatus != null
+                && reconciliationStatus.deserializeLastReconciledSpec() != null
+                && 
reconciliationStatus.deserializeLastReconciledSpec().getJob() == null) {
+            switch (jobManagerDeploymentStatus) {

Review Comment:
   can we have a datastructure, keyed off the jobManagerDeploymentStatus, that 
we interrogate to get the inserts for the updateConditions. Maybe a map with 
the key of the status and the value of an object RunningCondition, that has 2 
fields the boolean and the description. Something like :
   
   ```
   
   Map<JobManagerDeploymentStatus,String> jobmanagerDeploymentStatusMap = new 
HashMap<String,String>() {{
       put(READY, new RunningCondition(true, "JobManager is running and ready 
to receive REST API calls")),
       ....
   }}; 
   ```
   
   then the code just loops through the map updating conditions using the map 
values. Similar for jobstatus



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to