diff --git a/resource_customizations/_.cnrm.cloud.google.com/_/health.lua b/resource_customizations/_.cnrm.cloud.google.com/_/health.lua new file mode 100644 index 0000000000..cf5cf2ba23 --- /dev/null +++ b/resource_customizations/_.cnrm.cloud.google.com/_/health.lua @@ -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 \ No newline at end of file diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/health_test.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/health_test.yaml similarity index 84% rename from resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/health_test.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/health_test.yaml index 8354cfb40f..982aae23f0 100644 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/health_test.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/health_test.yaml @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/dependency_not_found.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/dependency_not_found.yaml similarity index 82% rename from resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/dependency_not_found.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/testdata/dependency_not_found.yaml index 7e5c48b1ca..0a5dd6daa2 100644 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/dependency_not_found.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/dependency_not_found.yaml @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/dependency_not_ready.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/dependency_not_ready.yaml similarity index 82% rename from resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/dependency_not_ready.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/testdata/dependency_not_ready.yaml index c8d7cd7eb5..d8ce557da6 100644 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/dependency_not_ready.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/dependency_not_ready.yaml @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/up_to_date.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/generation.yaml similarity index 76% rename from resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/up_to_date.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/testdata/generation.yaml index 851787c15a..5409f2a450 100644 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/up_to_date.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/generation.yaml @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/up_to_date.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/up_to_date.yaml similarity index 82% rename from resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/up_to_date.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/testdata/up_to_date.yaml index 6e3f5dd0d0..5d4179be07 100644 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/up_to_date.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/up_to_date.yaml @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/update_failed.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/update_failed.yaml similarity index 82% rename from resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/update_failed.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/testdata/update_failed.yaml index 58a1ab0360..a80ed207be 100644 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/update_failed.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/update_failed.yaml @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/update_in_progress.yaml b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/update_in_progress.yaml similarity index 82% rename from resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/update_in_progress.yaml rename to resource_customizations/_.cnrm.cloud.google.com/_/testdata/update_in_progress.yaml index 501d5eead6..8ce9d2defd 100644 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/testdata/update_in_progress.yaml +++ b/resource_customizations/_.cnrm.cloud.google.com/_/testdata/update_in_progress.yaml @@ -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 diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/health.lua b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/health_test.yaml b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/dependency_not_found.yaml b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/dependency_not_found.yaml deleted file mode 100644 index 75887c800a..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/dependency_not_ready.yaml b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/dependency_not_ready.yaml deleted file mode 100644 index ef86c23957..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/up_to_date.yaml b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/up_to_date.yaml deleted file mode 100644 index d889f3a3b2..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/update_failed.yaml b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/update_failed.yaml deleted file mode 100644 index 59b953ec43..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/update_in_progress.yaml b/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/update_in_progress.yaml deleted file mode 100644 index 4fa4cd1fe3..0000000000 --- a/resource_customizations/cloudfunctions.cnrm.cloud.google.com/CloudFunctionsFunction/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/health.lua b/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/dependency_not_found.yaml b/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/dependency_not_found.yaml deleted file mode 100644 index 7dd2e9b481..0000000000 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/dependency_not_ready.yaml b/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/dependency_not_ready.yaml deleted file mode 100644 index f66433e85d..0000000000 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/up_to_date.yaml b/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/up_to_date.yaml deleted file mode 100644 index 63803d1640..0000000000 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/update_failed.yaml b/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/update_failed.yaml deleted file mode 100644 index b568387ba6..0000000000 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/update_in_progress.yaml b/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/update_in_progress.yaml deleted file mode 100644 index 3b90692e9e..0000000000 --- a/resource_customizations/cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/health.lua b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/health_test.yaml b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/dependency_not_found.yaml b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/dependency_not_found.yaml deleted file mode 100644 index 0a20522d95..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/dependency_not_ready.yaml b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/dependency_not_ready.yaml deleted file mode 100644 index abc75e5a63..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/up_to_date.yaml b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/up_to_date.yaml deleted file mode 100644 index 42d206c4db..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/update_failed.yaml b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/update_failed.yaml deleted file mode 100644 index e2bb1e6a8a..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/update_in_progress.yaml b/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/update_in_progress.yaml deleted file mode 100644 index 6149df14e0..0000000000 --- a/resource_customizations/compute.cnrm.cloud.google.com/ComputeDisk/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/health.lua b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/health_test.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/dependency_not_found.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/dependency_not_found.yaml deleted file mode 100644 index 556376c4eb..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/dependency_not_ready.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/dependency_not_ready.yaml deleted file mode 100644 index 6667133c5e..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/up_to_date.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/up_to_date.yaml deleted file mode 100644 index 93b5886fc0..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/update_failed.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/update_failed.yaml deleted file mode 100644 index d1de92b777..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/update_in_progress.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/update_in_progress.yaml deleted file mode 100644 index fd8d422ce3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPartialPolicy/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/health.lua b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/health_test.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/dependency_not_found.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/dependency_not_found.yaml deleted file mode 100644 index 439546a56e..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/dependency_not_ready.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/dependency_not_ready.yaml deleted file mode 100644 index 03d48f08aa..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/up_to_date.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/up_to_date.yaml deleted file mode 100644 index 1b1b9468b3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/update_failed.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/update_failed.yaml deleted file mode 100644 index 786f2e5b71..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/update_in_progress.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/update_in_progress.yaml deleted file mode 100644 index d21839325a..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicy/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/health.lua b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/health_test.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/dependency_not_found.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/dependency_not_found.yaml deleted file mode 100644 index f822d7e0f1..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/dependency_not_ready.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/dependency_not_ready.yaml deleted file mode 100644 index e5e3e6a872..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/up_to_date.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/up_to_date.yaml deleted file mode 100644 index 35575a10d3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/update_failed.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/update_failed.yaml deleted file mode 100644 index 8c89620c7d..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/update_in_progress.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/update_in_progress.yaml deleted file mode 100644 index 8d7208eb0a..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMPolicyMember/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/health.lua b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/health_test.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/dependency_not_found.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/dependency_not_found.yaml deleted file mode 100644 index f05d74ce5a..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/dependency_not_ready.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/dependency_not_ready.yaml deleted file mode 100644 index 0e7962ff04..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/up_to_date.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/up_to_date.yaml deleted file mode 100644 index 612423270f..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/update_failed.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/update_failed.yaml deleted file mode 100644 index f6c6e05396..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/update_in_progress.yaml b/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/update_in_progress.yaml deleted file mode 100644 index f313ba6d9a..0000000000 --- a/resource_customizations/iam.cnrm.cloud.google.com/IAMServiceAccount/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/health.lua b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/health_test.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/dependency_not_found.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/dependency_not_found.yaml deleted file mode 100644 index 380766dca9..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/dependency_not_ready.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/dependency_not_ready.yaml deleted file mode 100644 index eda7ae0aa4..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/up_to_date.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/up_to_date.yaml deleted file mode 100644 index f108481b24..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/update_failed.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/update_failed.yaml deleted file mode 100644 index d9494207e5..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/update_failed.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/update_in_progress.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/update_in_progress.yaml deleted file mode 100644 index 6e25db0822..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubSubscription/testdata/update_in_progress.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/health.lua b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/health_test.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/dependency_not_found.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/dependency_not_found.yaml deleted file mode 100644 index 0c0c72b907..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/dependency_not_ready.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/dependency_not_ready.yaml deleted file mode 100644 index 4756b9f85c..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/up_to_date.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/up_to_date.yaml deleted file mode 100644 index 38e9479aee..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/update_failed.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/update_failed.yaml deleted file mode 100644 index b528af9809..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/update_failed.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/update_in_progress.yaml b/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/update_in_progress.yaml deleted file mode 100644 index fab67f53dd..0000000000 --- a/resource_customizations/pubsub.cnrm.cloud.google.com/PubSubTopic/testdata/update_in_progress.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/health.lua b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/health_test.yaml b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/dependency_not_found.yaml b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/dependency_not_found.yaml deleted file mode 100644 index df457a1a09..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/dependency_not_ready.yaml b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/dependency_not_ready.yaml deleted file mode 100644 index 5988921c66..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/up_to_date.yaml b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/up_to_date.yaml deleted file mode 100644 index 6f122aae80..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/update_failed.yaml b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/update_failed.yaml deleted file mode 100644 index 6ea7bc884a..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/update_failed.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/update_in_progress.yaml b/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/update_in_progress.yaml deleted file mode 100644 index 0a6939816b..0000000000 --- a/resource_customizations/resourcemanager.cnrm.cloud.google.com/Project/testdata/update_in_progress.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/health.lua b/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/health_test.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/dependency_not_found.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/dependency_not_found.yaml deleted file mode 100644 index 473c408613..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/dependency_not_ready.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/dependency_not_ready.yaml deleted file mode 100644 index 7b232b8e28..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/update_failed.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/update_failed.yaml deleted file mode 100644 index 094adba81c..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/update_failed.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/update_in_progress.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/update_in_progress.yaml deleted file mode 100644 index aa9c1b8fbe..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLDatabase/testdata/update_in_progress.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/health.lua b/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/health_test.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLInstance/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/health_test.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/dependency_not_found.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/dependency_not_found.yaml deleted file mode 100644 index eaceeca536..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/dependency_not_ready.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/dependency_not_ready.yaml deleted file mode 100644 index 4eb6724fb1..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/up_to_date.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/up_to_date.yaml deleted file mode 100644 index 96bfc044a5..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/update_failed.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/update_failed.yaml deleted file mode 100644 index b80f8c69f5..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/update_failed.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/update_in_progress.yaml b/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/update_in_progress.yaml deleted file mode 100644 index ffa6af0946..0000000000 --- a/resource_customizations/sql.cnrm.cloud.google.com/SQLUser/testdata/update_in_progress.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/health.lua b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/health_test.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/dependency_not_found.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/dependency_not_found.yaml deleted file mode 100644 index a0e2c1f6af..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/dependency_not_found.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/dependency_not_ready.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/dependency_not_ready.yaml deleted file mode 100644 index c478ae0264..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/dependency_not_ready.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/up_to_date.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/up_to_date.yaml deleted file mode 100644 index 514048ef73..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/up_to_date.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/update_failed.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/update_failed.yaml deleted file mode 100644 index 36623899d7..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/update_failed.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/update_in_progress.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/update_in_progress.yaml deleted file mode 100644 index 58f68bbc74..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucket/testdata/update_in_progress.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/health.lua b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/health_test.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/dependency_not_found.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/dependency_not_found.yaml deleted file mode 100644 index 52404cae27..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/dependency_not_found.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageBucketAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Dependency not found - reason: DependencyNotFound - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/dependency_not_ready.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/dependency_not_ready.yaml deleted file mode 100644 index c09480134c..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/dependency_not_ready.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageBucketAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Dependency not ready - reason: DependencyNotReady - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/up_to_date.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/up_to_date.yaml deleted file mode 100644 index b7f45aaa85..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/up_to_date.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageBucketAccessControl -status: - conditions: - - lastTransitionTime: '2022-05-09T08:49:18Z' - message: The resource is up to date - reason: UpToDate - status: 'True' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/update_failed.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/update_failed.yaml deleted file mode 100644 index 190b92ce47..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/update_failed.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageBucketAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Update failed - reason: UpdateFailed - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/update_in_progress.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/update_in_progress.yaml deleted file mode 100644 index 36a7692e38..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageBucketAccessControl/testdata/update_in_progress.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageBucketAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Update in progress - reason: Updating - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/health.lua b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/health.lua deleted file mode 100644 index 585b5e27a3..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/health.lua +++ /dev/null @@ -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 \ No newline at end of file diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/health_test.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/health_test.yaml deleted file mode 100644 index 8354cfb40f..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/health_test.yaml +++ /dev/null @@ -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 diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/dependency_not_found.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/dependency_not_found.yaml deleted file mode 100644 index 283d13d936..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/dependency_not_found.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageDefaultObjectAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Dependency not found - reason: DependencyNotFound - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/dependency_not_ready.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/dependency_not_ready.yaml deleted file mode 100644 index 224c2fc556..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/dependency_not_ready.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageDefaultObjectAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Dependency not ready - reason: DependencyNotReady - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/up_to_date.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/up_to_date.yaml deleted file mode 100644 index 1f1f9986fc..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/up_to_date.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageDefaultObjectAccessControl -status: - conditions: - - lastTransitionTime: '2022-05-09T08:49:18Z' - message: The resource is up to date - reason: UpToDate - status: 'True' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/update_failed.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/update_failed.yaml deleted file mode 100644 index 493253f676..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/update_failed.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageDefaultObjectAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Update failed - reason: UpdateFailed - status: 'False' - type: Ready diff --git a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/update_in_progress.yaml b/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/update_in_progress.yaml deleted file mode 100644 index f001e9c715..0000000000 --- a/resource_customizations/storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl/testdata/update_in_progress.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: storage.cnrm.cloud.google.com/v1beta1 -kind: StorageDefaultObjectAccessControl -status: - conditions: - - lastTransitionTime: '2022-07-01T12:56:21Z' - message: Update in progress - reason: Updating - status: 'False' - type: Ready diff --git a/util/lua/lua_test.go b/util/lua/lua_test.go index dd6638007d..a64dca4b84 100644 --- a/util/lua/lua_test.go +++ b/util/lua/lua_test.go @@ -1075,5 +1075,5 @@ func Test_getHealthScriptPaths(t *testing.T) { // This test will fail any time a glob pattern is added to the health script paths. We don't expect that to happen // often. - assert.Equal(t, []string{"_.crossplane.io/_", "_.upbound.io/_"}, paths) + assert.Equal(t, []string{"_.cnrm.cloud.google.com/_", "_.crossplane.io/_", "_.upbound.io/_"}, paths) }