diff --git a/templates/storage/elasticsearch/configMap.yaml b/templates/storage/elasticsearch/configMap.yaml new file mode 100644 index 0000000..764e6cd --- /dev/null +++ b/templates/storage/elasticsearch/configMap.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "finala.fullname" . }}-elasticsearch-config + labels: + chart: "{{ .Chart.Name }}" + app: "{{ include "finala.fullname" . }}-elasticsearch" +data: +{{- range $path, $config := .Values.storage.esConfig }} + {{ $path }}: | +{{ $config | indent 4 -}} +{{- end -}} \ No newline at end of file diff --git a/templates/storage/elasticsearch/elasticsearch.yaml b/templates/storage/elasticsearch/elasticsearch.yaml index da1f8f8..a9efff8 100644 --- a/templates/storage/elasticsearch/elasticsearch.yaml +++ b/templates/storage/elasticsearch/elasticsearch.yaml @@ -15,9 +15,13 @@ spec: labels: component: {{ include "finala.fullname" . }}-elasticsearch spec: + volumes: + - name: esconfig + configMap: + name: {{ include "finala.fullname" . }}-elasticsearch-config containers: - name: {{ include "finala.fullname" . }}-elasticsearch - image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0 + image: docker.elastic.co/elasticsearch/elasticsearch:8.5.0 env: - name: discovery.type value: single-node @@ -29,4 +33,10 @@ spec: requests: cpu: 500m memory: 1Gi -{{- end }} + volumeMounts: + {{- range $path, $config := .Values.storage.esConfig }} + - name: esconfig + mountPath: /usr/share/elasticsearch/config/{{ $path }} + subPath: {{ $path }} + {{- end -}} +{{- end }} \ No newline at end of file diff --git a/values.yaml b/values.yaml index f48bfbb..d811ba0 100644 --- a/values.yaml +++ b/values.yaml @@ -13,6 +13,13 @@ fullnameOverride: "" storage: type: internal + # Elasticsearch application configurations for http access. Remove for https and add other configurations. Example: https://github.com/elastic/helm-charts/blob/7.17/elasticsearch/examples/security/values.yaml + esConfig: + elasticsearch.yml: | + network.host: 0.0.0.0 + xpack.security.enabled: false + xpack.security.http.ssl.enabled: false + xpack.security.transport.ssl.enabled: false api: create: true