@@ -63,79 +63,6 @@ clusterGroup:
6363 hs.message = "Waiting for PVC"
6464 return hs
6565
66- # Drop once upstream argo cd handles the stopped field correctly
67- # As of 20251001 there is not a pr/issue in argo yet
68- - kind : InferenceService
69- group : serving.kserve.io
70- check : |
71- local health_status = {}
72-
73- health_status.status = "Progressing"
74- health_status.message = "Waiting for InferenceService to report status..."
75-
76- if obj.status ~= nil then
77-
78- local progressing = false
79- local degraded = false
80- local status_false = 0
81- local status_unknown = 0
82- local msg = ""
83-
84- if obj.status.modelStatus ~= nil then
85- if obj.status.modelStatus.transitionStatus ~= "UpToDate" then
86- if obj.status.modelStatus.transitionStatus == "InProgress" then
87- progressing = true
88- else
89- degraded = true
90- end
91- msg = msg .. "0: transitionStatus | " .. obj.status.modelStatus.transitionStatus
92- end
93- end
94-
95- if obj.status.conditions ~= nil then
96- for i, condition in pairs(obj.status.conditions) do
97-
98- -- A condition is healthy if its status is True.
99- -- However, for the 'Stopped' condition, a 'False' status is the healthy state.
100- local is_healthy_condition = (condition.status == "True")
101- if condition.type == "Stopped" then
102- is_healthy_condition = (condition.status == "False")
103- end
104-
105- if not is_healthy_condition then
106- -- This condition represents a problem, so update counters and the message.
107- if condition.status == "Unknown" then
108- status_unknown = status_unknown + 1
109- else
110- status_false = status_false + 1
111- end
112-
113- msg = msg .. " | " .. i .. ": " .. condition.type .. " | " .. condition.status
114- if condition.reason ~= nil and condition.reason ~= "" then
115- msg = msg .. " | " .. condition.reason
116- end
117- if condition.message ~= nil and condition.message ~= "" then
118- msg = msg .. " | " .. condition.message
119- end
120- end
121-
122- end
123-
124- if progressing == false and degraded == false and status_unknown == 0 and status_false == 0 then
125- health_status.status = "Healthy"
126- msg = "InferenceService is healthy."
127- elseif degraded == false and status_unknown >= 0 then
128- health_status.status = "Progressing"
129- else
130- health_status.status = "Degraded"
131- end
132-
133- health_status.message = msg
134- end
135- end
136-
137- return health_status
138-
13966 resourceActions : []
14067 resourceExclusions : |
14168 - apiGroups:
0 commit comments