From efa17d3fa4bf974b1cb05c6bc6b218c41e53cb50 Mon Sep 17 00:00:00 2001 From: Gerald Barker Date: Thu, 7 Feb 2019 23:15:37 +0000 Subject: [PATCH] [stable/elasticsearch-curator] add dry-run option to chart (#11211) Signed-off-by: Gerald Barker --- stable/elasticsearch-curator/Chart.yaml | 2 +- stable/elasticsearch-curator/README.md | 1 + stable/elasticsearch-curator/templates/cronjob.yaml | 4 ++++ stable/elasticsearch-curator/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stable/elasticsearch-curator/Chart.yaml b/stable/elasticsearch-curator/Chart.yaml index 9297f59df7..216e93b80e 100644 --- a/stable/elasticsearch-curator/Chart.yaml +++ b/stable/elasticsearch-curator/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "5.5.4" description: A Helm chart for Elasticsearch Curator name: elasticsearch-curator -version: 1.1.0 +version: 1.2.0 home: https://github.com/elastic/curator keywords: - curator diff --git a/stable/elasticsearch-curator/README.md b/stable/elasticsearch-curator/README.md index a5dd075b0a..4e1ab9d894 100644 --- a/stable/elasticsearch-curator/README.md +++ b/stable/elasticsearch-curator/README.md @@ -40,6 +40,7 @@ their default values. | `cronjob.failedJobsHistoryLimit` | Specify the number of failed Jobs to keep | `nil` | | `cronjob.successfulJobsHistoryLimit` | Specify the number of completed Jobs to keep | `nil` | | `pod.annotations` | Annotations to add to the pod | {} | +| `dryrun` | Run Curator in dry-run mode | `false` | | `configMaps.action_file_yml` | Contents of the Curator action_file.yml | See values.yaml | | `configMaps.config_yml` | Contents of the Curator config.yml (overrides config) | See values.yaml | | `resources` | Resource requests and limits | {} | diff --git a/stable/elasticsearch-curator/templates/cronjob.yaml b/stable/elasticsearch-curator/templates/cronjob.yaml index 6d32aeeb34..96d4a29574 100644 --- a/stable/elasticsearch-curator/templates/cronjob.yaml +++ b/stable/elasticsearch-curator/templates/cronjob.yaml @@ -60,7 +60,11 @@ spec: {{ toYaml .Values.extraVolumeMounts | indent 16 }} {{- end }} command: [ "curator" ] +{{- if .Values.dryrun }} + args: [ "--dry-run", "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ] +{{- else }} args: [ "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ] +{{- end }} resources: {{ toYaml .Values.resources | indent 16 }} {{- with .Values.nodeSelector }} diff --git a/stable/elasticsearch-curator/values.yaml b/stable/elasticsearch-curator/values.yaml index a13c8ac7f2..e9a7e0c22b 100644 --- a/stable/elasticsearch-curator/values.yaml +++ b/stable/elasticsearch-curator/values.yaml @@ -22,6 +22,9 @@ hooks: install: false upgrade: false +# run curator in dry-run mode +dryrun: false + configMaps: # Delete indices older than 7 days action_file_yml: |-