diff --git a/incubator/elasticsearch/Chart.yaml b/incubator/elasticsearch/Chart.yaml index 543fa02fae..11459795b4 100755 --- a/incubator/elasticsearch/Chart.yaml +++ b/incubator/elasticsearch/Chart.yaml @@ -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. diff --git a/incubator/elasticsearch/README.md b/incubator/elasticsearch/README.md index d2975ae7cf..f6077c13c3 100644 --- a/incubator/elasticsearch/README.md +++ b/incubator/elasticsearch/README.md @@ -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. diff --git a/incubator/elasticsearch/ci/extrainitcontainers-values.yaml b/incubator/elasticsearch/ci/extrainitcontainers-values.yaml new file mode 100644 index 0000000000..9ba5471aed --- /dev/null +++ b/incubator/elasticsearch/ci/extrainitcontainers-values.yaml @@ -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"] diff --git a/incubator/elasticsearch/templates/client-deployment.yaml b/incubator/elasticsearch/templates/client-deployment.yaml index 1e8eda606d..e822582cdb 100644 --- a/incubator/elasticsearch/templates/client-deployment.yaml +++ b/incubator/elasticsearch/templates/client-deployment.yaml @@ -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: diff --git a/incubator/elasticsearch/templates/data-statefulset.yaml b/incubator/elasticsearch/templates/data-statefulset.yaml index 50aefe2aaf..a91aefd2d2 100644 --- a/incubator/elasticsearch/templates/data-statefulset.yaml +++ b/incubator/elasticsearch/templates/data-statefulset.yaml @@ -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: diff --git a/incubator/elasticsearch/templates/master-statefulset.yaml b/incubator/elasticsearch/templates/master-statefulset.yaml index feb3159a8b..cd3aa9e0fa 100644 --- a/incubator/elasticsearch/templates/master-statefulset.yaml +++ b/incubator/elasticsearch/templates/master-statefulset.yaml @@ -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: diff --git a/incubator/elasticsearch/values.yaml b/incubator/elasticsearch/values.yaml index 3a39be2bc6..948a487b21 100644 --- a/incubator/elasticsearch/values.yaml +++ b/incubator/elasticsearch/values.yaml @@ -119,3 +119,6 @@ data: maxUnavailable: 1 updateStrategy: type: OnDelete + +## Additional init containers +extraInitContainers: |