mirror of
https://github.com/mastodon/chart
synced 2025-03-14 21:11:50 +00:00
Added custom volume mounts, additional small tweaks to match internal (#115)
This commit is contained in:
parent
97c3d1dc90
commit
5527809faf
|
@ -22,6 +22,7 @@ spec:
|
|||
type: Recreate
|
||||
{{- end }}
|
||||
replicas: {{ .replicas }}
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mastodon.selectorLabels" $context | nindent 6 }}
|
||||
|
@ -60,8 +61,8 @@ spec:
|
|||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||
volumes:
|
||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" $context }}-assets
|
||||
|
@ -75,6 +76,9 @@ spec:
|
|||
configMap:
|
||||
name: {{ .customDatabaseConfigYml.configMapRef.name }}
|
||||
{{- end }}
|
||||
{{- with $context.Values.volumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ $context.Chart.Name }}
|
||||
securityContext:
|
||||
|
@ -158,8 +162,8 @@ spec:
|
|||
name: {{ $context.Values.mastodon.cacheBuster.authToken.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||
volumeMounts:
|
||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||
- name: assets
|
||||
mountPath: /opt/mastodon/public/assets
|
||||
- name: system
|
||||
|
@ -170,6 +174,9 @@ spec:
|
|||
mountPath: /opt/mastodon/config/database.yml
|
||||
subPath: {{ .customDatabaseConfigYml.configMapRef.key }}
|
||||
{{- end }}
|
||||
{{- with $context.Values.volumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
|
||||
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||
|
|
|
@ -10,6 +10,7 @@ metadata:
|
|||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.mastodon.streaming.replicas }}
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||
|
|
|
@ -10,6 +10,7 @@ metadata:
|
|||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.mastodon.web.replicas }}
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||
|
@ -39,20 +40,23 @@ spec:
|
|||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumes:
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
{{- end }}
|
||||
{{- 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 }}
|
||||
{{- with .Values.volumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-web
|
||||
|
@ -149,8 +153,8 @@ spec:
|
|||
name: {{ .Values.mastodon.cacheBuster.authToken.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumeMounts:
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
- name: assets
|
||||
mountPath: /opt/mastodon/public/assets
|
||||
- name: system
|
||||
|
@ -161,6 +165,9 @@ spec:
|
|||
mountPath: /opt/mastodon/config/database.yml
|
||||
subPath: {{ .Values.mastodon.web.customDatabaseConfigYml.configMapRef.key }}
|
||||
{{- end }}
|
||||
{{- with .Values.volumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.mastodon.web.port }}
|
||||
|
|
70
values.yaml
70
values.yaml
|
@ -11,6 +11,9 @@ image:
|
|||
pullPolicy: IfNotPresent
|
||||
|
||||
mastodon:
|
||||
# Labels added to every Mastodon-related object
|
||||
labels: {}
|
||||
|
||||
# -- create an initial administrator user; the password is autogenerated and will
|
||||
# have to be reset
|
||||
createAdmin:
|
||||
|
@ -116,34 +119,35 @@ mastodon:
|
|||
# cpu: 250m
|
||||
# memory: 512Mi
|
||||
workers:
|
||||
- name: all-queues
|
||||
# -- Number of threads / parallel sidekiq jobs that are executed per Pod
|
||||
concurrency: 25
|
||||
# -- Number of Pod replicas deployed by the Deployment
|
||||
replicas: 1
|
||||
# -- Resources for this specific deployment to allow optimised scaling, overwrites .Values.mastodon.sidekiq.resources
|
||||
resources: {}
|
||||
# -- Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.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
|
||||
# See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument
|
||||
queues:
|
||||
- default,8
|
||||
- push,6
|
||||
- ingress,4
|
||||
- mailers,2
|
||||
- pull
|
||||
- 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: all-queues
|
||||
# -- Number of threads / parallel sidekiq jobs that are executed per Pod
|
||||
concurrency: 25
|
||||
# -- Number of Pod replicas deployed by the Deployment
|
||||
replicas: 1
|
||||
# -- Resources for this specific deployment to allow optimised scaling, overwrites .Values.mastodon.sidekiq.resources
|
||||
resources: {}
|
||||
# -- Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.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
|
||||
# See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument
|
||||
queues:
|
||||
- default,8
|
||||
- push,6
|
||||
- ingress,4
|
||||
- mailers,2
|
||||
- pull
|
||||
- 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
|
||||
# please note that we do not advise using a read-only replica for sidekiq workers
|
||||
customDatabaseConfigYml:
|
||||
configMapRef:
|
||||
name:
|
||||
key:
|
||||
#- name: push-pull
|
||||
# concurrency: 50
|
||||
# resources: {}
|
||||
|
@ -166,7 +170,7 @@ mastodon:
|
|||
ca_file: /etc/ssl/certs/ca-certificates.crt
|
||||
delivery_method: smtp
|
||||
domain:
|
||||
enable_starttls: 'auto'
|
||||
enable_starttls: "auto"
|
||||
from_address: notifications@example.com
|
||||
return_path:
|
||||
openssl_verify_mode: peer
|
||||
|
@ -293,7 +297,7 @@ ingress:
|
|||
hosts:
|
||||
- host: mastodon.local
|
||||
paths:
|
||||
- path: '/'
|
||||
- path: "/"
|
||||
tls:
|
||||
- secretName: mastodon-tls
|
||||
hosts:
|
||||
|
@ -561,3 +565,9 @@ affinity: {}
|
|||
# want to spread each deployment independently, or override topologySpreadConstraints
|
||||
# for each deployment
|
||||
topologySpreadConstraints: {}
|
||||
|
||||
# Default volume mounts for all pods
|
||||
volumeMounts: []
|
||||
|
||||
# Default volumes for all pods
|
||||
volumes: []
|
||||
|
|
Loading…
Reference in New Issue
Block a user