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"
|
||||
}
|
||||
|
||||
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.message = "Resource is up-to-date."
|
||||
return health_status
|
||||
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
|
||||
health_status.status = "Healthy"
|
||||
health_status.message = "Resource is in use."
|
||||
|
@ -137,18 +137,18 @@ data:
|
|||
"ProviderConfig",
|
||||
"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.message = "Resource is up-to-date."
|
||||
return health_status
|
||||
end
|
||||
|
||||
if obj.status == nil or obj.status.conditions == nil then
|
||||
if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
|
||||
health_status.status = "Healthy"
|
||||
health_status.message = "Resource is in use."
|
||||
return health_status
|
||||
end
|
||||
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
|
||||
health_status.status = "Healthy"
|
||||
health_status.message = "Resource is in use."
|
||||
return health_status
|
||||
end
|
||||
return health_status
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue