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>
114 lines
2.9 KiB
YAML
114 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: paperclip
|
|
namespace: paperclip
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: paperclip
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: paperclip
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: Always
|
|
initContainers:
|
|
- name: fix-permissions
|
|
image: busybox:1.36
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
mkdir -p /paperclip/scripts
|
|
chmod -R 777 /paperclip
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /paperclip
|
|
containers:
|
|
- name: paperclip
|
|
image: ghcr.io/paperclipai/paperclip:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 3100
|
|
name: http
|
|
protocol: TCP
|
|
env:
|
|
- name: HOST
|
|
value: "0.0.0.0"
|
|
- name: PORT
|
|
value: "3100"
|
|
- name: PAPERCLIP_HOME
|
|
value: "/paperclip"
|
|
- name: PAPERCLIP_PUBLIC_URL
|
|
value: "https://paperclip.home.imicros.de"
|
|
- name: PAPERCLIP_DEPLOYMENT_MODE
|
|
value: "authenticated"
|
|
- name: PAPERCLIP_DEPLOYMENT_EXPOSURE
|
|
value: "private"
|
|
- name: PAPERCLIP_MIGRATION_PROMPT
|
|
value: "never"
|
|
- name: PAPERCLIP_MIGRATION_AUTO_APPLY
|
|
value: "true"
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: paperclip-secrets
|
|
key: DATABASE_URL
|
|
- name: BETTER_AUTH_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: paperclip-secrets
|
|
key: BETTER_AUTH_SECRET
|
|
- name: AGENT_JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: paperclip-secrets
|
|
key: AGENT_JWT_SECRET
|
|
- name: OPENAI_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: paperclip-secrets
|
|
key: OPENAI_API_KEY
|
|
- name: ANTHROPIC_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: paperclip-secrets
|
|
key: ANTHROPIC_API_KEY
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /paperclip
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3100
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3100
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
resources:
|
|
limits:
|
|
cpu: 2000m
|
|
memory: 4Gi
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: paperclip-data
|