Compare commits

..

19 Commits

Author SHA1 Message Date
Alexander Rogov
f11ad082b2 feat(cnpg): add sandbox database on shared-pg cluster 2026-07-30 20:21:47 +03:00
Alexander Rogov
4be6588001 fix: add streaming API path to ingress (was missing after merge) 2026-07-13 01:15:12 +03:00
Alexander Rogov
e2305d06c0 fix: merge ingress paths — /mastodon/ to minio, / to mastodon-web 2026-07-13 01:11:16 +03:00
Alexander Rogov
40228d456d fix: allow ExternalName services in Traefik, restore ExternalName minio-proxy 2026-07-13 01:05:17 +03:00
Alexander Rogov
0a80b23cce fix: use https for S3 public URLs to match CSP policy 2026-07-13 01:04:39 +03:00
Alexander Rogov
bf0db283e1 fix: use ClusterIP + Endpoints instead of ExternalName for minio proxy 2026-07-13 01:02:48 +03:00
Alexander Rogov
e0965b1ede fix: add ExternalName service for cross-namespace minio ingress 2026-07-13 00:59:26 +03:00
Alexander Rogov
5fe79e7530 fix: set S3_HOSTNAME to public domain, add minio ingress route 2026-07-13 00:50:23 +03:00
Alexander Rogov
d0769d7fdf fix: set overridePathStyle to false so force_path_style becomes true 2026-07-13 00:41:24 +03:00
Alexander Rogov
12f5e95544 fix: remove overridePathStyle — its logic is inverted in Mastodon (force_path_style = overridePathStyle != 'true') 2026-07-13 00:38:29 +03:00
Alexander Rogov
856f0e470d fix: correct S3 endpoint — MinIO service uses port 80 not 9000 2026-07-13 00:33:17 +03:00
Alexander Rogov
03a9d48a06 fix: add dummy elasticsearch credentials to pass helm chart validation 2026-07-13 00:21:17 +03:00
Alexander Rogov
ea57d44228 fix: enable search (fix opensearch security, enable es, bump web memory)
- Fix OpenSearch security plugin: change "true" string to true boolean
  in cluster.yaml to actually disable security (TLS + auth)
- Enable elasticsearch in mastodon connecting to shared-os cluster
  (port 9200, TLS disabled, single_node_cluster preset)
- Enable deploySearch hook to build search indexes
- Increase mastodon-web memory limit from 512Mi to 1Gi to fix OOMKill
2026-07-13 00:11:51 +03:00
Alexander Rogov
58e2742991 disable local search 2026-07-12 23:08:11 +03:00
Alexander Rogov
ce6b16a56c more ai suggestions 2026-07-12 22:57:35 +03:00
Alexander Rogov
0e57f7aaba insecure os 2026-07-12 22:50:21 +03:00
Alexander Rogov
a1bb29a232 make it work 2026-07-12 22:44:56 +03:00
Alexander Rogov
3f888f64f1 spaces part 2 2026-07-12 22:43:27 +03:00
Alexander Rogov
027ecb42ff spaces 2026-07-12 22:41:41 +03:00
7 changed files with 74 additions and 46 deletions

View File

@@ -36,12 +36,12 @@ spec:
s3: s3:
enabled: true enabled: true
hostname: minio.minio.svc.cluster.local:9000 hostname: mastodon.t0rt1k.tech
endpoint: minio.minio.svc.cluster.local:9000 endpoint: http://minio.minio.svc.cluster.local
protocol: http protocol: https
bucket: mastodon bucket: mastodon
existingSecret: mastodon-s3 existingSecret: mastodon-s3
overridePathStyle: "true" overridePathStyle: "false"
web: web:
resources: resources:
@@ -50,7 +50,7 @@ spec:
memory: 256Mi memory: 256Mi
limits: limits:
cpu: 500m cpu: 500m
memory: 512Mi memory: 1Gi
sidekiq: sidekiq:
workers: workers:
@@ -114,23 +114,12 @@ spec:
enabled: true enabled: true
hostname: shared-os.opensearch.svc.cluster.local hostname: shared-os.opensearch.svc.cluster.local
port: 9200 port: 9200
tls: true tls: false
preset: small_cluster preset: single_node_cluster
existingSecret: mastodon-os username: dummy
caSecret: password: dummy
name: os-ca
key: ca.crt
mountPath: /etc/ssl/certs/os-ca.crt
volumes:
- name: dummy
emptyDir: {}
volumeMounts:
- name: dummy
mountPath: /tmp/dummy
ingress: ingress:
enabled: true enabled: false
className: traefik className: traefik
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-production cert-manager.io/cluster-issuer: letsencrypt-production

View File

@@ -42,6 +42,7 @@ spec:
- "--entryPoints.rtc-udp-roglog.address=:30004/udp" - "--entryPoints.rtc-udp-roglog.address=:30004/udp"
- "--providers.kubernetesingress.ingressclass=traefik" - "--providers.kubernetesingress.ingressclass=traefik"
- "--providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik" - "--providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik"
- "--providers.kubernetesingress.allowexternalnameservices=true"
- "--accesslog=true" - "--accesslog=true"
- "--log.level=INFO" - "--log.level=INFO"

View File

@@ -85,4 +85,15 @@ spec:
owner: mastodon owner: mastodon
cluster: cluster:
name: shared-pg name: shared-pg
---
apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
name: sandbox
namespace: cnpg
spec:
name: sandbox
owner: sandbox
cluster:
name: shared-pg

View File

@@ -0,0 +1,40 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mastodon
namespace: mastodon
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
ingressClassName: traefik
tls:
- secretName: mastodon-tls
hosts:
- mastodon.t0rt1k.tech
rules:
- host: mastodon.t0rt1k.tech
http:
paths:
- path: /mastodon/
pathType: Prefix
backend:
service:
name: minio-proxy
port:
number: 80
- path: /api/v1/streaming/
pathType: Prefix
backend:
service:
name: mastodon-streaming
port:
number: 4000
- path: /
pathType: Prefix
backend:
service:
name: mastodon-web
port:
number: 3000

View File

@@ -1,15 +1,5 @@
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata:
name: mastodon-os
namespace: mastodon
type: Opaque
stringData:
username: mastodon
password: "2&ey0J8c1pHbu%kP"
---
apiVersion: v1
kind: Secret
metadata: metadata:
name: os-ca name: os-ca
namespace: mastodon namespace: mastodon

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: minio-proxy
namespace: mastodon
spec:
type: ExternalName
externalName: minio.minio.svc.cluster.local
ports:
- port: 80

View File

@@ -8,10 +8,8 @@ spec:
version: "3.7.0" version: "3.7.0"
serviceName: shared-os serviceName: shared-os
setVMMaxMapCount: true setVMMaxMapCount: true
security: additionalConfig:
config: plugins.security.disabled: true
adminCredentialsSecret:
name: shared-os-admin-credentials
nodePools: nodePools:
- component: nodes - component: nodes
replicas: 3 replicas: 3
@@ -34,14 +32,3 @@ spec:
limits: limits:
cpu: 500m cpu: 500m
memory: 1Gi memory: 1Gi
probes:
readiness:
command:
- /bin/bash
- -c
- curl -k -u "$(cat /mnt/admin-credentials/username):$(cat /mnt/admin-credentials/password)" --silent --fail 'https://localhost:9200'
startup:
command:
- /bin/bash
- -c
- curl -k -u "$(cat /mnt/admin-credentials/username):$(cat /mnt/admin-credentials/password)" --silent --fail 'https://localhost:9200'