cluster.fun/manifests/mastodon/utils.yaml
2022-05-27 03:20:44 +00:00

130 lines
3.3 KiB
YAML

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: mastodon-media-remove
namespace: mastodon
labels:
app.kubernetes.io/name: mastodon
app.kubernetes.io/instance: "k8s.social"
app.kubernetes.io/component: utils
annotations:
description: |
Runs weekly to remove old media
spec:
schedule: 0 0 * * 0
jobTemplate:
spec:
backoffLimit: 3
ttlSecondsAfterFinished: 86400
template:
metadata:
name: mastodon-media-remove
spec:
restartPolicy: OnFailure
containers:
- name: mastodon-media-remove
image: "tootsuite/mastodon:v3.5.3"
imagePullPolicy: IfNotPresent
command:
- bash
- -c
- |
bin/tootctl media remove
bin/tootctl preview_cards remove
envFrom:
- configMapRef:
name: mastodon-env
- secretRef:
name: mastodon
env:
- name: "PORT"
value: "3000"
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: mastodon-assets-precompile
namespace: mastodon
labels:
app.kubernetes.io/name: mastodon
app.kubernetes.io/instance: "k8s.social"
app.kubernetes.io/component: utils
annotations:
description: |
Manually trigger post-install to pre-compile the assets
spec:
schedule: 0 0 * * 0
suspend: true
jobTemplate:
spec:
backoffLimit: 3
ttlSecondsAfterFinished: 86400
template:
metadata:
name: mastodon-assets-precompile
spec:
restartPolicy: OnFailure
containers:
- name: mastodon-assets-precompile
image: "tootsuite/mastodon:v3.5.3"
imagePullPolicy: IfNotPresent
command:
- bash
- -c
- |
bundle exec rake assets:precompile && yarn cache clean
envFrom:
- configMapRef:
name: mastodon-env
- secretRef:
name: mastodon
env:
- name: "PORT"
value: "3000"
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: mastodon-db-migrate
namespace: mastodon
labels:
app.kubernetes.io/name: mastodon
app.kubernetes.io/instance: "k8s.social"
app.kubernetes.io/component: utils
annotations:
description: |
Manually trigger post-install/upgrade to migrate the database schema
spec:
schedule: 0 0 * * 0
suspend: true
jobTemplate:
spec:
backoffLimit: 3
ttlSecondsAfterFinished: 86400
template:
metadata:
name: mastodon-db-migrate
spec:
restartPolicy: OnFailure
containers:
- name: mastodon-db-migrate
image: "tootsuite/mastodon:v3.5.3"
imagePullPolicy: IfNotPresent
command:
- bundle
- exec
- rake
- db:migrate
envFrom:
- configMapRef:
name: mastodon-env
- secretRef:
name: mastodon
env:
- name: "PORT"
value: "3000"
---