mirror of
https://github.com/mastodon/chart
synced 2025-05-18 04:53:21 +00:00
Additional configuration for redis instances
This commit is contained in:
parent
ce837a852a
commit
3e9ae3e9f2
|
@ -147,6 +147,36 @@ Get the redis secret.
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the redis secret (sidekiq).
|
||||
*/}}
|
||||
{{- define "mastodon.redis.sidekiq.secretName" -}}
|
||||
{{- if .Values.redis.sidekiq.auth.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.sidekiq.auth.existingSecret $) -}}
|
||||
{{- else if .Values.redis.auth.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.auth.existingSecret $) -}}
|
||||
{{- else if .Values.redis.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.existingSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-redis" (tpl .Release.Name $) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the redis secret (cache).
|
||||
*/}}
|
||||
{{- define "mastodon.redis.cache.secretName" -}}
|
||||
{{- if .Values.redis.cache.auth.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.cache.auth.existingSecret $) -}}
|
||||
{{- else if .Values.redis.auth.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.auth.existingSecret $) -}}
|
||||
{{- else if .Values.redis.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.existingSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-redis" (tpl .Release.Name $) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if a mastodon secret object should be created
|
||||
*/}}
|
||||
|
|
|
@ -72,6 +72,30 @@ data:
|
|||
REDIS_HOST: {{ required "When the redis chart is disabled .Values.redis.hostname is required" .Values.redis.hostname }}
|
||||
{{- end }}
|
||||
REDIS_PORT: {{ .Values.redis.port | default "6379" | quote }}
|
||||
{{- if .Values.redis.sidekiq.enabled }}
|
||||
{{- if .Values.redis.sidekiq.host }}
|
||||
SIDEKIQ_REDIS_HOST: {{ .Values.redis.sidekiq.host }}
|
||||
{{- else }}
|
||||
SIDEKIQ_REDIS_HOST: {{ .Values.redis.host }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.sidekiq.port }}
|
||||
SIDEKIQ_REDIS_PORT: {{ .Values.redis.sidekiq.port }}
|
||||
{{- else }}
|
||||
SIDEKIQ_REDIS_PORT: {{ .Values.redis.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.cache.enabled }}
|
||||
{{- if .Values.redis.cache.host }}
|
||||
CACHE_REDIS_HOST: {{ .Values.redis.cache.host }}
|
||||
{{- else }}
|
||||
CACHE_REDIS_HOST: {{ .Values.redis.host}}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.cache.port }}
|
||||
CACHE_REDIS_PORT: {{ .Values.redis.cache.port }}
|
||||
{{- else }}
|
||||
CACHE_REDIS_PORT: {{ .Values.redis.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.s3.enabled }}
|
||||
S3_BUCKET: {{ .Values.mastodon.s3.bucket }}
|
||||
S3_ENABLED: "true"
|
||||
|
@ -389,4 +413,3 @@ data:
|
|||
{{- with .Values.timezone }}
|
||||
TZ: {{ . | quote }}
|
||||
{{- end }}
|
||||
|
|
@ -65,6 +65,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
|
|
|
@ -124,6 +124,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" $context }}
|
||||
key: redis-password
|
||||
{{- if and $context.Values.redis.sidekiq.enabled $context.Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and $context.Values.redis.cache.enabled $context.Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and $context.Values.elasticsearch.existingSecret (or $context.Values.elasticsearch.enabled $context.Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
|
|
|
@ -103,6 +103,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.streaming.port | quote }}
|
||||
ports:
|
||||
|
|
|
@ -101,6 +101,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
|
|
|
@ -67,6 +67,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
|
|
|
@ -67,6 +67,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
|
|
|
@ -72,6 +72,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
|
|
|
@ -67,6 +67,20 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user