mirror of
https://github.com/mastodon/chart
synced 2025-05-18 04:53:21 +00:00
Allow custom nodeSelector for each resource
This commit is contained in:
parent
4b6fd9f7e6
commit
740ed27cc3
|
@ -8,5 +8,5 @@ dependencies:
|
|||
- name: redis
|
||||
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
|
||||
version: 16.13.2
|
||||
digest: sha256:17ea58a3264aa22faff18215c4269f47dabae956d0df273c684972f356416193
|
||||
generated: "2022-08-08T21:44:18.0195364+02:00"
|
||||
digest: sha256:8be2c8069d65f295d0079bdda67c45691370f7bef73393c2e80eedbdd748b9af
|
||||
generated: "2023-09-29T16:46:40.462499+02:00"
|
||||
|
|
|
@ -20,7 +20,7 @@ version: 4.0.0
|
|||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: v4.0.2
|
||||
appVersion: v4.2.0
|
||||
|
||||
dependencies:
|
||||
- name: elasticsearch
|
||||
|
|
|
@ -86,4 +86,8 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.cron.removeMedia.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ .Values.mastodon.cron.removeMedia.nodeSelector | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -35,7 +35,7 @@ spec:
|
|||
{{- end }}
|
||||
# roll the pods to pick up any db migrations or other changes
|
||||
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
||||
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||
checksum/config-secrets-smtp: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||
labels:
|
||||
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||
|
@ -127,9 +127,9 @@ spec:
|
|||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
|
||||
{{- with $context.Values.nodeSelector }}
|
||||
{{- if $context.Values.mastodon.sidekiq.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- $context.Values.mastodon.sidekiq.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $context.Values.tolerations }}
|
||||
tolerations:
|
||||
|
|
|
@ -78,9 +78,9 @@ spec:
|
|||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
{{- if .Values.mastodon.streaming.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{ .Values.mastodon.streaming.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (default .Values.affinity .Values.mastodon.streaming.affinity) }}
|
||||
affinity:
|
||||
|
|
|
@ -134,9 +134,9 @@ spec:
|
|||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
{{- if .Values.mastodon.web.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{ .Values.mastodon.web.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (default .Values.affinity .Values.mastodon.web.affinity) }}
|
||||
affinity:
|
||||
|
|
|
@ -75,3 +75,7 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.assetsPrecompile.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ .Values.mastodon.assetsPrecompile.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -76,4 +76,8 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.chewyUpgrade.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ .Values.mastodon.chewyUpgrade.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -81,4 +81,8 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.createAdmin.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ .Values.mastodon.createAdmin.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -75,3 +75,8 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
|
||||
{{ if .Values.mastodon.dbMigrate.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ .Values.mastodon.dbMigrate.nodeSelector | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
|
|
106
values.yaml
106
values.yaml
|
@ -20,6 +20,9 @@ mastodon:
|
|||
username: not_gargron
|
||||
# @ignored
|
||||
email: not@example.com
|
||||
|
||||
# Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
cron:
|
||||
# -- run `tootctl media remove` every week
|
||||
removeMedia:
|
||||
|
@ -27,7 +30,10 @@ mastodon:
|
|||
enabled: true
|
||||
# @ignored
|
||||
schedule: "0 0 * * 0"
|
||||
# -- available locales: https://github.com/mastodon/mastodon/blob/main/config/application.rb#L71
|
||||
|
||||
# Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
# -- available locales: https://github.com/mastodon/mastodon/blob/main/config/application.rb#L71
|
||||
locale: en
|
||||
local_domain: mastodon.local
|
||||
# -- Use of WEB_DOMAIN requires careful consideration: https://docs.joinmastodon.org/admin/config/#federation
|
||||
|
@ -94,25 +100,30 @@ mastodon:
|
|||
# requests:
|
||||
# cpu: 250m
|
||||
# memory: 512Mi
|
||||
# Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
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: {}
|
||||
# -- 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.
|
||||
- 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: {}
|
||||
|
||||
# -- Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
# -- 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.
|
||||
#- name: push-pull
|
||||
# concurrency: 50
|
||||
# resources: {}
|
||||
|
@ -135,7 +146,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
|
||||
|
@ -173,6 +184,9 @@ mastodon:
|
|||
# requests:
|
||||
# cpu: 250m
|
||||
# memory: 128Mi
|
||||
|
||||
# -- Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
web:
|
||||
port: 3000
|
||||
# -- Number of Web Pods running
|
||||
|
@ -191,13 +205,30 @@ mastodon:
|
|||
# requests:
|
||||
# cpu: 250m
|
||||
# memory: 768Mi
|
||||
|
||||
# -- Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
|
||||
# -- 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"
|
||||
|
||||
assetsPrecompile:
|
||||
# Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
|
||||
chewyUpgrade:
|
||||
# Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
|
||||
dbMigrate:
|
||||
# Node(s) on which we will deploy this resource
|
||||
nodeSelector: {}
|
||||
|
||||
metrics:
|
||||
statsd:
|
||||
# -- Enable statsd publishing via STATSD_ADDR environment variable
|
||||
|
@ -226,7 +257,7 @@ ingress:
|
|||
hosts:
|
||||
- host: mastodon.local
|
||||
paths:
|
||||
- path: '/'
|
||||
- path: "/"
|
||||
tls:
|
||||
- secretName: mastodon-tls
|
||||
hosts:
|
||||
|
@ -245,6 +276,18 @@ elasticsearch:
|
|||
image:
|
||||
tag: 7
|
||||
|
||||
# -- Node(s) on which we will deploy this resource
|
||||
master:
|
||||
nodeSelector: {}
|
||||
data:
|
||||
nodeSelector: {}
|
||||
coordinating:
|
||||
nodeSelector: {}
|
||||
ingest:
|
||||
nodeSelector: {}
|
||||
metrics:
|
||||
nodeSelector: {}
|
||||
|
||||
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
|
||||
postgresql:
|
||||
# -- disable if you want to use an existing db; in which case the values below
|
||||
|
@ -267,6 +310,15 @@ postgresql:
|
|||
# with a key of password set to the password you want
|
||||
existingSecret: ""
|
||||
|
||||
# -- Node(s) on which we will deploy this resource
|
||||
primary:
|
||||
nodeSelector: {}
|
||||
readReplicas:
|
||||
nodeSelector: {}
|
||||
backup:
|
||||
cronjob:
|
||||
nodeSelector: {}
|
||||
|
||||
# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters
|
||||
redis:
|
||||
# disable if you want to use an existing redis instance; in which case the
|
||||
|
@ -282,6 +334,12 @@ redis:
|
|||
# with a key of redis-password set to the password you want
|
||||
# existingSecret: ""
|
||||
|
||||
# -- Node(s) on which we will deploy this resource
|
||||
master:
|
||||
nodeSelector: {}
|
||||
replica:
|
||||
nodeSelector: {}
|
||||
|
||||
# @ignored
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
@ -425,7 +483,8 @@ revisionPodAnnotation: true
|
|||
jobAnnotations: {}
|
||||
|
||||
# -- Default resources for all Deployments and jobs unless overwritten
|
||||
resources: {}
|
||||
resources:
|
||||
{}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
|
@ -437,9 +496,6 @@ resources: {}
|
|||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# @ignored
|
||||
nodeSelector: {}
|
||||
|
||||
# @ignored
|
||||
tolerations: []
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user