mirror of https://github.com/crossplane/docs.git
fix: Objects with .status: {} should return Healthy (#746)
Signed-off-by: Richard Johansson <richard.jimmy.johansson@gmail.com>
This commit is contained in:
parent
486ea9dbde
commit
c34707678e
|
@ -70,13 +70,13 @@ data:
|
||||||
"ProviderConfigUsage"
|
"ProviderConfigUsage"
|
||||||
}
|
}
|
||||||
|
|
||||||
if obj.status == nil and contains(has_no_status, obj.kind) then
|
if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is up-to-date."
|
health_status.message = "Resource is up-to-date."
|
||||||
return health_status
|
return health_status
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj.status == nil or obj.status.conditions == nil then
|
if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then
|
||||||
if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
|
if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is in use."
|
health_status.message = "Resource is in use."
|
||||||
|
@ -137,13 +137,13 @@ data:
|
||||||
"ProviderConfig",
|
"ProviderConfig",
|
||||||
"ProviderConfigUsage"
|
"ProviderConfigUsage"
|
||||||
}
|
}
|
||||||
if obj.status == nil and contains(has_no_status, obj.kind) then
|
if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is up-to-date."
|
health_status.message = "Resource is up-to-date."
|
||||||
return health_status
|
return health_status
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj.status == nil or obj.status.conditions == nil then
|
if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then
|
||||||
if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
|
if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
|
||||||
health_status.status = "Healthy"
|
health_status.status = "Healthy"
|
||||||
health_status.message = "Resource is in use."
|
health_status.message = "Resource is in use."
|
||||||
|
|
Loading…
Reference in New Issue