From 8dbfb89ea91ecba7e564e2a0ddf0587cc6984837 Mon Sep 17 00:00:00 2001 From: Alexander Rogov Date: Sun, 12 Jul 2026 16:26:14 +0300 Subject: [PATCH] add mastodon database CR and argo app --- argocd/apps/mastodon.yaml | 109 ++++++++++++++++++++++++++++++++++ manifests/cnpg/databases.yaml | 11 ++++ 2 files changed, 120 insertions(+) create mode 100644 argocd/apps/mastodon.yaml diff --git a/argocd/apps/mastodon.yaml b/argocd/apps/mastodon.yaml new file mode 100644 index 0000000..2873275 --- /dev/null +++ b/argocd/apps/mastodon.yaml @@ -0,0 +1,109 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mastodon + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://mastodon.github.io/helm-charts/ + chart: mastodon + targetRevision: "1.0.3" + helm: + values: | + mastodon: + localDomain: mastodon.t0rt1k.tech + + secrets: + secretKeyBase: c858bb02549193f4677f06db375f6015c282d7c2912c0a894bdcab66948f5ebcbf10286c94bcec8306cf704ecfe8c59a871fb14bcc29b50bad4c192039f84c25 + vapidPrivateKey: 5mrGQP9Cvo_t5hPwuVzY-zGfK-2pScDk42yhTwN193c= + vapidPublicKey: BF5GrO2MLqWBbIDhgmQP6xMMfqdor0Fm3KkjsMx_QYB5kKzdDvACwA59SP3T9zWWe5dB7EsYbHe-LF6S0sV7DKk= + + s3: + enabled: true + hostname: minio.minio.svc.cluster.local:9000 + endpoint: minio.minio.svc.cluster.local:9000 + protocol: http + bucket: mastodon + accessKeyId: admin + secretAccessKey: change-me + overridePathStyle: "true" + + web: + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 500m + memory: 512Mi + + sidekiq: + workers: + - name: all-queues + replicas: 1 + concurrency: 15 + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 500m + memory: 512Mi + + streaming: + replicas: 1 + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 250m + memory: 256Mi + + postgresql: + hostname: shared-pg-rw.cnpg.svc.cluster.local + port: 5432 + database: mastodon + username: mastodon + password: change-me + + redis: + hostname: redis.redis.svc.cluster.local + port: 6379 + password: change-me + + elasticsearch: + enabled: true + hostname: opensearch-cluster-master.opensearch.svc.cluster.local + port: 9200 + tls: false + preset: single_node_cluster + + ingress: + enabled: true + className: traefik + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" + hosts: + - host: mastodon.t0rt1k.tech + paths: + - path: / + pathType: Prefix + tls: + - secretName: mastodon-tls + hosts: + - mastodon.t0rt1k.tech + + httproute: + enabled: false + destination: + server: https://kubernetes.default.svc + namespace: mastodon + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/manifests/cnpg/databases.yaml b/manifests/cnpg/databases.yaml index 1165523..6cf48cf 100644 --- a/manifests/cnpg/databases.yaml +++ b/manifests/cnpg/databases.yaml @@ -74,4 +74,15 @@ spec: owner: hedgedoc cluster: name: shared-pg +--- +apiVersion: postgresql.cnpg.io/v1 +kind: Database +metadata: + name: mastodon + namespace: cnpg +spec: + name: mastodon + owner: mastodon + cluster: + name: shared-pg