Add all necessary Kubernetes manifests for Paperclip deployment: - deployment.yaml: Main Paperclip application deployment - service.yaml: ClusterIP service for Paperclip (port 3100) - ingress.yaml: Traefik ingress for paperclip.home.imicros.de - pvc.yaml: 50Gi persistent volume for Paperclip data - postgres-statefulset.yaml: PostgreSQL 16 StatefulSet - postgres-service.yaml: PostgreSQL service This completes the GitOps configuration for Paperclip in the apps/paperclip directory. The ArgoCD application at apps/app-paperclip.yaml is already configured to deploy from this path. Co-Authored-By: Paperclip <noreply@paperclip.ing>
80 lines
1.9 KiB
YAML
80 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: paperclip-postgres
|
|
namespace: paperclip
|
|
spec:
|
|
serviceName: paperclip-postgres
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: paperclip-postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: paperclip-postgres
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:16-alpine
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: postgres
|
|
containerPort: 5432
|
|
protocol: TCP
|
|
env:
|
|
- name: POSTGRES_DB
|
|
value: paperclip
|
|
- name: POSTGRES_USER
|
|
value: paperclip
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: paperclip-secrets
|
|
key: POSTGRES_PASSWORD
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 2Gi
|
|
volumeMounts:
|
|
- name: postgres-data
|
|
mountPath: /var/lib/postgresql/data
|
|
subPath: pgdata
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- pg_isready -U paperclip
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- pg_isready -U paperclip
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: postgres-data
|
|
annotations:
|
|
# Prevent Argo CD from deleting this PVC to avoid data loss
|
|
argocd.argoproj.io/sync-options: Delete=false
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: local-path
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|