From 547da1439e0d6379a49fc5bf47ebfe1ebfa193cb Mon Sep 17 00:00:00 2001 From: lebenitza Date: Mon, 9 Dec 2019 18:16:03 +0200 Subject: [PATCH] [stable/elasticsearch-curator] Fixed values for helm hooks and added CI test for it (#19186) * Make helm hook job object have the same command as the CronJob Signed-off-by: Mihai Anei * Fixed parsing of helm hook job command. Added ci values for testing them Signed-off-by: Mihai Anei * Add CI test for default values of the chart Signed-off-by: Mihai Anei --- stable/elasticsearch-curator/Chart.yaml | 2 +- stable/elasticsearch-curator/ci/default-values.yaml | 1 + stable/elasticsearch-curator/ci/hooks-values.yaml | 5 +++++ .../elasticsearch-curator/templates/hooks/job.install.yaml | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 stable/elasticsearch-curator/ci/default-values.yaml create mode 100644 stable/elasticsearch-curator/ci/hooks-values.yaml diff --git a/stable/elasticsearch-curator/Chart.yaml b/stable/elasticsearch-curator/Chart.yaml index e72b8b3425..81d9d841d2 100644 --- a/stable/elasticsearch-curator/Chart.yaml +++ b/stable/elasticsearch-curator/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "5.7.6" description: A Helm chart for Elasticsearch Curator name: elasticsearch-curator -version: 2.1.2 +version: 2.1.3 home: https://github.com/elastic/curator keywords: - curator diff --git a/stable/elasticsearch-curator/ci/default-values.yaml b/stable/elasticsearch-curator/ci/default-values.yaml new file mode 100644 index 0000000000..fc2ba605ad --- /dev/null +++ b/stable/elasticsearch-curator/ci/default-values.yaml @@ -0,0 +1 @@ +# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml. diff --git a/stable/elasticsearch-curator/ci/hooks-values.yaml b/stable/elasticsearch-curator/ci/hooks-values.yaml new file mode 100644 index 0000000000..e7815879d4 --- /dev/null +++ b/stable/elasticsearch-curator/ci/hooks-values.yaml @@ -0,0 +1,5 @@ +# Testing hooks are generated properly + +hooks: + install: true + upgrade: true diff --git a/stable/elasticsearch-curator/templates/hooks/job.install.yaml b/stable/elasticsearch-curator/templates/hooks/job.install.yaml index d0840ed6dd..4695d265c2 100644 --- a/stable/elasticsearch-curator/templates/hooks/job.install.yaml +++ b/stable/elasticsearch-curator/templates/hooks/job.install.yaml @@ -49,9 +49,9 @@ spec: {{- if $.Values.extraVolumeMounts }} {{ toYaml $.Values.extraVolumeMounts | indent 12 }} {{- end }} -{{ if .Values.command }} +{{ if $.Values.command }} command: -{{ toYaml .Values.command | indent 12 }} +{{ toYaml $.Values.command | indent 12 }} {{- end }} args: [ "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ] resources: