Move mastodon chart to kustomize+helm

Probably should have done this earlier, but the chart is not
customizable enough for my needs.
This commit is contained in:
Martyn 2025-10-05 15:36:18 +02:00
parent d04e89b39b
commit b7aa866bb9
7 changed files with 102 additions and 62 deletions

View file

@ -0,0 +1,3 @@
- op: replace
path: /spec/replicas
value: 0

View file

@ -0,0 +1,2 @@
- op: remove
path: /spec/tls/0/secretName

View file

@ -0,0 +1,28 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmChartInflationGenerator:
- chartname: mastodon
chartRepoUrl: https://helm.dustinrue.com
chartVersion: 0.4.4
releaseName: masto
releaseNamespace: mastodon
values: values.yaml
patches:
- path: secret-remove-helm-ones.yaml
target:
kind: Secret
name: masto-mastodon
- path: ingress-wildcardtls.yaml
target:
version: v1
group: networking.k8s.io
kind: Ingress
name: masto-mastodon
- path: deployment-nosidekiqyet.yaml
target:
version: v1
group: apps
kind: Deployment
name: masto-mastodon-sidekiq-combined

View file

@ -0,0 +1,9 @@
- op: remove
path: /data/ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY
- op: remove
path: /data/ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT
- op: remove
path: /data/ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY
- op: replace
path: /data/REDIS_PASS
value: ""

View file

@ -0,0 +1,46 @@
ingress:
enabled: true
className: nginx
hosts:
- host: toot.martyn.berlin
paths:
- path: /
tls:
- hosts:
- toot.martyn.berlin
mastodon:
local_domain: toot.martyn.berlin
initialUser:
enabled: false
removeMedia:
enabled: true
schedule: 0 0 * * 0
databaseBackup:
enabled: false
sidekiq:
replicas: 0
secrets:
existingSecret: masto-secrets
active_record_encryption_deterministic_key: externalSecret
active_record_encryption_key_derivation_salt: externalSecret
active_record_encryption_primary_key: externalSecret
storage:
type: emptyDir
postgresql:
host: masto-postgres
existingSecret: masto-db-secret
auth:
username: masto
password: externalSecret
redis:
host: redis4masto
database: '0'
auth:
username: nousername
password: replacewithkustomize
smtp:
server: mailhog4masto
port: 25
enable_starttls: 'false'
postgresql:
existingSecret: masto-db-secret

View file

@ -1,62 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: mastodon
namespace: argocd
spec:
destination:
namespace: mastodon
server: https://kubernetes.default.svc
project: apps
source:
chart: mastodon
repoURL: https://helm.dustinrue.com
targetRevision: 0.4.4
helm:
valuesObject:
ingress:
enabled: true
className: "nginx"
hosts:
- host: toot.martyn.berlin
paths:
- path: /
tls:
- hosts:
- toot.martyn.berlin
mastodon:
local_domain: toot.martyn.berlin
initialUser:
enabled: false
removeMedia:
enabled: true
schedule: "0 0 * * 0"
databaseBackup:
enabled: false
sidekiq:
replicas: 0
secrets:
existingSecret: "masto-secrets"
active_record_encryption_deterministic_key: "externalSecret"
active_record_encryption_key_derivation_salt: "externalSecret"
active_record_encryption_primary_key: "externalSecret"
storage:
type: emptyDir
postgresql:
host: masto-postgres
existingSecret: "masto-db-secret"
auth:
username: "externalSecret"
password: "externalSecret"
redis:
host: redis4masto
database: "0"
auth:
username: nousername
password: nopassword
smtp:
host: mailhog4masto
port: 25
enable_starttls: "false"
postgresql:
existingSecret: "masto-db-secret"

View file

@ -0,0 +1,14 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: mastodon
namespace: mastodon
spec:
destination:
namespace: mastodon
server: https://kubernetes.default.svc
project: infra
source:
path: apps-kustomized/mastodon
repoURL: http://forgejo.git.svc.cluster.local/martyn/infra4talos
targetRevision: HEAD