allow external redis instance (#6)

This commit is contained in:
Norman 2022-12-01 06:41:51 +01:00 committed by GitHub
parent d74c7876c2
commit 543fdf7446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -34,3 +34,4 @@ dependencies:
- name: redis - name: redis
version: 16.13.2 version: 16.13.2
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
condition: redis.enabled

View File

@ -32,8 +32,12 @@ data:
MALLOC_ARENA_MAX: "2" MALLOC_ARENA_MAX: "2"
NODE_ENV: "production" NODE_ENV: "production"
RAILS_ENV: "production" RAILS_ENV: "production"
{{- if .Values.redis.enabled }}
REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master
REDIS_PORT: "6379" {{- else }}
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.mastodon.s3.enabled }} {{- if .Values.mastodon.s3.enabled }}
S3_BUCKET: {{ .Values.mastodon.s3.bucket }} S3_BUCKET: {{ .Values.mastodon.s3.bucket }}
S3_ENABLED: "true" S3_ENABLED: "true"

View File

@ -167,6 +167,11 @@ postgresql:
# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters # https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters
redis: redis:
# disable if you want to use an existing redis instance; in which case the
# values below must match those of that external redis instance
enabled: true
hostname: ""
port: 6379
# you must set a password; the password generated by the redis chart will be # you must set a password; the password generated by the redis chart will be
# rotated on each upgrade: # rotated on each upgrade:
password: "" password: ""