diff --git a/elasticsearch/templates/cron-job-curator.yaml b/elasticsearch/templates/cron-job-curator.yaml index 81b85b2f4..7a6a4d57d 100644 --- a/elasticsearch/templates/cron-job-curator.yaml +++ b/elasticsearch/templates/cron-job-curator.yaml @@ -29,7 +29,10 @@ metadata: annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: - schedule: {{ .Values.conf.curator.schedule | quote }} + schedule: {{ .Values.jobs.curator.cron | quote }} + successfulJobsHistoryLimit: {{ .Values.jobs.curator.history.success }} + failedJobsHistoryLimit: {{ .Values.jobs.curator.history.failed }} + concurrencyPolicy: Forbid jobTemplate: metadata: labels: diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 1fe09a089..647416903 100644 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -352,6 +352,13 @@ secrets: elasticsearch: public: elasticsearch-tls-public +jobs: + curator: + cron: "* */6 * * *" + history: + success: 3 + failed: 1 + conf: httpd: | ServerRoot "/usr/local/apache2" @@ -490,8 +497,6 @@ conf: ceph: admin_keyring: null curator: - #run every 6th hour - schedule: "0 */6 * * *" action_file: # Remember, leave a key empty if there is no value. None will be a string, # not a Python "NoneType" diff --git a/tools/deployment/armada/manifests/armada-lma.yaml b/tools/deployment/armada/manifests/armada-lma.yaml index bc8f45c1d..0f3761815 100644 --- a/tools/deployment/armada/manifests/armada-lma.yaml +++ b/tools/deployment/armada/manifests/armada-lma.yaml @@ -403,6 +403,28 @@ data: pod_name: type: keyword index: false + curator: + 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 source: type: local location: ${OSH_INFRA_PATH} diff --git a/tools/deployment/multinode/120-elasticsearch.sh b/tools/deployment/multinode/120-elasticsearch.sh index a276c3b8a..c4a7990a6 100755 --- a/tools/deployment/multinode/120-elasticsearch.sh +++ b/tools/deployment/multinode/120-elasticsearch.sh @@ -34,29 +34,28 @@ conf: master: "-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 + curator: + 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/osh-infra-logging/050-elasticsearch.sh b/tools/deployment/osh-infra-logging/050-elasticsearch.sh index 8e3401976..a4de23cef 100755 --- a/tools/deployment/osh-infra-logging/050-elasticsearch.sh +++ b/tools/deployment/osh-infra-logging/050-elasticsearch.sh @@ -32,29 +32,28 @@ 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 + curator: + 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 \