declarative relay deployment on hetzner relay-eval.waow.tech
atproto relay
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

zlay: add collectiondir deploy manifests + justfile recipes

- collectiondir-values.yaml: helm values for shadow collectiondir service
(port 2510, 10Gi PVC, connects to zlay firehose internally)
- collectiondir-servicemonitor.yaml: prometheus scrape config
- justfile: deploy-collectiondir, logs-collectiondir recipes +
publish-remote auto-updates collectiondir deployment if it exists

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+112 -1
+16
zlay/deploy/collectiondir-servicemonitor.yaml
··· 1 + apiVersion: monitoring.coreos.com/v1 2 + kind: ServiceMonitor 3 + metadata: 4 + name: collectiondir 5 + namespace: monitoring 6 + spec: 7 + selector: 8 + matchLabels: 9 + app.kubernetes.io/name: collectiondir 10 + namespaceSelector: 11 + matchNames: 12 + - zlay 13 + endpoints: 14 + - port: http 15 + path: /metrics 16 + interval: 30s
+70
zlay/deploy/collectiondir-values.yaml
··· 1 + # bjw-s/app-template helm values for the collectiondir shadow service 2 + # schema: https://github.com/bjw-s-labs/helm-charts/tree/main/charts/other/app-template 3 + 4 + controllers: 5 + collectiondir: 6 + containers: 7 + main: 8 + image: 9 + repository: atcr.io/zzstoatzz.io/zlay 10 + tag: latest # overridden by `kubectl set image` at deploy time 11 + pullPolicy: IfNotPresent 12 + command: ["/usr/local/bin/collectiondir"] 13 + env: 14 + LISTEN_PORT: "2510" 15 + RELAY_URL: "zlay" 16 + RELAY_PORT: "3000" 17 + RELAY_TLS: "false" 18 + COLLECTION_INDEX_DIR: /data/collection-index 19 + MALLOC_ARENA_MAX: "2" 20 + MALLOC_TRIM_THRESHOLD_: "131072" 21 + RELAY_ADMIN_PASSWORD: 22 + valueFrom: 23 + secretKeyRef: 24 + name: zlay-secret 25 + key: RELAY_ADMIN_PASSWORD 26 + probes: 27 + liveness: 28 + enabled: true 29 + custom: true 30 + spec: 31 + httpGet: 32 + path: /_healthz 33 + port: 2510 34 + initialDelaySeconds: 10 35 + periodSeconds: 30 36 + timeoutSeconds: 5 37 + failureThreshold: 5 38 + readiness: 39 + enabled: true 40 + custom: true 41 + spec: 42 + httpGet: 43 + path: /_health 44 + port: 2510 45 + initialDelaySeconds: 5 46 + periodSeconds: 15 47 + timeoutSeconds: 5 48 + failureThreshold: 3 49 + resources: 50 + requests: 51 + memory: 256Mi 52 + cpu: 200m 53 + limits: 54 + memory: 2Gi 55 + 56 + service: 57 + collectiondir: 58 + controller: collectiondir 59 + ports: 60 + http: 61 + port: 2510 62 + metrics: 63 + port: 2510 # metrics served on same port at /metrics 64 + 65 + persistence: 66 + data: 67 + enabled: true 68 + type: persistentVolumeClaim 69 + accessMode: ReadWriteOnce 70 + size: 10Gi
+26 -1
zlay/justfile
··· 170 170 ctr -n k8s.io images import /tmp/zlay.tar 171 171 rm -f /tmp/zlay.tar 172 172 173 - echo "==> updating deployment image" 173 + echo "==> updating zlay deployment image" 174 174 kubectl set image deployment/zlay -n zlay main="${IMAGE}" 175 175 kubectl rollout status deployment/zlay -n zlay --timeout=120s 176 + 177 + # update collectiondir if it exists 178 + if kubectl get deployment/collectiondir -n zlay &>/dev/null; then 179 + echo "==> updating collectiondir deployment image" 180 + kubectl set image deployment/collectiondir -n zlay main="${IMAGE}" 181 + kubectl rollout status deployment/collectiondir -n zlay --timeout=120s 182 + fi 176 183 177 184 echo "==> deployed ${IMAGE}" 178 185 DEPLOY ··· 207 214 208 215 echo "==> deployed ${IMAGE} (GPA enabled — SIGTERM to get leak report)" 209 216 DEPLOY 217 + 218 + # --- collectiondir --- 219 + 220 + # deploy collectiondir shadow service to the zlay cluster 221 + deploy-collectiondir: 222 + #!/usr/bin/env bash 223 + set -euo pipefail 224 + echo "==> installing collectiondir" 225 + helm upgrade --install collectiondir bjw-s/app-template \ 226 + --namespace zlay \ 227 + --values deploy/collectiondir-values.yaml \ 228 + --wait --timeout 5m 229 + kubectl apply -f deploy/collectiondir-servicemonitor.yaml 230 + echo "==> collectiondir deployed" 231 + 232 + # tail collectiondir logs 233 + logs-collectiondir: 234 + kubectl logs -n zlay deploy/collectiondir -f 210 235 211 236 # --- status --- 212 237