diff --git a/incubator/elasticsearch/Chart.yaml b/incubator/elasticsearch/Chart.yaml index e7e89a65a1..78dd5a301c 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.5.0 +version: 1.6.0 appVersion: 6.4.0 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 ef366cbc4d..3270365dd7 100644 --- a/incubator/elasticsearch/README.md +++ b/incubator/elasticsearch/README.md @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the elasticsearch chart | `cluster.kubernetesDomain` | Kubernetes cluster domain name | `cluster.local` | | `cluster.xpackEnable` | Writes the X-Pack configuration options to the configuration file | `false` | | `cluster.config` | Additional cluster config appended | `{}` | +| `cluster.keystoreSecret` | Name of secret holding secure config options in an es keystore | `nil` | | `cluster.env` | Cluster environment variables | `{}` | | `client.name` | Client component name | `client` | | `client.replicas` | Client node replicas (deployment) | `2` | diff --git a/incubator/elasticsearch/templates/client-deployment.yaml b/incubator/elasticsearch/templates/client-deployment.yaml index 4e3c5dfd46..7f94e9c394 100644 --- a/incubator/elasticsearch/templates/client-deployment.yaml +++ b/incubator/elasticsearch/templates/client-deployment.yaml @@ -122,6 +122,12 @@ spec: name: config subPath: log4j2.properties {{- end }} +{{- if .Values.cluster.keystoreSecret }} + - name: keystore + mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore" + subPath: elasticsearch.keystore + readOnly: true +{{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{- range $pullSecret := .Values.image.pullSecrets }} @@ -132,3 +138,8 @@ spec: - name: config configMap: name: {{ template "elasticsearch.fullname" . }} +{{- if .Values.cluster.keystoreSecret }} + - name: keystore + secret: + secretName: {{ .Values.cluster.keystoreSecret }} +{{- end }} diff --git a/incubator/elasticsearch/templates/data-statefulset.yaml b/incubator/elasticsearch/templates/data-statefulset.yaml index f2420ef362..993a46c80c 100644 --- a/incubator/elasticsearch/templates/data-statefulset.yaml +++ b/incubator/elasticsearch/templates/data-statefulset.yaml @@ -135,6 +135,12 @@ spec: - name: config mountPath: /post-start-hook.sh subPath: post-start-hook.sh +{{- if .Values.cluster.keystoreSecret }} + - name: keystore + mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore" + subPath: elasticsearch.keystore + readOnly: true +{{- end }} lifecycle: preStop: exec: @@ -153,6 +159,11 @@ spec: - name: config configMap: name: {{ template "elasticsearch.fullname" . }} +{{- if .Values.cluster.keystoreSecret }} + - name: keystore + secret: + secretName: {{ .Values.cluster.keystoreSecret }} +{{- end }} {{- if not .Values.data.persistence.enabled }} - name: data emptyDir: {} diff --git a/incubator/elasticsearch/templates/master-statefulset.yaml b/incubator/elasticsearch/templates/master-statefulset.yaml index 3086bbcc0b..51cc539b61 100644 --- a/incubator/elasticsearch/templates/master-statefulset.yaml +++ b/incubator/elasticsearch/templates/master-statefulset.yaml @@ -133,6 +133,12 @@ spec: name: config subPath: log4j2.properties {{- end }} +{{- if .Values.cluster.keystoreSecret }} + - name: keystore + mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore" + subPath: elasticsearch.keystore + readOnly: true +{{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{- range $pullSecret := .Values.image.pullSecrets }} @@ -143,6 +149,11 @@ spec: - name: config configMap: name: {{ template "elasticsearch.fullname" . }} +{{- if .Values.cluster.keystoreSecret }} + - name: keystore + secret: + secretName: {{ .Values.cluster.keystoreSecret }} +{{- end }} {{- if not .Values.master.persistence.enabled }} - name: data emptyDir: {} diff --git a/incubator/elasticsearch/values.yaml b/incubator/elasticsearch/values.yaml index 4762a72793..4e195d379a 100644 --- a/incubator/elasticsearch/values.yaml +++ b/incubator/elasticsearch/values.yaml @@ -17,6 +17,9 @@ cluster: # If you want X-Pack installed, switch to an image that includes it, enable this option and toggle the features you want # enabled in the environment variables outlined in the README xpackEnable: false + # Some settings must be placed in a keystore, so they need to be mounted in from a secret. + # Use this setting to specify the name of the secret + # keystoreSecret: eskeystore config: env: # IMPORTANT: https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#minimum_master_nodes