3
0
mirror of https://github.com/mastodon/chart synced 2025-05-17 20:43:21 +00:00

Add TLS field for simplicity

This commit is contained in:
Tim Campbell 2023-12-13 11:01:39 +01:00
parent ce3591062f
commit 5470bc0611
3 changed files with 17 additions and 3 deletions

View File

@ -161,3 +161,16 @@ Find highest number of needed database connections to set DB_POOL variable
{{- end }}
{{- $poolSize | quote }}
{{- end }}
{{/*
Full hostname for a custom Elasticsearch cluster
*/}}
{{- define "mastodon.elasticsearch.fullHostname" -}}
{{- if not .Values.elasticsearch.enabled }}
{{- if .Values.elasticsearch.tls }}
{{- printf "https://%s" (tpl .Values.elasticsearch.hostname $) -}}
{{- else -}}
{{- printf "%s" (tpl .Values.elasticsearch.hostname $) -}}
{{- end }}
{{- end -}}
{{- end -}}

View File

@ -23,7 +23,7 @@ data:
ES_PORT: "9200"
{{- else if .Values.elasticsearch.hostname }}
ES_ENABLED: "true"
ES_HOST: {{ .Values.elasticsearch.hostname }}
ES_HOST: {{ include "mastodon.elasticsearch.fullHostname" .}}
ES_PORT: {{ .Values.elasticsearch.port | default "9200" | quote }}
{{- end }}
{{- with .Values.elasticsearch.user }}

View File

@ -259,10 +259,11 @@ elasticsearch:
image:
tag: 7
# If you are using an external ES cluster, use `enabled: false` and set the hostname and port.
# When using a cluster with TLS enabled, the hostname must begin with https://
# If you are using an external ES cluster, use `enabled: false` and set the hostname, port,
# and whether the cluster uses TLS.
# hostname:
# port: 9200
# tls: true
# This is optional, use it if you ES cluster requires authentication
# user: