mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/elasticsearch-curator] Add support for init containers (#12772)
* Add support for init containers Signed-off-by: Michael Lorant <mikel@mlvision.com.au> * Follow convention for init container Helm values Signed-off-by: Michael Lorant <mikel@mlvision.com.au> * Add init container values test Signed-off-by: Michael Lorant <mikel@mlvision.com.au>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
d05341dea0
commit
7d11ca9ba3
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
appVersion: "5.5.4"
|
||||
description: A Helm chart for Elasticsearch Curator
|
||||
name: elasticsearch-curator
|
||||
version: 1.3.2
|
||||
version: 1.4.0
|
||||
home: https://github.com/elastic/curator
|
||||
keywords:
|
||||
- curator
|
||||
|
||||
@@ -52,6 +52,8 @@ their default values.
|
||||
| `priorityClassName` | priorityClassName | `nil` |
|
||||
| `extraVolumeMounts` | Mount extra volume(s), | |
|
||||
| `extraVolumes` | Extra volumes | |
|
||||
| `securityContext` | Configure PodSecurityContext |
|
||||
| `extraInitContainers` | Init containers to add to the cronjob container | {} |
|
||||
| `securityContext` | Configure PodSecurityContext | |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to
|
||||
`helm install`.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
extraInitContainers:
|
||||
test:
|
||||
image: alpine:latest
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
args:
|
||||
- |
|
||||
true
|
||||
@@ -52,6 +52,13 @@ spec:
|
||||
{{- if .Values.image.pullSecret }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.image.pullSecret }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraInitContainers }}
|
||||
initContainers:
|
||||
{{- range $key, $value := .Values.extraInitContainers }}
|
||||
- name: "{{ $key }}"
|
||||
{{ toYaml $value | indent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
||||
@@ -101,5 +101,40 @@ priorityClassName: ""
|
||||
# mountPath: /certs
|
||||
# readOnly: true
|
||||
|
||||
# Add your own init container or uncomment and modify the given example.
|
||||
extraInitContainers: {}
|
||||
## Don't configure S3 repository till Elasticsearch is reachable.
|
||||
## Ensure that it is available at http://elasticsearch:9200
|
||||
##
|
||||
# elasticsearch-s3-repository:
|
||||
# image: jwilder/dockerize:latest
|
||||
# imagePullPolicy: "IfNotPresent"
|
||||
# command:
|
||||
# - "/bin/sh"
|
||||
# - "-c"
|
||||
# args:
|
||||
# - |
|
||||
# ES_HOST=elasticsearch
|
||||
# ES_PORT=9200
|
||||
# ES_REPOSITORY=backup
|
||||
# S3_REGION=us-east-1
|
||||
# S3_BUCKET=bucket
|
||||
# S3_BASE_PATH=backup
|
||||
# S3_COMPRESS=true
|
||||
# S3_STORAGE_CLASS=standard
|
||||
# apk add curl --no-cache && \
|
||||
# dockerize -wait http://${ES_HOST}:${ES_PORT} --timeout 120s && \
|
||||
# cat <<EOF | curl -sS -XPUT -H "Content-Type: application/json" -d @- http://${ES_HOST}:${ES_PORT}/_snapshot/${ES_REPOSITORY} \
|
||||
# {
|
||||
# "type": "s3",
|
||||
# "settings": {
|
||||
# "bucket": "${S3_BUCKET}",
|
||||
# "base_path": "${S3_BASE_PATH}",
|
||||
# "region": "${S3_REGION}",
|
||||
# "compress": "${S3_COMPRESS}",
|
||||
# "storage_class": "${S3_STORAGE_CLASS}"
|
||||
# }
|
||||
# }
|
||||
|
||||
securityContext:
|
||||
runAsUser: 16 # run as cron user instead of root
|
||||
|
||||
Reference in New Issue
Block a user