fix(#12862): Update FlinkDeployment health check to support Flink v1.x (#15065)

Signed-off-by: Dylan Slavin <dylan@sla.vin>
This commit is contained in:
Dylan Slavin 2023-08-17 12:09:09 -05:00 committed by GitHub
parent c6e9893f0c
commit 15254afdd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 3 deletions

View file

@ -1,7 +1,7 @@
health_status = {}
if obj.status ~= nil and obj.status.reconciliationStatus ~= nil then
if obj.status.reconciliationStatus.success then
if obj.status.reconciliationStatus.success or obj.status.reconciliationStatus.state == "DEPLOYED" then
health_status.status = "Healthy"
return health_status
end

View file

@ -1,10 +1,16 @@
tests:
- healthStatus:
status: Healthy
inputPath: testdata/healthy_running.yaml
inputPath: testdata/healthy_running_v0.1.x.yaml
- healthStatus:
status: Healthy
inputPath: testdata/healthy_suspended.yaml
inputPath: testdata/healthy_running_v1.x.yaml
- healthStatus:
status: Healthy
inputPath: testdata/healthy_suspended_v0.1.x.yaml
- healthStatus:
status: Healthy
inputPath: testdata/healthy_suspended_v1.x.yaml
- healthStatus:
status: Progressing
message: Waiting for deploying

View file

@ -0,0 +1,11 @@
apiVersion: flink.apache.org/v1alpha1
kind: FlinkDeployment
spec:
job:
state: running
status:
jobManagerDeploymentStatus: READY
jobStatus:
state: RUNNING
reconciliationStatus:
state: DEPLOYED

View file

@ -0,0 +1,11 @@
apiVersion: flink.apache.org/v1alpha1
kind: FlinkDeployment
spec:
job:
state: suspended
status:
jobManagerDeploymentStatus: MISSING
jobStatus:
state: SUSPENDED
reconciliationStatus:
state: DEPLOYED