Rename CLUSTER-READY → K8S-CLUSTER (more direct)

Also added:
- DEVELOPMENT-WORKFLOW.md - Complete dev process documented
- Updated all references across documentation

Documentation is now centralized and direct.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hector Ros
2026-01-20 00:44:29 +01:00
parent db71705842
commit e5e039504e
14 changed files with 318 additions and 321 deletions

View File

@@ -0,0 +1,91 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: control-plane
labels:
app: backend
spec:
replicas: 2
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
imagePullSecrets:
- name: gitea-registry
containers:
- name: backend
image: git.fuq.tv/admin/aiworker-backend:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 3000
protocol: TCP
env:
# Database
- name: DB_HOST
value: mariadb.control-plane.svc.cluster.local
- name: DB_PORT
value: "3306"
- name: DB_USER
value: aiworker
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: backend-secrets
key: db-password
- name: DB_NAME
value: aiworker
# Redis
- name: REDIS_HOST
value: redis.control-plane.svc.cluster.local
- name: REDIS_PORT
value: "6379"
# Gitea
- name: GITEA_URL
value: https://git.fuq.tv
- name: GITEA_TOKEN
valueFrom:
secretKeyRef:
name: backend-secrets
key: gitea-token
# Kubernetes
- name: K8S_IN_CLUSTER
value: "true"
# App config
- name: NODE_ENV
value: production
- name: PORT
value: "3000"
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3

24
k8s/backend/ingress.yaml Normal file
View File

@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: backend
namespace: control-plane
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- api.fuq.tv
secretName: backend-tls
rules:
- host: api.fuq.tv
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: backend
port:
number: 3000

9
k8s/backend/secrets.yaml Normal file
View File

@@ -0,0 +1,9 @@
apiVersion: v1
data:
db-password: QWlXb3JrZXIyMDI2X1VzZXJQYXNzXCE=
gitea-token: MTU5YTVkZTJhMTZkMTVmMzNlMzg4YjU1YjEyNzZlNDMxZGJjYTNmMw==
kind: Secret
metadata:
creationTimestamp: null
name: backend-secrets
namespace: control-plane

16
k8s/backend/service.yaml Normal file
View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: backend
namespace: control-plane
labels:
app: backend
spec:
type: ClusterIP
ports:
- name: http
port: 3000
targetPort: 3000
protocol: TCP
selector:
app: backend