mirror of
https://github.com/mastodon/chart
synced 2025-05-18 13:03:21 +00:00
Merge branch 'main' into add_es_preset
This commit is contained in:
commit
935f35ac0a
|
@ -31,12 +31,22 @@ Create chart name and version as used by the chart label.
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Labels added on every Mastodon resource
|
||||||
|
*/}}
|
||||||
|
{{- define "mastodon.globalLabels" -}}
|
||||||
|
{{- range $k, $v := .Values.mastodon.labels }}
|
||||||
|
{{ $k }}: {{ quote $v }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Common labels
|
Common labels
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "mastodon.labels" -}}
|
{{- define "mastodon.labels" -}}
|
||||||
helm.sh/chart: {{ include "mastodon.chart" . }}
|
helm.sh/chart: {{ include "mastodon.chart" . }}
|
||||||
{{ include "mastodon.selectorLabels" . }}
|
{{ include "mastodon.selectorLabels" . }}
|
||||||
|
{{ include "mastodon.globalLabels" . }}
|
||||||
{{- if .Chart.AppVersion }}
|
{{- if .Chart.AppVersion }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -161,3 +171,16 @@ Find highest number of needed database connections to set DB_POOL variable
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $poolSize | quote }}
|
{{- $poolSize | quote }}
|
||||||
{{- end }}
|
{{- 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 -}}
|
||||||
|
|
54
templates/_statsd.yaml
Normal file
54
templates/_statsd.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{{/*
|
||||||
|
The exporter container attached to every Mastodon pod
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- define "mastodon.statsdExporterContainer" }}
|
||||||
|
{{- with .Values.mastodon.metrics.statsd }}
|
||||||
|
{{- if and .exporter.enabled (not .address) }}
|
||||||
|
- name: statsd-exporter
|
||||||
|
image: prom/statsd-exporter
|
||||||
|
args:
|
||||||
|
- "--statsd.mapping-config=/statsd-mappings/mastodon.yml"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "0.1"
|
||||||
|
memory: "180M"
|
||||||
|
limits:
|
||||||
|
cpu: "0.5"
|
||||||
|
memory: "250M"
|
||||||
|
ports:
|
||||||
|
- name: statsd
|
||||||
|
containerPort: {{ .exporter.port }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: statsd-mappings
|
||||||
|
mountPath: /statsd-mappings
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
The volume needed for the container above
|
||||||
|
*/}}
|
||||||
|
{{- define "mastodon.statsdExporterVolume" }}
|
||||||
|
{{- with .Values.mastodon.metrics.statsd }}
|
||||||
|
{{- if and .exporter.enabled (not .address) }}
|
||||||
|
- name: statsd-mappings
|
||||||
|
configMap:
|
||||||
|
name: {{ include "mastodon.fullname" $ }}-statsd-mappings
|
||||||
|
items:
|
||||||
|
- key: mastodon-statsd-mappings.yml
|
||||||
|
path: mastodon.yml
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Labels added to every statsd_exporter-enabled pod
|
||||||
|
*/}}
|
||||||
|
{{- define "mastodon.statsdExporterLabels" }}
|
||||||
|
{{- with .Values.mastodon.metrics.statsd }}
|
||||||
|
{{- if and .exporter.enabled (not .address) }}
|
||||||
|
mastodon/statsd-exporter: "true"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -15,13 +15,31 @@ 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 }}
|
||||||
|
{{- if .Values.postgresql.readReplica.hostname }}
|
||||||
|
REPLICA_DB_HOST: {{ .Values.postgresql.readReplica.hostname }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.postgresql.readReplica.port }}
|
||||||
|
REPLICA_DB_PORT: {{ .Values.postgresql.readReplica.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.postgresql.readReplica.auth.database }}
|
||||||
|
REPLICA_DB_NAME: {{ .Values.postgresql.readReplica.auth.database }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.postgresql.readReplica.auth.username }}
|
||||||
|
REPLICA_DB_USER: {{ .Values.postgresql.readReplica.auth.username }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.postgresql.readReplica.auth.password }}
|
||||||
|
REPLICA_DB_PASS: {{ .Values.postgresql.readReplica.auth.password }}
|
||||||
|
{{- end }}
|
||||||
PREPARED_STATEMENTS: {{ .Values.mastodon.preparedStatements | quote }}
|
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"
|
||||||
ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl
|
|
||||||
ES_PORT: "9200"
|
|
||||||
ES_PRESET: {{ .Values.elasticsearch.preset | default "single_node_cluster" | quote }}
|
ES_PRESET: {{ .Values.elasticsearch.preset | default "single_node_cluster" | quote }}
|
||||||
|
ES_HOST: {{ include "mastodon.elasticsearch.fullHostname" .}}
|
||||||
|
ES_PORT: {{ .Values.elasticsearch.port | default "9200" | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.elasticsearch.user }}
|
||||||
|
ES_USER: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }}
|
LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }}
|
||||||
{{- with .Values.mastodon.web_domain }}
|
{{- with .Values.mastodon.web_domain }}
|
||||||
|
@ -326,6 +344,31 @@ data:
|
||||||
LDAP_UID_CONVERSION_REPLACE: {{ . }}
|
LDAP_UID_CONVERSION_REPLACE: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.mastodon.metrics.statsd.address }}
|
{{- if .Values.mastodon.metrics.statsd.address }}
|
||||||
STATSD_ADDR: {{ . }}
|
STATSD_ADDR: {{ .Values.mastodon.metrics.statsd.address }}
|
||||||
|
{{- else if .Values.mastodon.metrics.statsd.exporter.enabled }}
|
||||||
|
STATSD_ADDR: localhost:9125
|
||||||
|
{{- end }}
|
||||||
|
{{- range $k, $v := .Values.mastodon.extraEnvVars }}
|
||||||
|
{{ $k }}: {{ quote $v }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.mastodon.deepl.enabled }}
|
||||||
|
DEEPL_PLAN: {{ .Values.mastodon.deepl.plan }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.mastodon.hcaptcha.enabled }}
|
||||||
|
HCAPTCHA_SITE_KEY: {{ .Values.mastodon.hcaptcha.siteId }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.mastodon.cacheBuster.enabled }}
|
||||||
|
CACHE_BUSTER_ENABLED: "true"
|
||||||
|
{{- if .Values.mastodon.cacheBuster.httpMethod }}
|
||||||
|
CACHE_BUSTER_HTTP_METHOD: {{ .Values.mastodon.cacheBuster.httpMethod }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.cacheBuster.authHeader }}
|
||||||
|
CACHE_BUSTER_SECRET_HEADER: {{ .Values.mastodon.cacheBuster.authHeader }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
CACHE_BUSTER_ENABLED: "false"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -65,6 +65,13 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.redis.secretName" . }}
|
name: {{ template "mastodon.redis.secretName" . }}
|
||||||
key: redis-password
|
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"
|
- name: "PORT"
|
||||||
value: {{ .Values.mastodon.web.port | quote }}
|
value: {{ .Values.mastodon.web.port | quote }}
|
||||||
{{- if (and .Values.mastodon.s3.enabled .Values.mastodon.s3.existingSecret) }}
|
{{- if (and .Values.mastodon.s3.enabled .Values.mastodon.s3.existingSecret) }}
|
||||||
|
|
|
@ -37,7 +37,9 @@ spec:
|
||||||
{{- 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 }}
|
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "mastodon.globalLabels" $context | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
||||||
|
{{- include "mastodon.statsdExporterLabels" $context | nindent 8 }}
|
||||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||||
app.kubernetes.io/part-of: rails
|
app.kubernetes.io/part-of: rails
|
||||||
spec:
|
spec:
|
||||||
|
@ -54,6 +56,10 @@ spec:
|
||||||
affinity:
|
affinity:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with (default (default $context.Values.topologySpreadConstraints $context.Values.mastodon.sidekiq.topologySpreadConstraints) .topologySpreadConstraints) }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: assets
|
- name: assets
|
||||||
|
@ -63,11 +69,17 @@ spec:
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ template "mastodon.fullname" $context }}-system
|
claimName: {{ template "mastodon.fullname" $context }}-system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- include "mastodon.statsdExporterVolume" $ | indent 8 }}
|
||||||
|
{{- if dig "customDatabaseConfigYml" "configMapRef" "name" false . }}
|
||||||
|
- name: config-database-yml
|
||||||
|
configMap:
|
||||||
|
name: {{ .customDatabaseConfigYml.configMapRef.name }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $context.Chart.Name }}
|
- name: {{ $context.Chart.Name }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml $context.Values.mastodon.sidekiq.securityContext | nindent 12 }}
|
{{- toYaml $context.Values.mastodon.sidekiq.securityContext | nindent 12 }}
|
||||||
image: "{{ $context.Values.image.repository }}:{{ $context.Values.image.tag | default $context.Chart.AppVersion }}"
|
image: "{{ coalesce (dig "image" "repository" false .) $context.Values.image.repository }}:{{ coalesce (dig "image" "tag" false .) $context.Values.image.tag $context.Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ $context.Values.image.pullPolicy }}
|
imagePullPolicy: {{ $context.Values.image.pullPolicy }}
|
||||||
command:
|
command:
|
||||||
- bundle
|
- bundle
|
||||||
|
@ -90,11 +102,25 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.postgresql.secretName" $context }}
|
name: {{ template "mastodon.postgresql.secretName" $context }}
|
||||||
key: password
|
key: password
|
||||||
|
{{- if $context.Values.postgresql.readReplica.auth.existingSecret }}
|
||||||
|
- name: "REPLICA_DB_PASS"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ $context.Values.postgresql.readReplica.auth.existingSecret }}
|
||||||
|
key: password
|
||||||
|
{{- end }}
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.redis.secretName" $context }}
|
name: {{ template "mastodon.redis.secretName" $context }}
|
||||||
key: redis-password
|
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"
|
- name: "SMTP_LOGIN"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
@ -118,6 +144,20 @@ 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 and $context.Values.mastodon.deepl.enabled }}
|
||||||
|
- name: "DEEPL_API_KEY"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ $context.Values.mastodon.deepl.apiKeySecretRef.name }}
|
||||||
|
key: {{ $context.Values.mastodon.deepl.apiKeySecretRef.key }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and $context.Values.mastodon.cacheBuster.enabled $context.Values.mastodon.cacheBuster.authToken.existingSecret }}
|
||||||
|
- name: CACHE_BUSTER_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ $context.Values.mastodon.cacheBuster.authToken.existingSecret }}
|
||||||
|
key: password
|
||||||
|
{{- end }}
|
||||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: assets
|
- name: assets
|
||||||
|
@ -125,8 +165,14 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
mountPath: /opt/mastodon/public/system
|
mountPath: /opt/mastodon/public/system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if dig "customDatabaseConfigYml" "configMapRef" "name" false . }}
|
||||||
|
- name: config-database-yml
|
||||||
|
mountPath: /opt/mastodon/config/database.yml
|
||||||
|
subPath: {{ .customDatabaseConfigYml.configMapRef.key }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
|
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
|
||||||
|
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||||
{{- with $context.Values.nodeSelector }}
|
{{- with $context.Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
|
@ -23,6 +23,7 @@ spec:
|
||||||
# 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" . | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||||
app.kubernetes.io/component: streaming
|
app.kubernetes.io/component: streaming
|
||||||
spec:
|
spec:
|
||||||
|
@ -41,7 +42,7 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
image: "{{ coalesce .Values.mastodon.streaming.image.repository .Values.image.repository }}:{{ coalesce .Values.mastodon.streaming.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
command:
|
command:
|
||||||
- node
|
- node
|
||||||
|
@ -55,6 +56,13 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.postgresql.secretName" . }}
|
name: {{ template "mastodon.postgresql.secretName" . }}
|
||||||
key: password
|
key: password
|
||||||
|
{{- if .Values.postgresql.readReplica.auth.existingSecret }}
|
||||||
|
- name: "REPLICA_DB_PASS"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.postgresql.readReplica.auth.existingSecret }}
|
||||||
|
key: password
|
||||||
|
{{- end }}
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
@ -86,6 +94,10 @@ spec:
|
||||||
affinity:
|
affinity:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with (default .Values.topologySpreadConstraints .Values.mastodon.streaming.topologySpreadConstraints) }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.tolerations }}
|
{{- with .Values.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
|
@ -24,7 +24,9 @@ spec:
|
||||||
# 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" . | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" . | nindent 8 }}
|
||||||
labels:
|
labels:
|
||||||
|
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- include "mastodon.statsdExporterLabels" . | nindent 8 }}
|
||||||
app.kubernetes.io/component: web
|
app.kubernetes.io/component: web
|
||||||
app.kubernetes.io/part-of: rails
|
app.kubernetes.io/part-of: rails
|
||||||
spec:
|
spec:
|
||||||
|
@ -45,6 +47,12 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ template "mastodon.fullname" . }}-system
|
claimName: {{ template "mastodon.fullname" . }}-system
|
||||||
|
{{- include "mastodon.statsdExporterVolume" $ | indent 8 }}
|
||||||
|
{{- if .Values.mastodon.web.customDatabaseConfigYml.configMapRef.name }}
|
||||||
|
- name: config-database-yml
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.mastodon.web.customDatabaseConfigYml.configMapRef.name }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}-web
|
- name: {{ .Chart.Name }}-web
|
||||||
|
@ -52,7 +60,7 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
image: "{{ coalesce .Values.mastodon.web.image.repository .Values.image.repository }}:{{ coalesce .Values.mastodon.web.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
command:
|
command:
|
||||||
- bundle
|
- bundle
|
||||||
|
@ -71,11 +79,25 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.postgresql.secretName" . }}
|
name: {{ template "mastodon.postgresql.secretName" . }}
|
||||||
key: password
|
key: password
|
||||||
|
{{- if .Values.postgresql.readReplica.auth.existingSecret }}
|
||||||
|
- name: "REPLICA_DB_PASS"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.postgresql.readReplica.auth.existingSecret}}
|
||||||
|
key: password
|
||||||
|
{{- end }}
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.redis.secretName" . }}
|
name: {{ template "mastodon.redis.secretName" . }}
|
||||||
key: redis-password
|
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"
|
- name: "PORT"
|
||||||
value: {{ .Values.mastodon.web.port | quote }}
|
value: {{ .Values.mastodon.web.port | quote }}
|
||||||
{{- if .Values.mastodon.web.minThreads }}
|
{{- if .Values.mastodon.web.minThreads }}
|
||||||
|
@ -106,6 +128,27 @@ spec:
|
||||||
name: {{ .Values.mastodon.s3.existingSecret }}
|
name: {{ .Values.mastodon.s3.existingSecret }}
|
||||||
key: AWS_ACCESS_KEY_ID
|
key: AWS_ACCESS_KEY_ID
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.deepl.enabled }}
|
||||||
|
- name: "DEEPL_API_KEY"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.mastodon.deepl.apiKeySecretRef.name }}
|
||||||
|
key: {{ .Values.mastodon.deepl.apiKeySecretRef.key }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.hcaptcha.enabled }}
|
||||||
|
- name: "HCAPTCHA_SECRET_KEY"
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.mastodon.hcaptcha.secretKeySecretRef.name }}
|
||||||
|
key: {{ .Values.mastodon.hcaptcha.secretKeySecretRef.key }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.mastodon.cacheBuster.enabled .Values.mastodon.cacheBuster.authToken.existingSecret }}
|
||||||
|
- name: CACHE_BUSTER_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.mastodon.cacheBuster.authToken.existingSecret }}
|
||||||
|
key: password
|
||||||
|
{{- end }}
|
||||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: assets
|
- name: assets
|
||||||
|
@ -113,6 +156,11 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
mountPath: /opt/mastodon/public/system
|
mountPath: /opt/mastodon/public/system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.web.customDatabaseConfigYml.configMapRef.name }}
|
||||||
|
- name: config-database-yml
|
||||||
|
mountPath: /opt/mastodon/config/database.yml
|
||||||
|
subPath: {{ .Values.mastodon.web.customDatabaseConfigYml.configMapRef.key }}
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.mastodon.web.port }}
|
containerPort: {{ .Values.mastodon.web.port }}
|
||||||
|
@ -134,6 +182,7 @@ spec:
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
@ -142,6 +191,10 @@ spec:
|
||||||
affinity:
|
affinity:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with (default .Values.topologySpreadConstraints .Values.mastodon.web.topologySpreadConstraints) }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.tolerations }}
|
{{- with .Values.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
57
templates/ingress-streaming.yml
Normal file
57
templates/ingress-streaming.yml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{{- if .Values.ingress.streaming.enabled -}}
|
||||||
|
{{- $fullName := include "mastodon.fullname" . -}}
|
||||||
|
{{- $webPort := .Values.mastodon.web.port -}}
|
||||||
|
{{- $streamingPort := .Values.mastodon.streaming.port -}}
|
||||||
|
{{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ $fullName }}-streaming
|
||||||
|
labels:
|
||||||
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.ingress.streaming.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.streaming.ingressClassName }}
|
||||||
|
ingressClassName: {{ .Values.ingress.streaming.ingressClassName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.ingress.streaming.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.streaming.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.streaming.hosts }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ .path }}api/v1/streaming
|
||||||
|
backend:
|
||||||
|
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}-streaming
|
||||||
|
port:
|
||||||
|
number: {{ $streamingPort }}
|
||||||
|
{{- else }}
|
||||||
|
serviceName: {{ $fullName }}-streaming
|
||||||
|
servicePort: {{ $streamingPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
||||||
|
pathType: Prefix
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -52,6 +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 }}
|
||||||
|
{{- if not $.Values.ingress.streaming.enabled }}
|
||||||
- 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")) }}
|
||||||
|
@ -67,5 +68,6 @@ spec:
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if .Values.mastodon.hooks.assetsPrecompile.enabled -}}
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -75,3 +76,4 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
mountPath: /opt/mastodon/public/system
|
mountPath: /opt/mastodon/public/system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -67,6 +67,13 @@ spec:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ template "mastodon.redis.secretName" . }}
|
name: {{ template "mastodon.redis.secretName" . }}
|
||||||
key: redis-password
|
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"
|
- name: "PORT"
|
||||||
value: {{ .Values.mastodon.web.port | quote }}
|
value: {{ .Values.mastodon.web.port | quote }}
|
||||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if .Values.mastodon.hooks.dbMigrate.enabled -}}
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -75,3 +76,4 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
mountPath: /opt/mastodon/public/system
|
mountPath: /opt/mastodon/public/system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -7,7 +7,7 @@ metadata:
|
||||||
{{- include "mastodon.labels" . | nindent 4 }}
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- {{ .Values.mastodon.persistence.system.accessMode }}
|
- {{ .Values.mastodon.persistence.assets.accessMode }}
|
||||||
{{- with .Values.mastodon.persistence.assets.resources }}
|
{{- with .Values.mastodon.persistence.assets.resources }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
|
|
107
templates/statsd-exporter-mappings.yaml
Normal file
107
templates/statsd-exporter-mappings.yaml
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
{{- if and .Values.mastodon.metrics.statsd.exporter.enabled (not .Values.mastodon.metrics.statsd.address) }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "mastodon.fullname" . }}-statsd-mappings
|
||||||
|
labels:
|
||||||
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
mastodon-statsd-mappings.yml: |-
|
||||||
|
## From https://ipng.ch/assets/mastodon/statsd-mapping.yaml
|
||||||
|
## Prometheus Statsd Exporter mapping for Mastodon 4.0+
|
||||||
|
##
|
||||||
|
## Version 1.0, November 2022
|
||||||
|
##
|
||||||
|
## Documentation: https://ipng.ch/s/articles/2022/11/27/mastodon-3.html
|
||||||
|
|
||||||
|
mappings:
|
||||||
|
## Web collector
|
||||||
|
- match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.status\.(.+)
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_controller_status"
|
||||||
|
labels:
|
||||||
|
controller: $1
|
||||||
|
action: $2
|
||||||
|
format: $3
|
||||||
|
status: $4
|
||||||
|
mastodon: "web"
|
||||||
|
- match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.db_time
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_controller_db_time"
|
||||||
|
labels:
|
||||||
|
controller: $1
|
||||||
|
action: $2
|
||||||
|
format: $3
|
||||||
|
mastodon: "web"
|
||||||
|
- match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.view_time
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_controller_view_time"
|
||||||
|
labels:
|
||||||
|
controller: $1
|
||||||
|
action: $2
|
||||||
|
format: $3
|
||||||
|
mastodon: "web"
|
||||||
|
- match: Mastodon\.production\.web\.(.+)\.(.+)\.(.+)\.total_duration
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_controller_duration"
|
||||||
|
labels:
|
||||||
|
controller: $1
|
||||||
|
action: $2
|
||||||
|
format: $3
|
||||||
|
mastodon: "web"
|
||||||
|
|
||||||
|
## Database collector
|
||||||
|
- match: Mastodon\.production\.db\.tables\.(.+)\.queries\.(.+)\.duration
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_db_operation"
|
||||||
|
labels:
|
||||||
|
table: "$1"
|
||||||
|
operation: "$2"
|
||||||
|
mastodon: "db"
|
||||||
|
|
||||||
|
## Cache collector
|
||||||
|
- match: Mastodon\.production\.cache\.(.+)\.duration
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_cache_duration"
|
||||||
|
labels:
|
||||||
|
operation: "$1"
|
||||||
|
mastodon: "cache"
|
||||||
|
|
||||||
|
## Sidekiq collector
|
||||||
|
- match: Mastodon\.production\.sidekiq\.(.+)\.processing_time
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_sidekiq_worker_processing_time"
|
||||||
|
labels:
|
||||||
|
worker: "$1"
|
||||||
|
mastodon: "sidekiq"
|
||||||
|
- match: Mastodon\.production\.sidekiq\.(.+)\.success
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_sidekiq_worker_success_total"
|
||||||
|
labels:
|
||||||
|
worker: "$1"
|
||||||
|
mastodon: "sidekiq"
|
||||||
|
- match: Mastodon\.production\.sidekiq\.(.+)\.failure
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_sidekiq_worker_failure_total"
|
||||||
|
labels:
|
||||||
|
worker: "$1"
|
||||||
|
mastodon: "sidekiq"
|
||||||
|
- match: Mastodon\.production\.sidekiq\.queues\.(.+)\.enqueued
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_sidekiq_queue_enqueued"
|
||||||
|
labels:
|
||||||
|
queue: "$1"
|
||||||
|
mastodon: "sidekiq"
|
||||||
|
- match: Mastodon\.production\.sidekiq\.queues\.(.+)\.latency
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_sidekiq_queue_latency"
|
||||||
|
labels:
|
||||||
|
queue: "$1"
|
||||||
|
mastodon: "sidekiq"
|
||||||
|
- match: Mastodon\.production\.sidekiq\.(.+)
|
||||||
|
match_type: regex
|
||||||
|
name: "mastodon_sidekiq_$1"
|
||||||
|
labels:
|
||||||
|
mastodon: "sidekiq"
|
||||||
|
|
||||||
|
{{- end }}
|
118
values.yaml
118
values.yaml
|
@ -20,6 +20,13 @@ mastodon:
|
||||||
username: not_gargron
|
username: not_gargron
|
||||||
# @ignored
|
# @ignored
|
||||||
email: not@example.com
|
email: not@example.com
|
||||||
|
hooks:
|
||||||
|
dbMigrate:
|
||||||
|
enabled: true
|
||||||
|
assetsPrecompile:
|
||||||
|
enabled: true
|
||||||
|
# Custom labels to add to kubernetes resources
|
||||||
|
#labels:
|
||||||
cron:
|
cron:
|
||||||
# -- run `tootctl media remove` every week
|
# -- run `tootctl media remove` every week
|
||||||
removeMedia:
|
removeMedia:
|
||||||
|
@ -68,6 +75,18 @@ mastodon:
|
||||||
permission: ""
|
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: ""
|
||||||
|
deepl:
|
||||||
|
enabled: false
|
||||||
|
plan:
|
||||||
|
apiKeySecretRef:
|
||||||
|
name:
|
||||||
|
key:
|
||||||
|
hcaptcha:
|
||||||
|
enabled: false
|
||||||
|
siteId:
|
||||||
|
secretKeySecretRef:
|
||||||
|
name:
|
||||||
|
key:
|
||||||
# these must be set manually; autogenerated keys are rotated on each upgrade
|
# these must be set manually; autogenerated keys are rotated on each upgrade
|
||||||
secrets:
|
secrets:
|
||||||
secret_key_base: ""
|
secret_key_base: ""
|
||||||
|
@ -88,6 +107,8 @@ mastodon:
|
||||||
resources: {}
|
resources: {}
|
||||||
# -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity
|
# -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Topology spread constraints for Sidekiq Pods, overwrites .Values.topologySpreadConstraints
|
||||||
|
topologySpreadConstraints: {}
|
||||||
# limits:
|
# limits:
|
||||||
# cpu: "1"
|
# cpu: "1"
|
||||||
# memory: 768Mi
|
# memory: 768Mi
|
||||||
|
@ -104,6 +125,8 @@ mastodon:
|
||||||
resources: {}
|
resources: {}
|
||||||
# -- Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity
|
# -- Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Topology spread constraints for this specific deployment, overwrites .Values.topologySpreadConstraints and .Values.mastodon.sidekiq.topologySpreadConstraints
|
||||||
|
topologySpreadConstraints: {}
|
||||||
# -- Sidekiq queues for Mastodon that are handled by this worker. See https://docs.joinmastodon.org/admin/scaling/#concurrency
|
# -- Sidekiq queues for Mastodon that are handled by this worker. See https://docs.joinmastodon.org/admin/scaling/#concurrency
|
||||||
# See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument
|
# See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument
|
||||||
queues:
|
queues:
|
||||||
|
@ -113,6 +136,14 @@ mastodon:
|
||||||
- mailers,2
|
- mailers,2
|
||||||
- pull
|
- pull
|
||||||
- scheduler # Make sure the scheduler queue only exists once and with a worker that has 1 replica.
|
- scheduler # Make sure the scheduler queue only exists once and with a worker that has 1 replica.
|
||||||
|
image:
|
||||||
|
repository:
|
||||||
|
tag:
|
||||||
|
# allows you to mount a custom database.yml from a configmap
|
||||||
|
customDatabaseConfigYml:
|
||||||
|
configMapRef:
|
||||||
|
name:
|
||||||
|
key:
|
||||||
#- name: push-pull
|
#- name: push-pull
|
||||||
# concurrency: 50
|
# concurrency: 50
|
||||||
# resources: {}
|
# resources: {}
|
||||||
|
@ -149,6 +180,9 @@ mastodon:
|
||||||
# password must be located in keys named `login` and `password` respectively.
|
# password must be located in keys named `login` and `password` respectively.
|
||||||
existingSecret:
|
existingSecret:
|
||||||
streaming:
|
streaming:
|
||||||
|
image:
|
||||||
|
repository:
|
||||||
|
tag:
|
||||||
port: 4000
|
port: 4000
|
||||||
# -- this should be set manually since os.cpus() returns the number of CPUs on
|
# -- this should be set manually since os.cpus() returns the number of CPUs on
|
||||||
# the node running the pod, which is unrelated to the resources allocated to
|
# the node running the pod, which is unrelated to the resources allocated to
|
||||||
|
@ -161,6 +195,8 @@ mastodon:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Topology spread constraints for Streaming Pods, overwrites .Values.topologySpreadConstraints
|
||||||
|
topologySpreadConstraints: {}
|
||||||
# -- Pod Security Context for Streaming Pods, overwrites .Values.podSecurityContext
|
# -- Pod Security Context for Streaming Pods, overwrites .Values.podSecurityContext
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
# -- (Streaming Container) Security Context for Streaming Pods, overwrites .Values.securityContext
|
# -- (Streaming Container) Security Context for Streaming Pods, overwrites .Values.securityContext
|
||||||
|
@ -179,6 +215,8 @@ mastodon:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# -- Affinity for Web Pods, overwrites .Values.affinity
|
# -- Affinity for Web Pods, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Topology spread constraints for Web Pods, overwrites .Values.topologySpreadConstraints
|
||||||
|
topologySpreadConstraints: {}
|
||||||
# -- Pod Security Context for Web Pods, overwrites .Values.podSecurityContext
|
# -- Pod Security Context for Web Pods, overwrites .Values.podSecurityContext
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
# -- (Web Container) Security Context for Web Pods, overwrites .Values.securityContext
|
# -- (Web Container) Security Context for Web Pods, overwrites .Values.securityContext
|
||||||
|
@ -197,15 +235,44 @@ mastodon:
|
||||||
maxThreads: "5"
|
maxThreads: "5"
|
||||||
workers: "2"
|
workers: "2"
|
||||||
persistentTimeout: "20"
|
persistentTimeout: "20"
|
||||||
|
image:
|
||||||
|
repository:
|
||||||
|
tag:
|
||||||
|
# allows you to mount a custom database.yml from a configmap
|
||||||
|
# for example if you want to use a read-only replica
|
||||||
|
customDatabaseConfigYml:
|
||||||
|
configMapRef:
|
||||||
|
name:
|
||||||
|
key:
|
||||||
|
|
||||||
|
# HTTP cache buster configuration.
|
||||||
|
# See the documentation for more information about this feature:
|
||||||
|
# https://docs.joinmastodon.org/admin/config/#http-cache-buster
|
||||||
|
cacheBuster:
|
||||||
|
enabled: false
|
||||||
|
httpMethod: "GET"
|
||||||
|
# If the cache service requires authentication, specify the header name and
|
||||||
|
# secret/token here.
|
||||||
|
authHeader:
|
||||||
|
authToken:
|
||||||
|
existingSecret:
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
statsd:
|
statsd:
|
||||||
# -- Enable statsd publishing via STATSD_ADDR environment variable
|
# -- Enable statsd publishing via STATSD_ADDR environment variable
|
||||||
address: ""
|
address: ""
|
||||||
|
# -- Alternatively, you can use this to have a statsd_exporter sidecar container running along all Mastodon containers and exposing metrics in OpenMetric/Prometheus format on each pod
|
||||||
|
# Please note the exporter will not be enabled if metrics.statsd.address is not empty
|
||||||
|
exporter:
|
||||||
|
enabled: false
|
||||||
|
port: 9102
|
||||||
|
|
||||||
# Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements
|
# Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements
|
||||||
preparedStatements: true
|
preparedStatements: true
|
||||||
|
|
||||||
|
# Additional env vars defined in all pods
|
||||||
|
extraEnvVars: {}
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
annotations:
|
annotations:
|
||||||
|
@ -232,19 +299,47 @@ ingress:
|
||||||
hosts:
|
hosts:
|
||||||
- mastodon.local
|
- mastodon.local
|
||||||
|
|
||||||
|
# This allows you to have a separate ingress for streaming
|
||||||
|
# When enabled, the main ingress will no longer handle streaming requests.
|
||||||
|
# You will also need to configure mastodon.streaming.base_url accordingly
|
||||||
|
streaming:
|
||||||
|
enabled: false
|
||||||
|
annotations:
|
||||||
|
ingressClassName:
|
||||||
|
hosts:
|
||||||
|
- host: streaming.mastodon.local
|
||||||
|
paths:
|
||||||
|
- path: "/"
|
||||||
|
tls:
|
||||||
|
- secretName: mastodon-tls
|
||||||
|
hosts:
|
||||||
|
- streaming.mastodon.local
|
||||||
|
|
||||||
# -- https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters
|
# -- https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters
|
||||||
elasticsearch:
|
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
|
# if you enable ES after the initial install, you will need to manually run
|
||||||
# RAILS_ENV=production bundle exec rake chewy:sync
|
# RAILS_ENV=production bundle exec rake chewy:sync
|
||||||
# (https://docs.joinmastodon.org/admin/optional/elasticsearch/)
|
# (https://docs.joinmastodon.org/admin/optional/elasticsearch/)
|
||||||
# @ignored
|
|
||||||
enabled: true
|
enabled: true
|
||||||
# @ignored
|
# @ignored
|
||||||
image:
|
image:
|
||||||
tag: 7
|
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
|
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
|
||||||
postgresql:
|
postgresql:
|
||||||
# -- disable if you want to use an existing db; in which case the values below
|
# -- disable if you want to use an existing db; in which case the values below
|
||||||
|
@ -267,6 +362,19 @@ postgresql:
|
||||||
# with a key of password set to the password you want
|
# with a key of password set to the password you want
|
||||||
existingSecret: ""
|
existingSecret: ""
|
||||||
|
|
||||||
|
# Options for a read-only replica.
|
||||||
|
# If enabled, mastodon uses existing defaults for postgres for these values as well.
|
||||||
|
# Documentation for more information on this feature:
|
||||||
|
# https://docs.joinmastodon.org/admin/scaling/#read-replicas
|
||||||
|
readReplica:
|
||||||
|
hostname:
|
||||||
|
port:
|
||||||
|
auth:
|
||||||
|
database:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
existingSecret:
|
||||||
|
|
||||||
# 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
|
# disable if you want to use an existing redis instance; in which case the
|
||||||
|
@ -445,3 +553,9 @@ tolerations: []
|
||||||
|
|
||||||
# -- Affinity for all pods unless overwritten
|
# -- Affinity for all pods unless overwritten
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
|
||||||
|
# -- Topology Spread Constraints for all pods unless overwritten
|
||||||
|
# Please note that you need to use `matchLabelKeys` (Kubernetes 1.25+) if you
|
||||||
|
# want to spread each deployment independently, or override topologySpreadConstraints
|
||||||
|
# for each deployment
|
||||||
|
topologySpreadConstraints: {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user