[incubator/elasticsearch] added extraInitContainers option (#7587)

* added extraInitContainers option

Signed-off-by: André Bauer <monotek23@gmail.com>

* added ci test with extrainitcontainers values

Signed-off-by: André Bauer <monotek23@gmail.com>

* updated elasticsearch to version 6.4.1
Signed-off-by: André Bauer <andre.bauer@kiwigrid.com>

* updated version also in values file
Signed-off-by: André Bauer <andre.bauer@kiwigrid.com>
This commit is contained in:
André Bauer
2018-09-22 07:44:27 -07:00
committed by k8s-ci-robot
parent 8af9ba35e0
commit ad307f6596
7 changed files with 32 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
name: elasticsearch
home: https://www.elastic.co/products/elasticsearch
version: 1.7.3
version: 1.8.0
appVersion: 6.4.1
description: Flexible and powerful open source, distributed real-time search and analytics
engine.
+10 -1
View File
@@ -113,6 +113,7 @@ The following table lists the configurable parameters of the elasticsearch chart
| `data.tolerations` | Data tolerations | `[]` |
| `data.terminationGracePeriodSeconds` | Data termination grace period (seconds) | `3600` |
| `data.antiAffinity` | Data anti-affinity policy | `soft` |
| `extraInitContainers` | Additional init container passed through the tpl | `` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
@@ -126,7 +127,7 @@ The YAML value of cluster.config is appended to elasticsearch.yml file for addit
## Application Version
This chart aims to support Elasticsearch v2 and v5 deployments by specifying the `values.yaml` parameter `appVersion`.
This chart aims to support Elasticsearch v2 to v6 deployments by specifying the `values.yaml` parameter `appVersion`.
### Version Specific Features
@@ -188,3 +189,11 @@ Create cluster with Storage class `ssd` on Kubernetes 1.5+
```
$ helm install incubator/elasticsearch --name my-release --set data.storageClass=ssd,data.storage=100Gi
```
### Usage of the `tpl` Function
The `tpl` function allows us to pass string values from `values.yaml` through the templating engine. It is used for the following values:
* `extraInitContainers`
It is important that these values be configured as strings. Otherwise, installation will fail.
@@ -0,0 +1,9 @@
extraInitContainers: |
- name: "plugin-install-ingest-attachment"
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.0"
command: ["/bin/bash"]
args: ["-c", "yes | /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment"]
- name: "plugin-install-mapper-size"
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.0"
command: ["/bin/bash"]
args: ["-c", "yes | /usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-size"]
@@ -66,6 +66,9 @@ spec:
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
{{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 6 }}
{{- end }}
containers:
- name: elasticsearch
env:
@@ -80,6 +80,9 @@ spec:
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: data
{{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 6 }}
{{- end }}
containers:
- name: elasticsearch
env:
@@ -80,6 +80,9 @@ spec:
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: data
{{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 6 }}
{{- end }}
containers:
- name: elasticsearch
env:
+3
View File
@@ -119,3 +119,6 @@ data:
maxUnavailable: 1
updateStrategy:
type: OnDelete
## Additional init containers
extraInitContainers: |