From 588acdbf8c1e72902135bc4dcb4e02cc02df3fe0 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 4 Feb 2019 08:10:54 -0600 Subject: [PATCH] Elastic Curator: Add basic action overrides for deployment jobs This adds configuration overrides for a very basic Curator action that should effectively be a no-op. This is to address periodic failures seen in the osh-infra-aio-logging job that appear when the run times coincide with Elastic Curator's cron schedule (every six hours). This ensures curator actions are defined in cases where this occurs Change-Id: Ia2255ada2f32f21888bd4ca96df88496720fd0a5 --- .../deployment/multinode/120-elasticsearch.sh | 23 +++++++++++++++++ .../network-policy/120-elasticsearch.sh | 25 +++++++++++++++++++ .../osh-infra-logging/050-elasticsearch.sh | 23 +++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/tools/deployment/multinode/120-elasticsearch.sh b/tools/deployment/multinode/120-elasticsearch.sh index a0ae6d18a..363bc59dd 100755 --- a/tools/deployment/multinode/120-elasticsearch.sh +++ b/tools/deployment/multinode/120-elasticsearch.sh @@ -31,6 +31,29 @@ conf: java_opts: "-Xms512m -Xmx512m" snapshots: enabled: true + curator: + schedule: "0 */6 * * *" + action_file: + actions: + 1: + action: delete_indices + description: >- + "Delete indices older than 365 days" + options: + timeout_override: + continue_if_exception: False + ignore_empty_list: True + disable_action: True + filters: + - filtertype: pattern + kind: prefix + value: logstash- + - filtertype: age + source: name + direction: older + timestring: '%Y.%m.%d' + unit: days + unit_count: 365 monitoring: prometheus: enabled: true diff --git a/tools/deployment/network-policy/120-elasticsearch.sh b/tools/deployment/network-policy/120-elasticsearch.sh index 02a408a04..0f2aa2a28 100755 --- a/tools/deployment/network-policy/120-elasticsearch.sh +++ b/tools/deployment/network-policy/120-elasticsearch.sh @@ -28,6 +28,31 @@ pod: replicas: data: 1 master: 2 +conf: + elasticsearch: + curator: + schedule: "0 */6 * * *" + action_file: + actions: + 1: + action: delete_indices + description: >- + "Delete indices older than 365 days" + options: + timeout_override: + continue_if_exception: False + ignore_empty_list: True + disable_action: True + filters: + - filtertype: pattern + kind: prefix + value: logstash- + - filtertype: age + source: name + direction: older + timestring: '%Y.%m.%d' + unit: days + unit_count: 365 manifests: network_policy: true network_policy: diff --git a/tools/deployment/osh-infra-logging/050-elasticsearch.sh b/tools/deployment/osh-infra-logging/050-elasticsearch.sh index 3130e8895..8e3401976 100755 --- a/tools/deployment/osh-infra-logging/050-elasticsearch.sh +++ b/tools/deployment/osh-infra-logging/050-elasticsearch.sh @@ -32,6 +32,29 @@ conf: elasticsearch: snapshots: enabled: true + curator: + schedule: "0 */6 * * *" + action_file: + actions: + 1: + action: delete_indices + description: >- + "Delete indices older than 365 days" + options: + timeout_override: + continue_if_exception: False + ignore_empty_list: True + disable_action: True + filters: + - filtertype: pattern + kind: prefix + value: logstash- + - filtertype: age + source: name + direction: older + timestring: '%Y.%m.%d' + unit: days + unit_count: 365 EOF helm upgrade --install elasticsearch ./elasticsearch \