fix: GCP config connector healthchecks do not make use of existing observedGeneration #24458 (#24459)

Signed-off-by: danko <adamd@elementor.com>
Signed-off-by: Hapshanko <adamgaming391100@gmail.com>
Signed-off-by: Grégoire Salamin <gregoire.salamin@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Navaneethan <59121948+FalseDev@users.noreply.github.com>
Signed-off-by: Fox Danger Piacenti <fox@opencraft.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: CI <ci@argoproj.com>
Signed-off-by: Pavel Aborilov <aborilov@gmail.com>
Signed-off-by: Adam Danko <112761282+Hapshanko@users.noreply.github.com>
Co-authored-by: danko <adamd@elementor.com>
Co-authored-by: gsalamin <31199936+gsalamin@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Navaneethan <59121948+FalseDev@users.noreply.github.com>
Co-authored-by: Fox Piacenti <fox@vulpinity.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: Pavel <aborilov@gmail.com>
This commit is contained in:
Adam Danko 2025-10-06 16:37:17 +03:00 committed by GitHub
parent 5efb184c79
commit 30abebda3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
113 changed files with 67 additions and 1568 deletions

View file

@ -0,0 +1,43 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
-- Progressing health while the resource status is stale, skip if observedGeneration is not set
if obj.status.observedGeneration == nil or obj.status.observedGeneration == obj.metadata.generation then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
end
return hs

View file

@ -19,3 +19,7 @@ tests:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml
- healthStatus:
status: Progressing
message: 'Update in progress'
inputPath: testdata/generation.yaml

View file

@ -1,6 +1,9 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLInstance
metadata:
generation: 1
status:
observedGeneration: 1
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found

View file

@ -1,6 +1,9 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLInstance
metadata:
generation: 1
status:
observedGeneration: 1
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready

View file

@ -1,6 +1,9 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLDatabase
kind: SQLInstance
metadata:
generation: 2
status:
observedGeneration: 1
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date

View file

@ -1,6 +1,9 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLInstance
metadata:
generation: 1
status:
observedGeneration: 1
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date

View file

@ -1,6 +1,9 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLInstance
metadata:
generation: 1
status:
observedGeneration: 1
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed

View file

@ -1,6 +1,9 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLInstance
metadata:
generation: 1
status:
observedGeneration: 1
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: cloudfunctions.cnrm.cloud.google.com/v1beta1
kind: CloudFunctionsFunction
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudfunctions.cnrm.cloud.google.com/v1beta1
kind: CloudFunctionsFunction
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudfunctions.cnrm.cloud.google.com/v1beta1
kind: CloudFunctionsFunction
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudfunctions.cnrm.cloud.google.com/v1beta1
kind: CloudFunctionsFunction
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudfunctions.cnrm.cloud.google.com/v1beta1
kind: CloudFunctionsFunction
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,9 +0,0 @@
apiVersion: cloudscheduler.cnrm.cloud.google.com/v1beta1
kind: CloudSchedulerJob
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudscheduler.cnrm.cloud.google.com/v1beta1
kind: CloudSchedulerJob
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudscheduler.cnrm.cloud.google.com/v1beta1
kind: CloudSchedulerJob
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudscheduler.cnrm.cloud.google.com/v1beta1
kind: CloudSchedulerJob
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: cloudscheduler.cnrm.cloud.google.com/v1beta1
kind: CloudSchedulerJob
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPartialPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicy
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicy
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubSubscription
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLDatabase
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLDatabase
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLDatabase
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLDatabase
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLUser
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLUser
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLUser
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLUser
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLUser
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

View file

@ -1,9 +0,0 @@
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not found
reason: DependencyNotFound
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Dependency not ready
reason: DependencyNotReady
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
status:
conditions:
- lastTransitionTime: '2022-05-09T08:49:18Z'
message: The resource is up to date
reason: UpToDate
status: 'True'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update failed
reason: UpdateFailed
status: 'False'
type: Ready

View file

@ -1,9 +0,0 @@
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
status:
conditions:
- lastTransitionTime: '2022-07-01T12:56:21Z'
message: Update in progress
reason: Updating
status: 'False'
type: Ready

View file

@ -1,39 +0,0 @@
local hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
-- Up To Date
if condition.reason == "UpToDate" and condition.status == "True" then
hs.status = "Healthy"
hs.message = condition.message
return hs
end
-- Update Failed
if condition.reason == "UpdateFailed" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Found
if condition.reason == "DependencyNotFound" then
hs.status = "Degraded"
hs.message = condition.message
return hs
end
-- Dependency Not Ready
if condition.reason == "DependencyNotReady" then
hs.status = "Suspended"
hs.message = condition.message
return hs
end
end
end
end
return hs

View file

@ -1,21 +0,0 @@
tests:
- healthStatus:
status: Degraded
message: "Dependency not found"
inputPath: testdata/dependency_not_found.yaml
- healthStatus:
status: Suspended
message: "Dependency not ready"
inputPath: testdata/dependency_not_ready.yaml
- healthStatus:
status: Healthy
message: "The resource is up to date"
inputPath: testdata/up_to_date.yaml
- healthStatus:
status: Degraded
message: "Update failed"
inputPath: testdata/update_failed.yaml
- healthStatus:
status: Progressing
message: "Update in progress"
inputPath: testdata/update_in_progress.yaml

Some files were not shown because too many files have changed in this diff Show more