3
0
mirror of https://github.com/mastodon/chart synced 2025-05-18 04:53:21 +00:00

Adjust nodeselector to default to global value, then rewrite with local values

This commit is contained in:
Tim Campbell 2025-03-06 16:20:51 +01:00
parent 1b9f6b8028
commit ca2cd6ff8a
9 changed files with 48 additions and 1 deletions

View File

@ -110,5 +110,8 @@ spec:
{{- if .Values.mastodon.cron.removeMedia.nodeSelector }} {{- if .Values.mastodon.cron.removeMedia.nodeSelector }}
nodeSelector: nodeSelector:
{{ .Values.mastodon.cron.removeMedia.nodeSelector | toYaml | nindent 12 }} {{ .Values.mastodon.cron.removeMedia.nodeSelector | toYaml | nindent 12 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 12 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -255,9 +255,15 @@ 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 }}
{{- if $context.Values.mastodon.sidekiq.nodeSelector }} {{- if .nodeSelector }}
nodeSelector:
{{- .nodeSelector | toYaml | nindent 8 }}
{{- else if $context.Values.mastodon.sidekiq.nodeSelector }}
nodeSelector: nodeSelector:
{{- $context.Values.mastodon.sidekiq.nodeSelector | toYaml | nindent 8 }} {{- $context.Values.mastodon.sidekiq.nodeSelector | toYaml | nindent 8 }}
{{- else if $context.Values.nodeSelector }}
nodeSelector:
{{- $context.Values.nodeSelector | toYaml | nindent 8 }}
{{- end }} {{- end }}
{{- with $context.Values.tolerations }} {{- with $context.Values.tolerations }}
tolerations: tolerations:

View File

@ -164,6 +164,9 @@ spec:
{{- if .Values.mastodon.streaming.nodeSelector }} {{- if .Values.mastodon.streaming.nodeSelector }}
nodeSelector: nodeSelector:
{{ .Values.mastodon.streaming.nodeSelector | toYaml | nindent 8 }} {{ .Values.mastodon.streaming.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }} {{- end }}
{{- with (default .Values.affinity .Values.mastodon.streaming.affinity) }} {{- with (default .Values.affinity .Values.mastodon.streaming.affinity) }}
affinity: affinity:

View File

@ -272,6 +272,9 @@ spec:
{{- if .Values.mastodon.web.nodeSelector }} {{- if .Values.mastodon.web.nodeSelector }}
nodeSelector: nodeSelector:
{{ .Values.mastodon.web.nodeSelector | toYaml | nindent 8 }} {{ .Values.mastodon.web.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }} {{- end }}
{{- with (default .Values.affinity .Values.mastodon.web.affinity) }} {{- with (default .Values.affinity .Values.mastodon.web.affinity) }}
affinity: affinity:

View File

@ -89,4 +89,12 @@ spec:
volumes: volumes:
- name: assets - name: assets
emptyDir: {} emptyDir: {}
{{- if .Values.mastodon.hooks.s3Upload.nodeSelector }}
nodeSelector:
{{ .Values.mastodon.hooks.s3Upload.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- end -}} {{- end -}}

View File

@ -98,5 +98,8 @@ spec:
{{- if .Values.mastodon.createAdmin.nodeSelector }} {{- if .Values.mastodon.createAdmin.nodeSelector }}
nodeSelector: nodeSelector:
{{ .Values.mastodon.createAdmin.nodeSelector | toYaml | nindent 8 }} {{ .Values.mastodon.createAdmin.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,3 +1,10 @@
{{- 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 ) .) }}
{{- if .Values.mastodon.hooks.dbMigrate.nodeSelector }}
nodeSelector:
{{ .Values.mastodon.hooks.dbMigrate.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- end }} {{- end }}

View File

@ -1,3 +1,10 @@
{{- 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 ) .) }}
{{- if .Values.mastodon.hooks.dbMigrate.nodeSelector }}
nodeSelector:
{{ .Values.mastodon.hooks.dbMigrate.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- end }} {{- end }}

View File

@ -1,3 +1,10 @@
{{- 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 ) .) }}
{{- if .Values.mastodon.hooks.dbPrepare.nodeSelector }}
nodeSelector:
{{ .Values.mastodon.hooks.dbPrepare.nodeSelector | toYaml | nindent 8 }}
{{- else if .Values.nodeSelector }}
nodeSelector:
{{ .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- end }} {{- end }}