Files
homelab/cluster/applications/firecrawl/chart/templates/configmap.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

90 lines
3.8 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "firecrawl.fullname" . }}-config
namespace: {{ .Values.namespace.name }}
labels:
{{- include "firecrawl.labels" . | nindent 4 }}
data:
# Environment
ENV: {{ .Values.config.ENV | quote }}
IS_KUBERNETES: {{ .Values.config.IS_KUBERNETES | quote }}
LOGGING_LEVEL: {{ .Values.config.LOGGING_LEVEL | quote }}
# Service configuration
PORT: {{ .Values.config.PORT | quote }}
HOST: {{ .Values.config.HOST | quote }}
WORKER_PORT: {{ .Values.config.WORKER_PORT | quote }}
# Performance tuning
NUM_WORKERS_PER_QUEUE: {{ .Values.config.NUM_WORKERS_PER_QUEUE | quote }}
CRAWL_CONCURRENT_REQUESTS: {{ .Values.config.CRAWL_CONCURRENT_REQUESTS | quote }}
MAX_CONCURRENT_JOBS: {{ .Values.config.MAX_CONCURRENT_JOBS | quote }}
# Authentication
USE_DB_AUTHENTICATION: {{ .Values.config.USE_DB_AUTHENTICATION | quote }}
# Service URLs
REDIS_URL: {{ .Values.config.REDIS_URL | default (printf "redis://%s-redis:%d" (include "firecrawl.fullname" .) (.Values.redis.service.port | int)) | quote }}
REDIS_RATE_LIMIT_URL: {{ .Values.config.REDIS_RATE_LIMIT_URL | default (printf "redis://%s-redis:%d" (include "firecrawl.fullname" .) (.Values.redis.service.port | int)) | quote }}
PLAYWRIGHT_MICROSERVICE_URL: {{ .Values.config.PLAYWRIGHT_MICROSERVICE_URL | default (printf "http://%s-playwright:%d/scrape" (include "firecrawl.fullname" .) (.Values.playwrightService.service.port | int)) | quote }}
# Database configuration
POSTGRES_HOST: {{ printf "%s-postgres" (include "firecrawl.fullname" .) | quote }}
POSTGRES_PORT: {{ .Values.postgres.service.port | quote }}
POSTGRES_USER: {{ .Values.postgres.auth.username | quote }}
POSTGRES_PASSWORD: {{ .Values.postgres.auth.password | quote }}
POSTGRES_DB: {{ .Values.postgres.auth.database | quote }}
# RabbitMQ configuration
NUQ_RABBITMQ_URL: {{ printf "amqp://%s-rabbitmq:%d" (include "firecrawl.fullname" .) (.Values.rabbitmq.service.amqpPort | int) | quote }}
# Optional external services
{{- if .Values.config.OPENAI_BASE_URL }}
OPENAI_BASE_URL: {{ .Values.config.OPENAI_BASE_URL | quote }}
{{- end }}
{{- if .Values.config.MODEL_NAME }}
MODEL_NAME: {{ .Values.config.MODEL_NAME | quote }}
{{- end }}
{{- if .Values.config.MODEL_EMBEDDING_NAME }}
MODEL_EMBEDDING_NAME: {{ .Values.config.MODEL_EMBEDDING_NAME | quote }}
{{- end }}
{{- if .Values.config.OLLAMA_BASE_URL }}
OLLAMA_BASE_URL: {{ .Values.config.OLLAMA_BASE_URL | quote }}
{{- end }}
{{- if .Values.config.PROXY_SERVER }}
PROXY_SERVER: {{ .Values.config.PROXY_SERVER | quote }}
{{- end }}
{{- if .Values.config.PROXY_USERNAME }}
PROXY_USERNAME: {{ .Values.config.PROXY_USERNAME | quote }}
{{- end }}
{{- if .Values.config.SEARXNG_ENDPOINT }}
SEARXNG_ENDPOINT: {{ .Values.config.SEARXNG_ENDPOINT | quote }}
{{- end }}
{{- if .Values.config.SEARXNG_ENGINES }}
SEARXNG_ENGINES: {{ .Values.config.SEARXNG_ENGINES | quote }}
{{- end }}
{{- if .Values.config.SEARXNG_CATEGORIES }}
SEARXNG_CATEGORIES: {{ .Values.config.SEARXNG_CATEGORIES | quote }}
{{- end }}
{{- if .Values.config.SELF_HOSTED_WEBHOOK_URL }}
SELF_HOSTED_WEBHOOK_URL: {{ .Values.config.SELF_HOSTED_WEBHOOK_URL | quote }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "firecrawl.fullname" . }}-playwright-config
namespace: {{ .Values.namespace.name }}
labels:
{{- include "firecrawl.labels" . | nindent 4 }}
data:
PORT: {{ .Values.playwrightConfig.PORT | quote }}
MAX_CONCURRENT_PAGES: {{ .Values.playwrightConfig.MAX_CONCURRENT_PAGES | quote }}
{{- if .Values.playwrightConfig.ALLOW_LOCAL_WEBHOOKS }}
ALLOW_LOCAL_WEBHOOKS: {{ .Values.playwrightConfig.ALLOW_LOCAL_WEBHOOKS | quote }}
{{- end }}
{{- if .Values.playwrightConfig.BLOCK_MEDIA }}
BLOCK_MEDIA: {{ .Values.playwrightConfig.BLOCK_MEDIA | quote }}
{{- end }}