mirror of
https://github.com/mastodon/chart
synced 2025-03-14 13:01:51 +00:00
(Updated) Upgrade app to 4.3 (#161)
Co-authored-by: Jeremiah Lee <106775223+jeremiahlee@users.noreply.github.com> Co-authored-by: Tim Campbell <timetinytim@gmail.com>
This commit is contained in:
parent
8f2fc2d8bf
commit
5801e444c2
10
.github/workflows/test-chart.yml
vendored
10
.github/workflows/test-chart.yml
vendored
|
@ -17,7 +17,7 @@ permissions:
|
|||
|
||||
jobs:
|
||||
lint-templates:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -53,7 +53,7 @@ jobs:
|
|||
# basic configuration can be used to successfully startup mastodon.
|
||||
#
|
||||
test-install:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
|
||||
strategy:
|
||||
|
@ -75,7 +75,7 @@ jobs:
|
|||
# available for use in the templates, currently we need v3.6.0 or
|
||||
# higher.
|
||||
#
|
||||
- k3s-channel: v1.21
|
||||
- k3s-channel: v1.28
|
||||
helm-version: v3.8.0
|
||||
|
||||
env:
|
||||
|
@ -109,7 +109,7 @@ jobs:
|
|||
run: |
|
||||
helm install mastodon . \
|
||||
--values dev-values.yaml \
|
||||
--timeout 10m
|
||||
--timeout 15m
|
||||
|
||||
# This actions provides a report about the state of the k8s cluster,
|
||||
# providing logs etc on anything that has failed and workloads marked as
|
||||
|
@ -125,7 +125,5 @@ jobs:
|
|||
deploy/mastodon-sidekiq
|
||||
deploy/mastodon-streaming
|
||||
deploy/mastodon-web
|
||||
job/mastodon-assets-precompile
|
||||
job/mastodon-chewy-upgrade
|
||||
job/mastodon-create-admin
|
||||
job/mastodon-db-migrate
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
charts/
|
||||
.DS_Store
|
||||
|
|
|
@ -15,12 +15,12 @@ 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: 5.5.3
|
||||
version: 6.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.2.17"
|
||||
appVersion: "v4.3.4"
|
||||
|
||||
dependencies:
|
||||
- name: elasticsearch
|
||||
|
|
|
@ -70,7 +70,7 @@ spec:
|
|||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: "{{ coalesce .Values.mastodon.streaming.image.repository .Values.image.repository }}:{{ coalesce .Values.mastodon.streaming.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||
image: "{{ .Values.mastodon.streaming.image.repository }}:{{ coalesce .Values.mastodon.streaming.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- node
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
{{- if .Values.mastodon.hooks.assetsPrecompile.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "mastodon.fullname" . }}-assets-precompile
|
||||
labels:
|
||||
{{- include "mastodon.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
"helm.sh/hook-weight": "-2"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "mastodon.fullname" . }}-assets-precompile
|
||||
{{- with .Values.jobAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
# ensure we run on the same node as the other rails components; only
|
||||
# required when using PVCs that are ReadWriteOnce
|
||||
{{- if or (eq "ReadWriteOnce" .Values.mastodon.persistence.assets.accessMode) (eq "ReadWriteOnce" .Values.mastodon.persistence.system.accessMode) }}
|
||||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-assets-precompile
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
bundle exec rake assets:precompile && yarn cache clean
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "mastodon.fullname" . }}-env
|
||||
- secretRef:
|
||||
name: {{ template "mastodon.secretName" . }}
|
||||
env:
|
||||
- name: "DB_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.postgresql.secretName" . }}
|
||||
key: password
|
||||
- name: "REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "CACHE_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumeMounts:
|
||||
- name: assets
|
||||
mountPath: /opt/mastodon/public/assets
|
||||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,100 +0,0 @@
|
|||
{{- if .Values.elasticsearch.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "mastodon.fullname" . }}-chewy-upgrade
|
||||
labels:
|
||||
{{- include "mastodon.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
"helm.sh/hook-weight": "-1"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "mastodon.fullname" . }}-chewy-upgrade
|
||||
{{- with .Values.jobAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
# ensure we run on the same node as the other rails components; only
|
||||
# required when using PVCs that are ReadWriteOnce
|
||||
{{- if or (eq "ReadWriteOnce" .Values.mastodon.persistence.assets.accessMode) (eq "ReadWriteOnce" .Values.mastodon.persistence.system.accessMode) }}
|
||||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-chewy-setup
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bundle
|
||||
- exec
|
||||
- rake
|
||||
- chewy:upgrade
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "mastodon.fullname" . }}-env
|
||||
- secretRef:
|
||||
name: {{ template "mastodon.secretName" . }}
|
||||
env:
|
||||
- name: "DB_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.postgresql.secretName" . }}
|
||||
key: password
|
||||
- name: "REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- if and .Values.redis.sidekiq.enabled .Values.redis.sidekiq.auth.existingSecret }}
|
||||
- name: "SIDEKIQ_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.sidekiq.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.cache.enabled .Values.redis.cache.auth.existingSecret }}
|
||||
- name: "CACHE_REDIS_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mastodon.redis.cache.secretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if and .Values.elasticsearch.existingSecret (or .Values.elasticsearch.enabled .Values.elasticsearch.hostname) }}
|
||||
- name: "ES_PASS"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.elasticsearch.existingSecret }}
|
||||
key: password
|
||||
{{- end }}
|
||||
- name: "PORT"
|
||||
value: {{ .Values.mastodon.web.port | quote }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumeMounts:
|
||||
- name: assets
|
||||
mountPath: /opt/mastodon/public/assets
|
||||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- end }}
|
10
values.yaml
10
values.yaml
|
@ -6,7 +6,7 @@ image:
|
|||
# built from the most recent commit
|
||||
#
|
||||
# tag: latest
|
||||
tag: null
|
||||
tag: ""
|
||||
# use `Always` when using `latest` tag
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
|
@ -29,8 +29,6 @@ mastodon:
|
|||
# work when using the included database (postgresql.enabled=true).
|
||||
dbMigrate:
|
||||
enabled: true
|
||||
assetsPrecompile:
|
||||
enabled: true
|
||||
# Upload website assets to S3 before deploying using rclone.
|
||||
# Whenever there is an update to Mastodon, sometimes there are assets files
|
||||
# that are renamed. As the pods are getting redeployed, and old/new pods are
|
||||
|
@ -279,8 +277,10 @@ mastodon:
|
|||
existingSecret:
|
||||
streaming:
|
||||
image:
|
||||
repository:
|
||||
tag:
|
||||
# streaming image split in Mastodon v4.3.0
|
||||
repository: ghcr.io/mastodon/mastodon-streaming
|
||||
# other options: `latest` for the latest release or `edge` for most recent commit
|
||||
tag: ""
|
||||
port: 4000
|
||||
# -- this should be set manually since os.cpus() returns the number of CPUs on
|
||||
# the node running the pod, which is unrelated to the resources allocated to
|
||||
|
|
Loading…
Reference in New Issue
Block a user