From 978fe1684e9f2907c8e1f7700243cc017f12f91d Mon Sep 17 00:00:00 2001 From: Thomas Decaux Date: Sat, 27 May 2023 21:14:01 -0400 Subject: [PATCH] fix: health-checks for Elasticsearch (#13322) * fix: health-checks for Elasticsearch Signed-off-by: Thomas Decaux Signed-off-by: ebuildy * fix tests Signed-off-by: ebuildy --------- Signed-off-by: Thomas Decaux Signed-off-by: ebuildy --- .../elasticsearch.k8s.elastic.co/Elasticsearch/health.lua | 2 +- .../elasticsearch.k8s.elastic.co/Elasticsearch/health_test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health.lua b/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health.lua index 3bac570b0c4d7e..2670862b41602d 100644 --- a/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health.lua +++ b/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health.lua @@ -17,7 +17,7 @@ if obj.status ~= nil then hs.message = "Elasticsearch Cluster status is Green" return hs elseif obj.status.health == "yellow" then - hs.status = "Degraded" + hs.status = "Progressing" hs.message = "Elasticsearch Cluster status is Yellow. Check the status of indices, replicas and shards" return hs elseif obj.status.health == "red" then diff --git a/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health_test.yaml b/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health_test.yaml index 0a0ef51d16f6c0..015bc145d8ff88 100644 --- a/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health_test.yaml +++ b/resource_customizations/elasticsearch.k8s.elastic.co/Elasticsearch/health_test.yaml @@ -4,7 +4,7 @@ tests: message: "Elasticsearch Cluster status is Green" inputPath: testdata/ready_green.yaml - healthStatus: - status: Degraded + status: Progressing message: "Elasticsearch Cluster status is Yellow. Check the status of indices, replicas and shards" inputPath: testdata/ready_yellow.yaml - healthStatus: