mirror of
https://github.com/mastodon/chart
synced 2025-03-14 21:11:50 +00:00
Additional Elasticsearch options (#106)
This commit is contained in:
parent
03ea7244d7
commit
905f78fd72
|
@ -171,3 +171,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 -}}
|
||||
|
|
|
@ -21,6 +21,13 @@ data:
|
|||
ES_ENABLED: "true"
|
||||
ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl
|
||||
ES_PORT: "9200"
|
||||
{{- else if .Values.elasticsearch.hostname }}
|
||||
ES_ENABLED: "true"
|
||||
ES_HOST: {{ include "mastodon.elasticsearch.fullHostname" .}}
|
||||
ES_PORT: {{ .Values.elasticsearch.port | default "9200" | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.elasticsearch.user }}
|
||||
ES_USER: {{ . }}
|
||||
{{- end }}
|
||||
LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }}
|
||||
{{- with .Values.mastodon.web_domain }}
|
||||
|
|
|
@ -65,6 +65,13 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.elasticsearch.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (and .Values.mastodon.s3.enabled .Values.mastodon.s3.existingSecret) }}
|
||||
|
|
|
@ -98,6 +98,13 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" $context }}
|
||||
key: redis-password
|
||||
{{- if and $context.Values.elasticsearch.existingSecret (or $context.Values.elasticsearch.enabled $context.Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $context.Values.elasticsearch.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
- name: "SMTP_LOGIN"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
|
|
@ -79,6 +79,13 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.elasticsearch.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if .Values.mastodon.web.minThreads }}
|
||||
|
|
|
@ -67,6 +67,13 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.elasticsearch.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
|
|
16
values.yaml
16
values.yaml
|
@ -255,17 +255,29 @@ ingress:
|
|||
|
||||
# -- https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters
|
||||
elasticsearch:
|
||||
# `false` will disable full-text search
|
||||
# Elasticsearch is powering full-text search. It is optional.
|
||||
|
||||
# `false` will not install Elasticsearch as part of this chart
|
||||
#
|
||||
# if you enable ES after the initial install, you will need to manually run
|
||||
# RAILS_ENV=production bundle exec rake chewy:sync
|
||||
# (https://docs.joinmastodon.org/admin/optional/elasticsearch/)
|
||||
# @ignored
|
||||
enabled: true
|
||||
# @ignored
|
||||
image:
|
||||
tag: 7
|
||||
|
||||
# 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:
|
||||
# Name of an existing secret with a password key
|
||||
# existingSecret:
|
||||
|
||||
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
|
||||
postgresql:
|
||||
# -- disable if you want to use an existing db; in which case the values below
|
||||
|
|
Loading…
Reference in New Issue
Block a user