Files
telegram-scraper/k8s/telegram-scraper.yaml
T
forust 2a75537fb9
ci / lint-prettier (push) Failing after 10s
ci / lint-ruff (push) Failing after 4s
ci / lint-yaml (push) Successful in 5s
ci / lint-dockerfiles (push) Successful in 5s
ci / validate (push) Successful in 5s
ci / lint-audit (push) Failing after 49s
ci / publish (push) Has been skipped
fix(server): k8s rollout readiness
- TRUSTED_HOSTS env: configurable trusted hostnames for proxy-domain access (default stays strict: localhost/loopback/private IP); k8s manifest sets tg.workstation.internal (L-8 follow-up)
- Media allowlist +10: mkv/mk3d/heic/tgs/flv/3gp/ogv/asf/wmv/djvu (live disk has .tgs x44, .mkv x2)
- Cache buster: app.js?v=4 -> ?v=5 so browsers pick up the new bundle
- +6 tests (64 passing); REVIEW.md updated with live-cluster rollout notes
2026-09-07 13:36:16 +02:00

105 lines
2.3 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: telegram-scraper
---
apiVersion: v1
kind: Service
metadata:
name: telegram-scraper-service
namespace: telegram-scraper
spec:
selector:
app: telegram-scraper
ports:
- port: 8080
targetPort: 8080
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: telegram-scraper-statefulset
namespace: telegram-scraper
spec:
selector:
matchLabels:
app: telegram-scraper
serviceName: telegram-scraper-service
replicas: 1
template:
metadata:
labels:
app: telegram-scraper
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: telegram-scraper
image: gcr.forust.xyz/forust/telegram-scraper:latest
stdin: true
tty: true
env:
- name: TRUSTED_HOSTS
value: "tg.workstation.internal"
ports:
- containerPort: 8080
resources:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 512Mi
cpu: 1
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 15
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
volumeMounts:
- name: telegram-scraper-data
mountPath: /app/data
- name: telegram-scraper-session
mountPath: /app/session
volumeClaimTemplates:
- metadata:
name: telegram-scraper-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- metadata:
name: telegram-scraper-session
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Mi
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: telegram-scraper-route
namespace: telegram-scraper
spec:
entryPoints:
- websecure
routes:
- match: Host(`tg.workstation.internal`)
kind: Rule
services:
- name: telegram-scraper-service
port: 8080