From 2b5dd1ac75d6952c8954367a8f6770d25a7c4c3d Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Thu, 11 Jan 2024 13:33:14 +0100 Subject: [PATCH 1/2] Quick rearrange for ES_PRESET, add to values file --- templates/configmap-env.yaml | 5 +---- values.yaml | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/configmap-env.yaml b/templates/configmap-env.yaml index 3ce6ced..eff5a89 100644 --- a/templates/configmap-env.yaml +++ b/templates/configmap-env.yaml @@ -34,20 +34,17 @@ data: DEFAULT_LOCALE: {{ .Values.mastodon.locale }} {{- if .Values.elasticsearch.enabled }} ES_ENABLED: "true" - ES_PRESET: {{ .Values.elasticsearch.preset | default "single_node_cluster" | quote }} ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl ES_PORT: "9200" {{- else if .Values.elasticsearch.hostname }} ES_ENABLED: "true" + ES_PRESET: {{ .Values.elasticsearch.preset | default "single_node_cluster" | quote }} ES_HOST: {{ include "mastodon.elasticsearch.fullHostname" .}} ES_PORT: {{ .Values.elasticsearch.port | default "9200" | quote }} {{- end }} {{- with .Values.elasticsearch.user }} ES_USER: {{ . }} {{- end }} - {{- with .Values.elasticsearch.user }} - ES_USER: {{ . }} - {{- end }} LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }} {{- with .Values.mastodon.web_domain }} WEB_DOMAIN: {{ . }} diff --git a/values.yaml b/values.yaml index b9fd707..2d30787 100644 --- a/values.yaml +++ b/values.yaml @@ -334,6 +334,7 @@ elasticsearch: # hostname: # port: 9200 # tls: true + # preset: single_node_cluster # This is optional, use it if you ES cluster requires authentication # user: From dfe7ca6a5d0f6f6e9ed27b5bcc612988315507bf Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Fri, 19 Jan 2024 12:41:31 +0100 Subject: [PATCH 2/2] ES_PRESET defined in all enabled cases --- templates/configmap-env.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/configmap-env.yaml b/templates/configmap-env.yaml index eff5a89..f2d989e 100644 --- a/templates/configmap-env.yaml +++ b/templates/configmap-env.yaml @@ -34,6 +34,7 @@ data: DEFAULT_LOCALE: {{ .Values.mastodon.locale }} {{- if .Values.elasticsearch.enabled }} ES_ENABLED: "true" + ES_PRESET: {{ .Values.elasticsearch.preset | default "single_node_cluster" | quote }} ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl ES_PORT: "9200" {{- else if .Values.elasticsearch.hostname }}