Migrate all Forgejo deployment resources from cluster to Git repository: - Forgejo Deployment with PostgreSQL backend - Forgejo Service and Ingress with TLS - Forgejo PersistentVolumeClaim (5Gi) - PostgreSQL StatefulSet and Service - Backup CronJob (daily at 03:00 UTC, 14-day retention) All existing PVCs (forgejo-data, postgres-data-forgejo-postgres-0) and Pocket-ID SSO configuration are preserved. No data loss expected. The Argo CD Application (app-forgejo.yaml) is already configured to sync from apps/forgejo/ path in this repository. Co-Authored-By: Paperclip <noreply@paperclip.ing>
48 lines
1 KiB
YAML
48 lines
1 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: forgejo-postgres
|
|
namespace: forgejo
|
|
spec:
|
|
serviceName: forgejo-postgres
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: forgejo-postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: forgejo-postgres
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:16-alpine
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: postgres
|
|
containerPort: 5432
|
|
protocol: TCP
|
|
envFrom:
|
|
- secretRef:
|
|
name: forgejo-postgres-secret
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
volumeMounts:
|
|
- name: postgres-data
|
|
mountPath: /var/lib/postgresql/data
|
|
subPath: pgdata
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: postgres-data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: hcloud-volumes-encrypted
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|