@@ -70,13 +70,13 @@ data:
70
70
"ProviderConfigUsage"
71
71
}
72
72
73
- if obj.status == nil and contains(has_no_status, obj.kind) then
73
+ if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then
74
74
health_status.status = "Healthy"
75
75
health_status.message = "Resource is up-to-date."
76
76
return health_status
77
77
end
78
78
79
- if obj.status == nil or obj.status.conditions == nil then
79
+ if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then
80
80
if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
81
81
health_status.status = "Healthy"
82
82
health_status.message = "Resource is in use."
@@ -137,18 +137,18 @@ data:
137
137
"ProviderConfig",
138
138
"ProviderConfigUsage"
139
139
}
140
- if obj.status == nil and contains(has_no_status, obj.kind) then
140
+ if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then
141
141
health_status.status = "Healthy"
142
142
health_status.message = "Resource is up-to-date."
143
143
return health_status
144
144
end
145
145
146
- if obj.status == nil or obj.status.conditions == nil then
147
- if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
148
- health_status.status = "Healthy"
149
- health_status.message = "Resource is in use."
150
- return health_status
151
- end
146
+ if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then
147
+ if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
148
+ health_status.status = "Healthy"
149
+ health_status.message = "Resource is in use."
150
+ return health_status
151
+ end
152
152
return health_status
153
153
end
154
154
0 commit comments