Files
homelab/cluster/applications/firecrawl/chart/templates/postgres.yaml
Hermes Agent service account 6bcb6fa93f refactor(firecrawl): Convert to production-ready Helm chart with persistent storage
CRITICAL FIXES:
 Add PersistentVolumeClaims for all stateful services
   - PostgreSQL: 20Gi PVC on nfs-emporium (data persistence)
   - Redis: 10Gi PVC on nfs-emporium (cache and queue)
   - RabbitMQ: 5Gi PVC on nfs-emporium (message queue)

 Pin all image versions (no more 'latest' tags)
   - Firecrawl API/Worker: v1.0.0
   - Playwright Service: v1.0.0
   - PostgreSQL (nuq-postgres): v1.0.0
   - Redis: 7.4.1-alpine
   - RabbitMQ: 3.13.7-management-alpine

 Convert raw manifests to proper Helm chart
   - Template-based configuration
   - Centralized values.yaml
   - Proper Helm helpers and labels
   - Easy configuration management

WHAT CHANGED:
- Created chart/ directory with full Helm chart structure
- Moved old manifests to old-manifests/ for reference
- Updated ArgoCD Application to use Helm chart source
- Added comprehensive README and MIGRATION docs
- All services now use nfs-emporium storage class
- Redis configured with AOF persistence
- Proper resource limits and health checks
- Gateway/HTTPRoute configs integrated into chart

DEPLOYMENT:
ArgoCD will automatically sync and apply changes.
Old ephemeral data will be lost (fresh start with persistence).

Resolves data loss issues and brings deployment to production standards.
2026-06-04 16:56:29 -05:00

68 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "firecrawl.fullname" . }}-postgres
namespace: {{ .Values.namespace.name }}
labels:
{{- include "firecrawl.labels" . | nindent 4 }}
app.kubernetes.io/component: postgres
spec:
replicas: {{ .Values.postgres.replicaCount }}
selector:
matchLabels:
{{- include "firecrawl.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: postgres
template:
metadata:
labels:
{{- include "firecrawl.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: postgres
spec:
containers:
- name: postgres
image: "{{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}"
imagePullPolicy: {{ .Values.postgres.image.pullPolicy }}
env:
- name: POSTGRES_USER
value: {{ .Values.postgres.auth.username | quote }}
- name: POSTGRES_PASSWORD
value: {{ .Values.postgres.auth.password | quote }}
- name: POSTGRES_DB
value: {{ .Values.postgres.auth.database | quote }}
ports:
- containerPort: 5432
name: postgres
resources:
{{- toYaml .Values.postgres.resources | nindent 12 }}
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
subPath: postgres
volumes:
- name: postgres-data
{{- if .Values.postgres.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "firecrawl.fullname" . }}-postgres-pvc
{{- else }}
emptyDir: {}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "firecrawl.fullname" . }}-postgres
namespace: {{ .Values.namespace.name }}
labels:
{{- include "firecrawl.labels" . | nindent 4 }}
app.kubernetes.io/component: postgres
spec:
type: {{ .Values.postgres.service.type }}
ports:
- port: {{ .Values.postgres.service.port }}
targetPort: postgres
protocol: TCP
name: postgres
selector:
{{- include "firecrawl.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: postgres