mirror of
https://github.com/mastodon/chart
synced 2025-03-15 21:41:50 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
b42a053666
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
charts/
|
|
@ -55,7 +55,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
Rolling pod annotations
|
Rolling pod annotations
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "mastodon.rollingPodAnnotations" -}}
|
{{- define "mastodon.rollingPodAnnotations" -}}
|
||||||
|
{{- if .Values.revisionPodAnnotation }}
|
||||||
rollme: {{ .Release.Revision | quote }}
|
rollme: {{ .Release.Revision | quote }}
|
||||||
|
{{- end }}
|
||||||
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" ) . | sha256sum | quote }}
|
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" ) . | sha256sum | quote }}
|
||||||
checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }}
|
checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -98,6 +100,17 @@ Get the mastodon secret.
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Get the smtp secret.
|
||||||
|
*/}}
|
||||||
|
{{- define "mastodon.smtp.secretName" -}}
|
||||||
|
{{- if .Values.mastodon.smtp.existingSecret }}
|
||||||
|
{{- printf "%s" (tpl .Values.mastodon.smtp.existingSecret $) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-smtp" (include "common.names.fullname" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Get the postgresql secret.
|
Get the postgresql secret.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
|
@ -15,6 +15,7 @@ data:
|
||||||
DB_NAME: {{ .Values.postgresql.auth.database }}
|
DB_NAME: {{ .Values.postgresql.auth.database }}
|
||||||
DB_POOL: {{ include "mastodon.maxDbPool" . }}
|
DB_POOL: {{ include "mastodon.maxDbPool" . }}
|
||||||
DB_USER: {{ .Values.postgresql.auth.username }}
|
DB_USER: {{ .Values.postgresql.auth.username }}
|
||||||
|
PREPARED_STATEMENTS: {{ .Values.mastodon.preparedStatements | quote }}
|
||||||
DEFAULT_LOCALE: {{ .Values.mastodon.locale }}
|
DEFAULT_LOCALE: {{ .Values.mastodon.locale }}
|
||||||
{{- if .Values.elasticsearch.enabled }}
|
{{- if .Values.elasticsearch.enabled }}
|
||||||
ES_ENABLED: "true"
|
ES_ENABLED: "true"
|
||||||
|
@ -31,6 +32,9 @@ data:
|
||||||
{{- with .Values.mastodon.authorizedFetch }}
|
{{- with .Values.mastodon.authorizedFetch }}
|
||||||
AUTHORIZED_FETCH: {{ . | quote }}
|
AUTHORIZED_FETCH: {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.mastodon.limitedFederationMode }}
|
||||||
|
LIMITED_FEDERATION_MODE: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
# https://devcenter.heroku.com/articles/tuning-glibc-memory-behavior
|
# https://devcenter.heroku.com/articles/tuning-glibc-memory-behavior
|
||||||
MALLOC_ARENA_MAX: "2"
|
MALLOC_ARENA_MAX: "2"
|
||||||
NODE_ENV: "production"
|
NODE_ENV: "production"
|
||||||
|
@ -47,11 +51,14 @@ data:
|
||||||
S3_ENDPOINT: {{ .Values.mastodon.s3.endpoint }}
|
S3_ENDPOINT: {{ .Values.mastodon.s3.endpoint }}
|
||||||
S3_HOSTNAME: {{ .Values.mastodon.s3.hostname }}
|
S3_HOSTNAME: {{ .Values.mastodon.s3.hostname }}
|
||||||
S3_PROTOCOL: "https"
|
S3_PROTOCOL: "https"
|
||||||
|
{{- if .Values.mastodon.s3.permission }}
|
||||||
|
S3_PERMISSION: {{ .Values.mastodon.s3.permission }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.mastodon.s3.region }}
|
{{- with .Values.mastodon.s3.region }}
|
||||||
S3_REGION: {{ . }}
|
S3_REGION: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.mastodon.s3.alias_host }}
|
{{- with .Values.mastodon.s3.alias_host }}
|
||||||
S3_ALIAS_HOST: {{ .Values.mastodon.s3.alias_host}}
|
S3_ALIAS_HOST: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.mastodon.smtp.auth_method }}
|
{{- with .Values.mastodon.smtp.auth_method }}
|
||||||
|
@ -75,15 +82,9 @@ data:
|
||||||
{{- with .Values.mastodon.smtp.from_address }}
|
{{- with .Values.mastodon.smtp.from_address }}
|
||||||
SMTP_FROM_ADDRESS: {{ . }}
|
SMTP_FROM_ADDRESS: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.mastodon.smtp.login }}
|
|
||||||
SMTP_LOGIN: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.mastodon.smtp.openssl_verify_mode }}
|
{{- with .Values.mastodon.smtp.openssl_verify_mode }}
|
||||||
SMTP_OPENSSL_VERIFY_MODE: {{ . }}
|
SMTP_OPENSSL_VERIFY_MODE: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.mastodon.smtp.password }}
|
|
||||||
SMTP_PASSWORD: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.mastodon.smtp.port }}
|
{{- with .Values.mastodon.smtp.port }}
|
||||||
SMTP_PORT: {{ . | quote }}
|
SMTP_PORT: {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -288,13 +289,16 @@ data:
|
||||||
{{- if .Values.externalAuth.ldap.enabled }}
|
{{- if .Values.externalAuth.ldap.enabled }}
|
||||||
LDAP_ENABLED: {{ .Values.externalAuth.ldap.enabled | quote }}
|
LDAP_ENABLED: {{ .Values.externalAuth.ldap.enabled | quote }}
|
||||||
LDAP_HOST: {{ .Values.externalAuth.ldap.host }}
|
LDAP_HOST: {{ .Values.externalAuth.ldap.host }}
|
||||||
LDAP_PORT: {{ .Values.externalAuth.ldap.port }}
|
LDAP_PORT: {{ .Values.externalAuth.ldap.port | quote }}
|
||||||
LDAP_METHOD: {{ .Values.externalAuth.ldap.method }}
|
LDAP_METHOD: {{ .Values.externalAuth.ldap.method }}
|
||||||
{{- with .Values.externalAuth.ldap.base }}
|
{{- if .Values.externalAuth.ldap.tls_no_verify }}
|
||||||
LDAP_BASE: {{ . }}
|
LDAP_TLS_NO_VERIFY: {{ .Values.externalAuth.ldap.tls_no_verify | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.externalAuth.ldap.bind_on }}
|
{{- if .Values.externalAuth.ldap.base }}
|
||||||
LDAP_BIND_ON: {{ . }}
|
LDAP_BASE: {{ .Values.externalAuth.ldap.base }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.externalAuth.ldap.bind_dn }}
|
||||||
|
LDAP_BIND_DN: {{ .Values.externalAuth.ldap.bind_dn }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.externalAuth.ldap.password }}
|
{{- with .Values.externalAuth.ldap.password }}
|
||||||
LDAP_PASSWORD: {{ . }}
|
LDAP_PASSWORD: {{ . }}
|
||||||
|
|
|
@ -31,6 +31,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# roll the pods to pick up any db migrations or other changes
|
# roll the pods to pick up any db migrations or other changes
|
||||||
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
||||||
|
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
||||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||||
|
@ -90,6 +91,17 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.redis.secretName" $context }}
|
name: {{ template "mastodon.redis.secretName" $context }}
|
||||||
key: redis-password
|
key: redis-password
|
||||||
|
- name: "SMTP_LOGIN"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "mastodon.smtp.secretName" $context }}
|
||||||
|
key: login
|
||||||
|
optional: true
|
||||||
|
- name: "SMTP_PASSWORD"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ include "mastodon.smtp.secretName" $context }}
|
||||||
|
key: password
|
||||||
{{- if (and $context.Values.mastodon.s3.enabled $context.Values.mastodon.s3.existingSecret) }}
|
{{- if (and $context.Values.mastodon.s3.enabled $context.Values.mastodon.s3.existingSecret) }}
|
||||||
- name: "AWS_SECRET_ACCESS_KEY"
|
- name: "AWS_SECRET_ACCESS_KEY"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -102,19 +114,6 @@ spec:
|
||||||
name: {{ $context.Values.mastodon.s3.existingSecret }}
|
name: {{ $context.Values.mastodon.s3.existingSecret }}
|
||||||
key: AWS_ACCESS_KEY_ID
|
key: AWS_ACCESS_KEY_ID
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $context.Values.mastodon.smtp.existingSecret }}
|
|
||||||
- name: "SMTP_LOGIN"
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ $context.Values.mastodon.smtp.existingSecret }}
|
|
||||||
key: login
|
|
||||||
optional: true
|
|
||||||
- name: "SMTP_PASSWORD"
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ $context.Values.mastodon.smtp.existingSecret }}
|
|
||||||
key: password
|
|
||||||
{{- end }}
|
|
||||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: assets
|
- name: assets
|
||||||
|
|
|
@ -74,6 +74,22 @@ spec:
|
||||||
key: redis-password
|
key: redis-password
|
||||||
- name: "PORT"
|
- name: "PORT"
|
||||||
value: {{ .Values.mastodon.web.port | quote }}
|
value: {{ .Values.mastodon.web.port | quote }}
|
||||||
|
{{- if .Values.mastodon.web.minThreads }}
|
||||||
|
- name: "MIN_THREADS"
|
||||||
|
value: {{ .Values.mastodon.web.minThreads | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.web.maxThreads }}
|
||||||
|
- name: "MAX_THREADS"
|
||||||
|
value: {{ .Values.mastodon.web.maxThreads | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.web.workers }}
|
||||||
|
- name: "WEB_CONCURRENCY"
|
||||||
|
value: {{ .Values.mastodon.web.workers | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.web.persistentTimeout }}
|
||||||
|
- name: "PERSISTENT_TIMEOUT"
|
||||||
|
value: {{ .Values.mastodon.web.persistentTimeout | quote }}
|
||||||
|
{{- end }}
|
||||||
{{- if (and .Values.mastodon.s3.enabled .Values.mastodon.s3.existingSecret) }}
|
{{- if (and .Values.mastodon.s3.enabled .Values.mastodon.s3.existingSecret) }}
|
||||||
- name: "AWS_SECRET_ACCESS_KEY"
|
- name: "AWS_SECRET_ACCESS_KEY"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -52,7 +52,7 @@ spec:
|
||||||
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- path: {{ .path }}api/v1/streaming/
|
- path: {{ .path }}api/v1/streaming
|
||||||
backend:
|
backend:
|
||||||
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
||||||
service:
|
service:
|
||||||
|
@ -64,7 +64,7 @@ spec:
|
||||||
servicePort: {{ $streamingPort }}
|
servicePort: {{ $streamingPort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
||||||
pathType: Exact
|
pathType: Prefix
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
16
templates/secret-smtp.yaml
Normal file
16
templates/secret-smtp.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{{- if not .Values.mastodon.smtp.existingSecret -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ printf "%s-smtp" (include "common.names.fullname" .) }}
|
||||||
|
labels:
|
||||||
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
{{- with .Values.mastodon.smtp.login }}
|
||||||
|
login: {{ . | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.mastodon.smtp.password }}
|
||||||
|
password: {{ . | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
29
values.yaml
29
values.yaml
|
@ -38,6 +38,8 @@ mastodon:
|
||||||
singleUserMode: false
|
singleUserMode: false
|
||||||
# -- Enables "Secure Mode" for more details see: https://docs.joinmastodon.org/admin/config/#authorized_fetch
|
# -- Enables "Secure Mode" for more details see: https://docs.joinmastodon.org/admin/config/#authorized_fetch
|
||||||
authorizedFetch: false
|
authorizedFetch: false
|
||||||
|
# -- Enables "Limited Federation Mode" for more detauls see: https://docs.joinmastodon.org/admin/config/#limited_federation_mode
|
||||||
|
limitedFederationMode: false
|
||||||
persistence:
|
persistence:
|
||||||
assets:
|
assets:
|
||||||
# -- ReadWriteOnce is more widely supported than ReadWriteMany, but limits
|
# -- ReadWriteOnce is more widely supported than ReadWriteMany, but limits
|
||||||
|
@ -63,6 +65,7 @@ mastodon:
|
||||||
endpoint: ""
|
endpoint: ""
|
||||||
hostname: ""
|
hostname: ""
|
||||||
region: ""
|
region: ""
|
||||||
|
permission: ""
|
||||||
# -- If you have a caching proxy, enter its base URL here.
|
# -- If you have a caching proxy, enter its base URL here.
|
||||||
alias_host: ""
|
alias_host: ""
|
||||||
# these must be set manually; autogenerated keys are rotated on each upgrade
|
# these must be set manually; autogenerated keys are rotated on each upgrade
|
||||||
|
@ -141,8 +144,8 @@ mastodon:
|
||||||
tls: false
|
tls: false
|
||||||
login:
|
login:
|
||||||
password:
|
password:
|
||||||
# -- you can also specify the name of an existing Secret
|
# -- Instead of defining login/password above, you can specify the name of an existing secret here. Login and
|
||||||
# with the keys login and password
|
# password must be located in keys named `login` and `password` respectively.
|
||||||
existingSecret:
|
existingSecret:
|
||||||
streaming:
|
streaming:
|
||||||
port: 4000
|
port: 4000
|
||||||
|
@ -223,12 +226,21 @@ mastodon:
|
||||||
port: http
|
port: http
|
||||||
failureThreshold: 20
|
failureThreshold: 20
|
||||||
periodSeconds: 3
|
periodSeconds: 3
|
||||||
|
# -- Puma-specific options. Below values are based on default behavior in
|
||||||
|
# config/puma.rb when no custom values are provided.
|
||||||
|
minThreads: "5"
|
||||||
|
maxThreads: "5"
|
||||||
|
workers: "2"
|
||||||
|
persistentTimeout: "20"
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
statsd:
|
statsd:
|
||||||
# -- Enable statsd publishing via STATSD_ADDR environment variable
|
# -- Enable statsd publishing via STATSD_ADDR environment variable
|
||||||
address: ""
|
address: ""
|
||||||
|
|
||||||
|
# Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements
|
||||||
|
preparedStatements: true
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
annotations:
|
annotations:
|
||||||
|
@ -297,12 +309,12 @@ redis:
|
||||||
enabled: true
|
enabled: true
|
||||||
hostname: ""
|
hostname: ""
|
||||||
port: 6379
|
port: 6379
|
||||||
|
auth:
|
||||||
# -- 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: ""
|
||||||
# you can also specify the name of an existing Secret
|
# you can also specify the name of an existing Secret
|
||||||
# with a key of redis-password set to the password you want
|
# with a key of redis-password set to the password you want
|
||||||
# auth:
|
|
||||||
# existingSecret: ""
|
# existingSecret: ""
|
||||||
|
|
||||||
# @ignored
|
# @ignored
|
||||||
|
@ -396,10 +408,11 @@ externalAuth:
|
||||||
ldap:
|
ldap:
|
||||||
enabled: false
|
enabled: false
|
||||||
# host: myservice.namespace.svc
|
# host: myservice.namespace.svc
|
||||||
# port: 389
|
# port: 636
|
||||||
# method: simple_tls
|
# method: simple_tls
|
||||||
|
# tls_no_verify: true
|
||||||
# base:
|
# base:
|
||||||
# bind_on:
|
# bind_dn:
|
||||||
# password:
|
# password:
|
||||||
# uid: cn
|
# uid: cn
|
||||||
# mail: mail
|
# mail: mail
|
||||||
|
@ -435,7 +448,11 @@ serviceAccount:
|
||||||
# set with podAnnotations will be added to all deployment-managed pods.
|
# set with podAnnotations will be added to all deployment-managed pods.
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
# -- The annotations set with jobAnnotations will be added to all job pods.
|
# If set to true, an annotation with the current chart release number will be added to all mastodon pods. This will
|
||||||
|
# cause all pods to be recreated every `helm upgrade` regardless of whether their config or spec changes.
|
||||||
|
revisionPodAnnotation: true
|
||||||
|
|
||||||
|
# The annotations set with jobAnnotations will be added to all job pods.
|
||||||
jobAnnotations: {}
|
jobAnnotations: {}
|
||||||
|
|
||||||
# -- Default resources for all Deployments and jobs unless overwritten
|
# -- Default resources for all Deployments and jobs unless overwritten
|
||||||
|
|
Loading…
Reference in New Issue
Block a user