Dennis-Mircea Ciupitu created FLINK-41309:
---------------------------------------------

             Summary: Expose the JobManager deployment status and the resource 
age as kubectl printer columns
                 Key: FLINK-41309
                 URL: https://issues.apache.org/jira/browse/FLINK-41309
             Project: Flink
          Issue Type: Improvement
          Components: Kubernetes Operator
            Reporter: Dennis-Mircea Ciupitu


h1. Summary

{{kubectl get flinkdeployment}} prints two status columns, {{JOB STATUS}} and 
{{{}LIFECYCLE STATE{}}}. That is not enough to read where a deployment stands:
 * The JobManager deployment statusĀ is not shown, although it is the layer 
below the job. For a session cluster, which has no job, the default view 
currently shows nothing at all.
 * There is no {{AGE}} column. Kubernetes prints its default {{NAME}} / {{AGE}} 
pair only for a CRD without printer columns.

h1. Motivation

The status of a Flink resource is read on three layers, one field each: 
{{jobManagerDeploymentStatus}} for Kubernetes and the REST endpoint, 
{{jobStatus.state}} for the Flink job, {{lifecycleState}} for the operator's 
own view.

Concrete cases where the missing column matters:
 * A JobManager that is reachable on its port but does not answer REST calls is 
reported as {{jobStatus.state=RECONCILING}} with {{{}lifecycleState=STABLE{}}}, 
which reads like a normal start. The {{DEPLOYED_NOT_READY}} JobManager status 
is the only field that tells the two apart at a glance.
 * A session cluster's {{READY}} / {{DEPLOYING}} / {{ERROR}} state is invisible 
in the list view today.
 * "How long has it been like this" has no answer without {{{}-o yaml{}}}, 
because the age is not printed.

h1. Proposal

Default columns, for {{{}FlinkDeployment{}}}:
{code:java}
NAME                                    AGE     JOBMANAGER STATUS   JOB STATUS  
 LIFECYCLE STATE
basic-example                           52s     READY               RUNNING     
 STABLE
basic-session-deployment-only-example   2m59s   READY                           
 STABLE{code}
Wide output ({{{}-o wide{}}}) adds the reconciliation status, which the 
documentation already presents next to the other three but which is derivable 
from the lifecycle state, so it stays out of the default view:
{code:java}
NAME                                    AGE     JOBMANAGER STATUS   JOB STATUS  
 LIFECYCLE STATE   RECONCILIATION STATUS
basic-example                           27s     READY               RUNNING     
 STABLE            DEPLOYED
basic-session-deployment-only-example   2m34s   READY                           
 STABLE            DEPLOYED
{code}
{{FlinkSessionJob}} shares the status class, so it gets {{AGE}} and the wide 
{{RECONCILIATION STATUS}} column as well; it has no JobManager of its own and 
keeps {{JOB STATUS}} and {{LIFECYCLE STATE}} in the default view.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to