mirror of
https://github.com/mastodon/chart
synced 2025-04-27 10:43:37 +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
|
# 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.
|
- 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
|
# 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.
|
# you make changes to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# 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
|
# 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
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
|
|
@ -107,4 +107,8 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
mountPath: /opt/mastodon/public/system
|
mountPath: /opt/mastodon/public/system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with coalesce .Values.mastodon.cron.removeMedia.nodeSelector .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- . | toYaml | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -258,9 +258,9 @@ spec:
|
||||||
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 }}
|
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||||
{{- with $context.Values.nodeSelector }}
|
{{- with coalesce .nodeSelector $context.Values.mastodon.sidekiq.nodeSelector $context.Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- . | toYaml | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with $context.Values.tolerations }}
|
{{- with $context.Values.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
|
|
|
@ -164,9 +164,9 @@ spec:
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with coalesce .Values.mastodon.streaming.nodeSelector .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- . | toYaml | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with (default .Values.affinity .Values.mastodon.streaming.affinity) }}
|
{{- with (default .Values.affinity .Values.mastodon.streaming.affinity) }}
|
||||||
affinity:
|
affinity:
|
||||||
|
|
|
@ -272,9 +272,9 @@ spec:
|
||||||
containerPort: {{ .Values.mastodon.metrics.prometheus.port }}
|
containerPort: {{ .Values.mastodon.metrics.prometheus.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with coalesce .Values.mastodon.web.nodeSelector .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- . | toYaml | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with (default .Values.affinity .Values.mastodon.web.affinity) }}
|
{{- with (default .Values.affinity .Values.mastodon.web.affinity) }}
|
||||||
affinity:
|
affinity:
|
||||||
|
|
|
@ -89,4 +89,9 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: assets
|
- name: assets
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
{{- with coalesce .Values.mastodon.hooks.s3Upload.nodeSelector .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- . | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -95,4 +95,8 @@ spec:
|
||||||
- name: system
|
- name: system
|
||||||
mountPath: /opt/mastodon/public/system
|
mountPath: /opt/mastodon/public/system
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with coalesce .Values.mastodon.createAdmin.nodeSelector .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- . | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
{{- if .Values.mastodon.hooks.dbMigrate.enabled }}
|
{{- if .Values.mastodon.hooks.dbMigrate.enabled }}
|
||||||
{{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" false ) .) }}
|
{{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" false ) .) }}
|
||||||
|
{{- with coalesce .Values.mastodon.hooks.dbMigrate.nodeSelector .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- . | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
{{- if .Values.mastodon.hooks.dbMigrate.enabled }}
|
{{- if .Values.mastodon.hooks.dbMigrate.enabled }}
|
||||||
{{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" true ) .) }}
|
{{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" true ) .) }}
|
||||||
|
{{- with coalesce .Values.mastodon.hooks.dbMigrate.nodeSelector .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- . | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
{{- if and .Values.mastodon.hooks.dbPrepare.enabled (not .Values.postgresql.enabled) }}
|
{{- if and .Values.mastodon.hooks.dbPrepare.enabled (not .Values.postgresql.enabled) }}
|
||||||
{{- include "mastodon.dbMigrateJob" (merge (dict "prepare" true ) .) }}
|
{{- include "mastodon.dbMigrateJob" (merge (dict "prepare" true ) .) }}
|
||||||
|
{{- with coalesce .Values.mastodon.hooks.dbPrepare.nodeSelector .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- . | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
60
values.yaml
60
values.yaml
|
@ -25,6 +25,8 @@ mastodon:
|
||||||
username: not_gargron
|
username: not_gargron
|
||||||
# @ignored
|
# @ignored
|
||||||
email: not@example.com
|
email: not@example.com
|
||||||
|
# Node(s) on which we will deploy this job
|
||||||
|
nodeSelector: {}
|
||||||
hooks:
|
hooks:
|
||||||
# Whether to perform DB schema creation on `helm install`.
|
# Whether to perform DB schema creation on `helm install`.
|
||||||
# Please note that this does not work when using the included database
|
# Please note that this does not work when using the included database
|
||||||
|
@ -34,9 +36,13 @@ mastodon:
|
||||||
# and `pre-upgrade`.
|
# and `pre-upgrade`.
|
||||||
dbPrepare:
|
dbPrepare:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
# Node(s) on which we will deploy this job
|
||||||
|
nodeSelector: {}
|
||||||
# Whether to perform DB migrations on `helm upgrade`.
|
# Whether to perform DB migrations on `helm upgrade`.
|
||||||
dbMigrate:
|
dbMigrate:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
# Node(s) on which we will deploy this job
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
# WARNING: deploySearch is potentially a very expensive job!
|
# WARNING: deploySearch is potentially a very expensive job!
|
||||||
# Only enable this once at a time, when you deploy elasticsearch or when
|
# Only enable this once at a time, when you deploy elasticsearch or when
|
||||||
|
@ -89,9 +95,11 @@ mastodon:
|
||||||
rclone:
|
rclone:
|
||||||
# Any additional environment variables to pass to rclone.
|
# Any additional environment variables to pass to rclone.
|
||||||
env: {}
|
env: {}
|
||||||
|
# Node(s) on which we will deploy this job
|
||||||
|
nodeSelector: {}
|
||||||
# Custom labels to add to kubernetes resources
|
# Custom labels to add to kubernetes resources
|
||||||
#labels:
|
#labels:
|
||||||
# -- deploy search to elastsicsearch. Requires .elasticsearch.enabled = true
|
|
||||||
cron:
|
cron:
|
||||||
# -- run `tootctl media remove` every week
|
# -- run `tootctl media remove` every week
|
||||||
removeMedia:
|
removeMedia:
|
||||||
|
@ -99,6 +107,9 @@ mastodon:
|
||||||
enabled: true
|
enabled: true
|
||||||
# @ignored
|
# @ignored
|
||||||
schedule: "0 0 * * 0"
|
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
|
# -- available locales: https://github.com/mastodon/mastodon/blob/main/config/application.rb#L71
|
||||||
locale: en
|
locale: en
|
||||||
local_domain: mastodon.local
|
local_domain: mastodon.local
|
||||||
|
@ -203,6 +214,9 @@ 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: {}
|
||||||
|
# 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.
|
# -- Annotations to apply to the deployment object(s) for sidekiq.
|
||||||
# -- These are applied in addition to deploymentAnnotations.
|
# -- These are applied in addition to deploymentAnnotations.
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
@ -259,8 +273,11 @@ 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: {}
|
||||||
|
# -- 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
|
# -- Topology spread constraints for this specific deployment, overwrites .Values.topologySpreadConstraints and .Values.mastodon.sidekiq.topologySpreadConstraints
|
||||||
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:
|
||||||
|
@ -332,6 +349,8 @@ mastodon:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Node(s) on which we will deploy the streaming pods
|
||||||
|
nodeSelector: {}
|
||||||
# -- Annotations to apply to the deployment object for streaming.
|
# -- Annotations to apply to the deployment object for streaming.
|
||||||
# -- These are applied in addition to deploymentAnnotations.
|
# -- These are applied in addition to deploymentAnnotations.
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
@ -390,6 +409,8 @@ mastodon:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# -- Affinity for Web Pods, overwrites .Values.affinity
|
# -- Affinity for Web Pods, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Node(s) on which we will deploy the web pods
|
||||||
|
nodeSelector: {}
|
||||||
# -- Annotations to apply to the deployment object for web.
|
# -- Annotations to apply to the deployment object for web.
|
||||||
# -- These are applied in addition to deploymentAnnotations.
|
# -- These are applied in addition to deploymentAnnotations.
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
@ -428,8 +449,10 @@ mastodon:
|
||||||
enable: false
|
enable: false
|
||||||
# minAvailable: 1
|
# minAvailable: 1
|
||||||
# maxUnavailable: 1
|
# maxUnavailable: 1
|
||||||
|
|
||||||
# -- Puma-specific options. Below values are based on default behavior in
|
# -- Puma-specific options. Below values are based on default behavior in
|
||||||
# config/puma.rb when no custom values are provided.
|
# config/puma.rb when no custom values are provided.
|
||||||
|
|
||||||
minThreads: "5"
|
minThreads: "5"
|
||||||
maxThreads: "5"
|
maxThreads: "5"
|
||||||
workers: "2"
|
workers: "2"
|
||||||
|
@ -586,6 +609,18 @@ elasticsearch:
|
||||||
# Name of an existing secret with a password key
|
# Name of an existing secret with a password key
|
||||||
# existingSecret:
|
# 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.
|
# Configuration for PostgreSQL.
|
||||||
# When enabled, the bitnami helm chart is used for PostgreSQL deployment, and
|
# 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
|
# all values here correspond to their values file. Please see the bitnami chart
|
||||||
|
@ -640,6 +675,15 @@ postgresql:
|
||||||
password:
|
password:
|
||||||
existingSecret:
|
existingSecret:
|
||||||
|
|
||||||
|
# -- Node(s) on which we will deploy the various database pods
|
||||||
|
primary:
|
||||||
|
nodeSelector: {}
|
||||||
|
readReplicas:
|
||||||
|
nodeSelector: {}
|
||||||
|
backup:
|
||||||
|
cronjob:
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
# Configuration for Redis.
|
# Configuration for Redis.
|
||||||
# When enabled, the bitnami helm chart used for Redis deployment, and all values
|
# When enabled, the bitnami helm chart used for Redis deployment, and all values
|
||||||
# here correspond to their values file. Please see the bitnami chart
|
# 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
|
# with a key of redis-password set to the password you want
|
||||||
existingSecret: ""
|
existingSecret: ""
|
||||||
|
|
||||||
|
# -- Node(s) on which we will deploy the various redis pods
|
||||||
|
master:
|
||||||
|
nodeSelector: {}
|
||||||
|
replica:
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
# @ignored
|
# @ignored
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
@ -848,15 +898,17 @@ resources:
|
||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
|
|
||||||
# @ignored
|
|
||||||
nodeSelector: {}
|
|
||||||
|
|
||||||
# @ignored
|
# @ignored
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|
||||||
# -- Affinity for all mastodon pods unless overwritten
|
# -- Affinity for all mastodon pods unless overwritten
|
||||||
affinity: {}
|
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 for all mastodon pods unless overwritten
|
||||||
timezone: UTC
|
timezone: UTC
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user