mirror of
https://github.com/mastodon/chart
synced 2025-04-27 02:33:34 +00:00
Resource-specific nodeSelector (#176)
Co-authored-by: Yann Defretin <yann@defret.in>
This commit is contained in:
parent
4fc46b53b8
commit
56e36d266c
|
@ -1,3 +1,7 @@
|
|||
# 6.3.0
|
||||
|
||||
- Added `nodeSelector` fields for every resource type for better fine-grain tuning of where resources end up.
|
||||
|
||||
# 6.2.4
|
||||
|
||||
- Fixed an issue where redis secrets specified in values or the helm CLI wouldn't be used by the db-prepare job on install.
|
||||
|
|
|
@ -15,7 +15,7 @@ type: application
|
|||
# This is the chart version. This version number should be incremented each time
|
||||
# you make changes to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 6.2.4
|
||||
version: 6.3.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
|
||||
|
|
|
@ -107,4 +107,8 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- with coalesce .Values.mastodon.cron.removeMedia.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -258,9 +258,9 @@ spec:
|
|||
resources:
|
||||
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
|
||||
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||
{{- with $context.Values.nodeSelector }}
|
||||
{{- with coalesce .nodeSelector $context.Values.mastodon.sidekiq.nodeSelector $context.Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $context.Values.tolerations }}
|
||||
tolerations:
|
||||
|
|
|
@ -164,9 +164,9 @@ spec:
|
|||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
{{- with coalesce .Values.mastodon.streaming.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (default .Values.affinity .Values.mastodon.streaming.affinity) }}
|
||||
affinity:
|
||||
|
|
|
@ -272,9 +272,9 @@ spec:
|
|||
containerPort: {{ .Values.mastodon.metrics.prometheus.port }}
|
||||
{{- end }}
|
||||
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
{{- with coalesce .Values.mastodon.web.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with (default .Values.affinity .Values.mastodon.web.affinity) }}
|
||||
affinity:
|
||||
|
|
|
@ -89,4 +89,9 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
emptyDir: {}
|
||||
{{- with coalesce .Values.mastodon.hooks.s3Upload.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- end -}}
|
||||
|
|
|
@ -95,4 +95,8 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- with coalesce .Values.mastodon.createAdmin.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
{{- if .Values.mastodon.hooks.dbMigrate.enabled }}
|
||||
{{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" false ) .) }}
|
||||
{{- with coalesce .Values.mastodon.hooks.dbMigrate.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
{{- if .Values.mastodon.hooks.dbMigrate.enabled }}
|
||||
{{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" true ) .) }}
|
||||
{{- with coalesce .Values.mastodon.hooks.dbMigrate.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
{{- if and .Values.mastodon.hooks.dbPrepare.enabled (not .Values.postgresql.enabled) }}
|
||||
{{- include "mastodon.dbMigrateJob" (merge (dict "prepare" true ) .) }}
|
||||
{{- with coalesce .Values.mastodon.hooks.dbPrepare.nodeSelector .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
60
values.yaml
60
values.yaml
|
@ -25,6 +25,8 @@ mastodon:
|
|||
username: not_gargron
|
||||
# @ignored
|
||||
email: not@example.com
|
||||
# Node(s) on which we will deploy this job
|
||||
nodeSelector: {}
|
||||
hooks:
|
||||
# Whether to perform DB schema creation on `helm install`.
|
||||
# Please note that this does not work when using the included database
|
||||
|
@ -34,9 +36,13 @@ mastodon:
|
|||
# and `pre-upgrade`.
|
||||
dbPrepare:
|
||||
enabled: true
|
||||
# Node(s) on which we will deploy this job
|
||||
nodeSelector: {}
|
||||
# Whether to perform DB migrations on `helm upgrade`.
|
||||
dbMigrate:
|
||||
enabled: true
|
||||
# Node(s) on which we will deploy this job
|
||||
nodeSelector: {}
|
||||
|
||||
# WARNING: deploySearch is potentially a very expensive job!
|
||||
# Only enable this once at a time, when you deploy elasticsearch or when
|
||||
|
@ -89,9 +95,11 @@ mastodon:
|
|||
rclone:
|
||||
# Any additional environment variables to pass to rclone.
|
||||
env: {}
|
||||
# Node(s) on which we will deploy this job
|
||||
nodeSelector: {}
|
||||
# Custom labels to add to kubernetes resources
|
||||
#labels:
|
||||
# -- deploy search to elastsicsearch. Requires .elasticsearch.enabled = true
|
||||
|
||||
cron:
|
||||
# -- run `tootctl media remove` every week
|
||||
removeMedia:
|
||||
|
@ -99,6 +107,9 @@ mastodon:
|
|||
enabled: true
|
||||
# @ignored
|
||||
schedule: "0 0 * * 0"
|
||||
# Node(s) on which we will deploy this job
|
||||
nodeSelector: {}
|
||||
|
||||
# -- available locales: https://github.com/mastodon/mastodon/blob/main/config/application.rb#L71
|
||||
locale: en
|
||||
local_domain: mastodon.local
|
||||
|
@ -203,6 +214,9 @@ mastodon:
|
|||
resources: {}
|
||||
# -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity
|
||||
affinity: {}
|
||||
# Node(s) on which we will deploy sidekiq in general
|
||||
# Any worker-specific configuration will override this setting.
|
||||
nodeSelector: {}
|
||||
# -- Annotations to apply to the deployment object(s) for sidekiq.
|
||||
# -- These are applied in addition to deploymentAnnotations.
|
||||
annotations: {}
|
||||
|
@ -259,8 +273,11 @@ mastodon:
|
|||
resources: {}
|
||||
# -- Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity
|
||||
affinity: {}
|
||||
# -- Node(s) on which we will deploy this sidekiq worker
|
||||
nodeSelector: {}
|
||||
# -- 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:
|
||||
|
@ -332,6 +349,8 @@ mastodon:
|
|||
replicas: 1
|
||||
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
||||
affinity: {}
|
||||
# -- Node(s) on which we will deploy the streaming pods
|
||||
nodeSelector: {}
|
||||
# -- Annotations to apply to the deployment object for streaming.
|
||||
# -- These are applied in addition to deploymentAnnotations.
|
||||
annotations: {}
|
||||
|
@ -390,6 +409,8 @@ mastodon:
|
|||
replicas: 1
|
||||
# -- Affinity for Web Pods, overwrites .Values.affinity
|
||||
affinity: {}
|
||||
# -- Node(s) on which we will deploy the web pods
|
||||
nodeSelector: {}
|
||||
# -- Annotations to apply to the deployment object for web.
|
||||
# -- These are applied in addition to deploymentAnnotations.
|
||||
annotations: {}
|
||||
|
@ -428,8 +449,10 @@ mastodon:
|
|||
enable: false
|
||||
# minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
|
||||
# -- 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"
|
||||
|
@ -586,6 +609,18 @@ elasticsearch:
|
|||
# Name of an existing secret with a password key
|
||||
# existingSecret:
|
||||
|
||||
# -- Node(s) on which we will deploy the various elasticsearch pods
|
||||
master:
|
||||
nodeSelector: {}
|
||||
data:
|
||||
nodeSelector: {}
|
||||
coordinating:
|
||||
nodeSelector: {}
|
||||
ingest:
|
||||
nodeSelector: {}
|
||||
metrics:
|
||||
nodeSelector: {}
|
||||
|
||||
# Configuration for PostgreSQL.
|
||||
# When enabled, the bitnami helm chart is used for PostgreSQL deployment, and
|
||||
# all values here correspond to their values file. Please see the bitnami chart
|
||||
|
@ -640,6 +675,15 @@ postgresql:
|
|||
password:
|
||||
existingSecret:
|
||||
|
||||
# -- Node(s) on which we will deploy the various database pods
|
||||
primary:
|
||||
nodeSelector: {}
|
||||
readReplicas:
|
||||
nodeSelector: {}
|
||||
backup:
|
||||
cronjob:
|
||||
nodeSelector: {}
|
||||
|
||||
# Configuration for Redis.
|
||||
# When enabled, the bitnami helm chart used for Redis deployment, and all values
|
||||
# here correspond to their values file. Please see the bitnami chart
|
||||
|
@ -692,6 +736,12 @@ redis:
|
|||
# with a key of redis-password set to the password you want
|
||||
existingSecret: ""
|
||||
|
||||
# -- Node(s) on which we will deploy the various redis pods
|
||||
master:
|
||||
nodeSelector: {}
|
||||
replica:
|
||||
nodeSelector: {}
|
||||
|
||||
# @ignored
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
@ -848,15 +898,17 @@ resources:
|
|||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# @ignored
|
||||
nodeSelector: {}
|
||||
|
||||
# @ignored
|
||||
tolerations: []
|
||||
|
||||
# -- Affinity for all mastodon pods unless overwritten
|
||||
affinity: {}
|
||||
|
||||
# Node(s) on which we will deploy all resources.
|
||||
# Any node selectors specified for individual resources will override this
|
||||
# setting.
|
||||
nodeSelector: {}
|
||||
|
||||
# -- Timezone for all mastodon pods unless overwritten
|
||||
timezone: UTC
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user