Skip to content

Commit

Permalink
[stable/elasticsearch-curator] add env option (helm#11533)
Browse files Browse the repository at this point in the history
* Add env option to elasticsearch-curator.

Signed-off-by: Christian Groschupp <[email protected]>

* Allow to overwrite command in elasticsearch-curator.

Signed-off-by: Christian Groschupp <[email protected]>

* Update README.md in elasticsearch-curator.

Signed-off-by: Christian Groschupp <[email protected]>

* Bump elasticsearch-curator version to 1.2.1.

Signed-off-by: Christian Groschupp <[email protected]>
  • Loading branch information
cgroschupp authored and k8s-ci-robot committed Feb 20, 2019
1 parent 76601ea commit aab1621
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stable/elasticsearch-curator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "5.5.4"
description: A Helm chart for Elasticsearch Curator
name: elasticsearch-curator
version: 1.2.0
version: 1.2.1
home: https://github.com/elastic/curator
keywords:
- curator
Expand Down
4 changes: 3 additions & 1 deletion stable/elasticsearch-curator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ 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` |
| `dryrun` | Run Curator in dry-run mode | `false` |
| `env` | Environment variables to add to the cronjob container | {} |
| `command` | Command to execute | ["curator"] |
| `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 | {} |
Expand Down
12 changes: 11 additions & 1 deletion stable/elasticsearch-curator/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,22 @@ spec:
mountPath: /etc/es-curator
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | indent 16 }}
{{ end }}
{{ if .Values.command }}
command:
{{ toYaml .Values.command | 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 }}
env:
{{- if .Values.env }}
{{- range $key,$value := .Values.env }}
- name: {{ $key | upper | quote}}
value: {{ $value | quote}}
{{- end }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 16 }}
Expand Down
3 changes: 3 additions & 0 deletions stable/elasticsearch-curator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ hooks:
# run curator in dry-run mode
dryrun: false

command: ["curator"]
env: {}

configMaps:
# Delete indices older than 7 days
action_file_yml: |-
Expand Down

0 comments on commit aab1621

Please sign in to comment.