Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/mastodon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 0.3.1
version: 0.4.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
Expand Down
8 changes: 8 additions & 0 deletions charts/mastodon/templates/cronjob-media-remove.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ spec:
persistentVolumeClaim:
claimName: {{ template "mastodon.fullname" . }}-system
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "mastodon.fullname" . }}-media-remove
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
10 changes: 7 additions & 3 deletions charts/mastodon/templates/deployment-sidekiq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,17 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.mastodon.sidekiq.resources | nindent 12 }}
{{- with .Values.mastodon.sidekiq.nodeSelector }}
{{- $nodeSelector := merge .Values.nodeSelector .Values.mastodon.sidekiq.nodeSelector }}
{{- with $nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- if and .Values.mastodon.sidekiq.tolerations (gt (len .Values.mastodon.sidekiq.tolerations) 0) }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- toYaml .Values.mastodon.sidekiq.tolerations | nindent 8 }}
{{- else if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.postgres.credentials.certificateSecret }}
volumes:
Expand Down
16 changes: 10 additions & 6 deletions charts/mastodon/templates/deployment-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,22 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.mastodon.streaming.resources | nindent 12 }}
{{- with .Values.mastodon.streaming.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- $nodeSelector := merge .Values.nodeSelector .Values.mastodon.streaming.nodeSelector }}
{{- with $nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and .Values.mastodon.streaming.tolerations (gt (len .Values.mastodon.streaming.tolerations) 0) }}
tolerations:
{{- toYaml .Values.mastodon.streaming.tolerations | nindent 8 }}
{{- else if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.postgres.credentials.certificateSecret }}
volumes:
- name: certificates
Expand Down
16 changes: 10 additions & 6 deletions charts/mastodon/templates/deployment-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,22 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.mastodon.web.resources | nindent 12 }}
{{- with .Values.mastodon.web.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- $nodeSelector := merge .Values.nodeSelector .Values.mastodon.web.nodeSelector }}
{{- with $nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and .Values.mastodon.web.tolerations (gt (len .Values.mastodon.web.tolerations) 0) }}
tolerations:
{{- toYaml .Values.mastodon.web.tolerations | nindent 8 }}
{{- else if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.postgres.credentials.certificateSecret }}
volumes:
- name: certificates
Expand Down
12 changes: 8 additions & 4 deletions charts/mastodon/templates/job-assets-precompile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ spec:
persistentVolumeClaim:
claimName: {{ template "mastodon.fullname" . }}-system
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "mastodon.fullname" . }}-assets-precompile
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -98,7 +106,3 @@ spec:
- key: db-certificate.crt
path: root.crt
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
12 changes: 8 additions & 4 deletions charts/mastodon/templates/job-chewy-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ spec:
persistentVolumeClaim:
claimName: {{ template "mastodon.fullname" . }}-system
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "mastodon.fullname" . }}-chewy-setup
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -99,8 +107,4 @@ spec:
- key: db-certificate.crt
path: root.crt
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
12 changes: 8 additions & 4 deletions charts/mastodon/templates/job-db-migrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ spec:
persistentVolumeClaim:
claimName: {{ template "mastodon.fullname" . }}-system
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "mastodon.fullname" . }}-db-migrate
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -98,7 +106,3 @@ spec:
- key: db-certificate.crt
path: root.crt
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
56 changes: 37 additions & 19 deletions charts/mastodon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,29 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# Number of replicas for the deployments
replicaCount: 1

image:
repository: tootsuite/mastodon
# Image pull policy. Options: Always, Never, IfNotPresent
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v4.2.10"

# Secrets used to pull images from private registries
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# Global node selector for all pods (jobs, cronjobs will always use this)
# (deployments will use this unless overridden)
nodeSelector: {}

# Global tolerations for all pods (jobs, cronjobs will always use this)
# (deployments will use this unless overridden)
tolerations: []

mastodon:
# Please look at https://docs.joinmastodon.org/admin/config/ for the full documentation.
localDomain: example.com
Expand All @@ -23,13 +34,17 @@ mastodon:
logLevel: debug

sidekiq:
# Number of concurrent threads for Sidekiq worker
concurrency: 25

# Node selector for Sidekiq (This takes precedence over the global nodeSelector)
nodeSelector:
doks.digitalocean.com/node-pool: josa-cloud-np

resources:
{}
# Tolerations for Sidekiq (This takes precedence over the global tolerations)
tolerations: []

resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
Expand Down Expand Up @@ -60,11 +75,14 @@ mastodon:
successThreshold: 1
failureThreshold: 3

# Node selector for streaming (This takes precedence over the global nodeSelector)
nodeSelector:
doks.digitalocean.com/node-pool: josa-cloud-np

resources:
{}
# Tolerations for streaming (This takes precedence over the global tolerations)
tolerations: []

resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
Expand All @@ -89,10 +107,13 @@ mastodon:
successThreshold: 1
failureThreshold: 3

# Node selector for web (This takes precedence over the global nodeSelector)
nodeSelector: {}

resources:
{}
# Tolerations for web (This takes precedence over the global tolerations)
tolerations: []

resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
Expand All @@ -101,9 +122,10 @@ mastodon:
# memory: 128Mi

cron:
# run `tootctl media remove` every week
removeMedia:
# Enable the media removal cron job
enabled: true
# Cron schedule for media removal (runs `tootctl media remove` every week by default)
schedule: "0 0 * * 0"

secrets:
Expand Down Expand Up @@ -219,14 +241,15 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: "mastodon-sa"

# Annotations to add to all pods
podAnnotations: {}

podSecurityContext:
{}
# Security context for all pods
podSecurityContext: {}
# fsGroup: 2000

securityContext:
{}
# Security context for containers
securityContext: {}
# capabilities:
# drop:
# - ALL
Expand All @@ -249,14 +272,12 @@ ingress:
paths:
- path: /
pathType: ImplementationSpecific
tls:
[]
tls: []
# - secretName: josa.social-tls
# hosts:
# - example.com

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
Expand All @@ -275,11 +296,8 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

# The annotations set with jobAnnotations will be added to all job pods.
jobAnnotations: {}

# Affinity rules for pod scheduling
affinity: {}
Loading