Skip to content

Commit

Permalink
fix: knative health reporting argoproj#6130 (argoproj#6131)
Browse files Browse the repository at this point in the history
* add ready = false health check

add additional tests

Signed-off-by: Trevor Royer <[email protected]>

* Fix health checks for knative resources

Signed-off-by: Trevor Royer <[email protected]>

* fix tests

Signed-off-by: Trevor Royer <[email protected]>
  • Loading branch information
strangiato authored May 1, 2021
1 parent 5981bd1 commit b4507d8
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if obj.status ~= nil then
numTrue = numTrue + 1
elseif condition.type == "InstallSucceeded" and condition.status == "True" then
numTrue = numTrue + 1
elseif condition.type == "Ready" and condition.status == "False" then
numFalse = numFalse + 1
elseif condition.status == "Unknown" then
numFalse = numFalse + 1
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ tests:
status: Progressing
message: "1: InstallSucceeded | True\n2: Ready | Unknown\n"
inputPath: testdata/progressing.yaml
- healthStatus:
status: Progressing
message: "1: InstallSucceeded | True\n2: Ready | False\n"
inputPath: testdata/progressing_ready_false.yaml
- healthStatus:
status: Degraded
message: "1: InstallSucceeded | True\n2: Ready | randomstatus\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeEventing
metadata:
finalizers:
- delete-knative-eventing-manifest
generation: 3
labels:
app: knative-eventing
argocd.argoproj.io/instance: knative-eventing
version: 0.14.1
name: knative-eventing
namespace: knative-eventing
resourceVersion: "31707154"
selfLink: /apis/operator.knative.dev/v1alpha1/namespaces/knative-eventing/knativeeventings/knative-eventing
uid: bbcb2872-4304-4541-9811-7ce5125ceadf
spec: {}
status:
conditions:
- lastTransitionTime: "2020-04-29T04:52:05Z"
status: "True"
type: InstallSucceeded
- lastTransitionTime: "2020-06-08T10:53:44Z"
status: "False"
type: Ready
version: 0.14.1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if obj.status ~= nil then
numTrue = numTrue + 1
elseif condition.type == "DeploymentsAvailable" and condition.status == "True" then
numTrue = numTrue + 1
elseif condition.type == "Ready" and condition.status == "False" then
numFalse = numFalse + 1
elseif condition.type == "DeploymentsAvailable" and condition.status == "False" then
numFalse = numFalse + 1
elseif condition.status == "Unknown" then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ tests:
status: Progressing
message: "1: DependenciesInstalled | True\n2: DeploymentsAvailable | True\n3: InstallSucceeded | True\n4: Ready | Unknown\n"
inputPath: testdata/progressing.yaml
- healthStatus:
status: Progressing
message: "1: DependenciesInstalled | True\n2: DeploymentsAvailable | True\n3: InstallSucceeded | True\n4: Ready | False\n"
inputPath: testdata/progressing_ready_false.yaml
- healthStatus:
status: Degraded
message: "1: DependenciesInstalled | True\n2: DeploymentsAvailable | True\n3: InstallSucceeded | True\n4: Ready | randomstatus\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
finalizers:
- knativeservings.operator.knative.dev
- delete-knative-serving-manifest
generation: 2
labels:
app: knative-serving
argocd.argoproj.io/instance: knative-serving
version: 0.14.1
name: knative-serving
namespace: knative-serving
resourceVersion: "31845507"
selfLink: /apis/operator.knative.dev/v1alpha1/namespaces/knative-serving/knativeservings/knative-serving
uid: ccbe43aa-ad72-4c2b-a5bb-21b3815d8a9b
spec: {}
status:
conditions:
- lastTransitionTime: "2020-05-18T18:21:29Z"
status: "True"
type: DependenciesInstalled
- lastTransitionTime: "2020-06-08T15:28:11Z"
status: "True"
type: DeploymentsAvailable
- lastTransitionTime: "2020-05-18T18:21:29Z"
status: "True"
type: InstallSucceeded
- lastTransitionTime: "2020-06-08T15:28:11Z"
status: "False"
type: Ready
version: 0.14.0

0 comments on commit b4507d8

Please sign in to comment.