flink-kubernetes-operator icon indicating copy to clipboard operation
flink-kubernetes-operator copied to clipboard

[FLINK-33634] Add Conditions to Flink CRD's Status field

Open lajith2006 opened this issue 1 year ago • 14 comments

What is the purpose of the change

This PR is for issue https://issues.apache.org/jira/browse/FLINK-33634 to add Conditions field in the CR status of Flink Deployment and FlinkSessionJob.

Brief change log

  • Created a new class CommonCRStatus to build different Conditions with type and status. This reusable class can be used to build CR condition of type Ready or Error conditions based on jobmanager status and job status.
  • FlinkDeploymentStatus is updated to add list of Condition
  • FlinkDeploymentController is updated to add Conditions to FlinkDeploymentStatus based on JobManagerDeploymentStatus. Following JobManagerDeploymentStatus are considerd to add conditions status to CR. READY DEPLOYED_NOT_READY DEPLOYING ERROR
  • FlinkSessionJobStatus is updated to add list of Condition
  • FlinkSessionJobController is updated to add Conditions to FlinkSessionJobStatus based on JobStatus. Following JobStatus are considered to add conditions status to CR RUNNING CREATED CANCELED FAILED
  • FlinkDeploymentControllerTest and FlinkSessionJobControllerTest are modified to test the Status update with conditions.

Verifying this change

This change is already covered by existing tests, such as FlinkDeploymentControllerTest and FlinkSessionJobControllerTest

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no) no
  • The public API, i.e., is any changes to the CustomResourceDescriptors: (yes / no) yes
  • Core observer or reconciler logic that is regularly executed: (yes / no) yes

Documentation

  • Does this pull request introduce a new feature? (yes / no) yes
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) docs

lajith2006 avatar Jan 05 '24 05:01 lajith2006