You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if condition.type=="InstallPlanPending"and condition.status=="True" then
173
+
numPending = numPending + 1
174
+
elseif (condition.type=="InstallPlanMissing"and condition.reason ~="ReferencedInstallPlanNotFound") then
175
+
numDegraded = numDegraded + 1
176
+
elseif (condition.type=="CatalogSourcesUnhealthy"or condition.type=="InstallPlanFailed"or condition.type=="ResolutionFailed") and condition.status=="True" then
177
+
numDegraded = numDegraded + 1
178
+
end
179
+
end
180
+
end
181
+
182
+
-- Available states: undef/nil, UpgradeAvailable, UpgradePending, UpgradeFailed, AtLatestKnown
elseif (condition.type=="InstallPlanMissing"and condition.reason ~="ReferencedInstallPlanNotFound") then
174
-
numDegraded = numDegraded + 1
175
-
elseif (condition.type=="CatalogSourcesUnhealthy"or condition.type=="InstallPlanFailed"or condition.type=="ResolutionFailed") and condition.status=="True" then
186
+
msg = msg ..".status.state not yet known\n"
187
+
elseif obj.status.state==""or obj.status.state=="UpgradeAvailable" then
188
+
numPending = numPending + 1
189
+
msg = msg ..".status.state is '".. obj.status.state.."'\n"
190
+
elseif obj.status.state=="UpgradePending" then
191
+
-- UpgradePending with manual approval is expected behavior, treat as healthy
192
+
if isManualApprovalPending then
193
+
msg = msg ..".status.state is 'AtLatestKnown'\n"
194
+
else
195
+
numPending = numPending + 1
196
+
msg = msg ..".status.state is '".. obj.status.state.."'\n"
197
+
end
198
+
elseif obj.status.state=="UpgradeFailed" then
176
199
numDegraded = numDegraded + 1
200
+
msg = msg ..".status.state is '".. obj.status.state.."'\n"
201
+
else
202
+
-- Last possiblity of .status.state: AtLatestKnown
203
+
msg = msg ..".status.state is '".. obj.status.state.."'\n"
177
204
end
178
-
end
179
-
end
180
205
181
-
-- Available states: undef/nil, UpgradeAvailable, UpgradePending, UpgradeFailed, AtLatestKnown
0 commit comments