Skip to content

feat: Deploy WrenAI v0.19.7 to Kubernetes with Helm and Kustomize#2109

Closed
rayudu-drivex wants to merge 29 commits into
Canner:mainfrom
DriveX-Mobility-Private-Limited:Dev
Closed

feat: Deploy WrenAI v0.19.7 to Kubernetes with Helm and Kustomize#2109
rayudu-drivex wants to merge 29 commits into
Canner:mainfrom
DriveX-Mobility-Private-Limited:Dev

Conversation

@rayudu-drivex
Copy link
Copy Markdown

@rayudu-drivex rayudu-drivex commented Jan 21, 2026

Changes Made

New Files Added

  • deployment/kustomizations/kustomization.yaml - Main kustomize configuration
  • deployment/kustomizations/base/cm.yaml - ConfigMaps for Wren services
  • deployment/kustomizations/base/deploy-wren-ai-service.yaml - AI service deployment
  • deployment/kustomizations/base/deploy-wren-ui.yaml - UI deployment
  • deployment/kustomizations/base/deploy-wren-engine.yaml - Engine deployment
  • deployment/kustomizations/base/deploy-wren-ibis-server.yaml - Ibis server deployment
  • deployment/kustomizations/base/svc.yaml - Kubernetes services
  • deployment/kustomizations/base/pvc.yaml - Persistent volume claims
  • deployment/kustomizations/examples/ingress-wren_example.yaml - Ingress configuration
  • deployment/kustomizations/helm-values_postgresql_15.yaml - PostgreSQL Helm values
  • deployment/kustomizations/helm-values-qdrant_1.11.0.yaml - Qdrant Helm values

Key Features

  • WrenAI v0.19.7 deployment with all components
  • PostgreSQL 16.3.0 (bitnamilegacy) via Helm chart
  • Qdrant 1.11.0 vector database via Helm chart
  • Persistent storage configuration with AWS gp2 storage class
  • Node selectors and tolerations for pod placement
  • Nginx Ingress with TLS/SSL support
  • cert-manager integration for automatic certificate management
  • ConfigMap updates with v0.19.7 pipeline configurations including:
    • sql_summary
    • sql_breakdown
    • sql_expansion
    • question_recommendation_db_schema_retrieval

Configuration Highlights

  • Namespace: wren
  • Storage Class: AWS gp2
  • Image Versions:
    • wren-bootstrap: 0.1.5
    • wren-engine: 0.14.8
    • wren-ui: 0.24.1
    • wren-ai-service: 0.19.7
    • wren-engine-ibis: 0.14.8
  • Node Labels Required: if-wren-ai-pod=true
  • TLS: Configured with cert-manager ClusterIssuer

Secrets Required (Not Included - Deploy Separately)

wrenai-postgresql:
  - postgres-password

wrenai-secrets:
  - OPENAI_API_KEY
  - LANGFUSE_PUBLIC_KEY
  - LANGFUSE_SECRET_KEY
  - PG_USERNAME
  - PG_URL
  - USER_UUID
  - POSTHOG_API_KEY
  - POSTHOG_HOST

Deployment Instructions

Prerequisites

  1. Kubernetes cluster with storage provisioner
  2. kubectl and kustomize installed
  3. Helm v4 compatible
  4. cert-manager and nginx-ingress-controller installed
  5. Node labels: if-wren-ai-pod=true

Deploy to Production

# 1. Create secrets first (manually)
kubectl create namespace wren
kubectl create secret generic wrenai-postgresql -n wren --from-literal=postgres-password=''
kubectl create secret generic wrenai-secrets -n wren --from-literal=OPENAI_API_KEY='' ...

# 2. Label nodes
kubectl label nodes  if-wren-ai-pod=true

# 3. Update values for production
# - Edit examples/ingress-wren_example.yaml with production domain
# - Update helm-values files with production storage sizes
# - Update ClusterIssuer name in ingress

# 4. Deploy
cd deployment/kustomizations
kustomize build . --enable-helm | kubectl apply -n wren -f -

# 5. Verify
kubectl get pods -n wren
kubectl get ingress -n wren
kubectl get certificate -n wren

Configuration Changes for Production

  • Update domain in examples/ingress-wren_example.yaml
  • Update storage sizes in Helm values files
  • Configure appropriate resource limits
  • Update ClusterIssuer name for production certificates
  • Create secrets with production credentials
  • Configure backup strategy for PostgreSQL and Qdrant data

Testing

  • ✅ All pods running successfully
  • ✅ Services accessible via ingress
  • ✅ TLS certificate issued successfully
  • ✅ Application UI loads correctly
  • ✅ AI service connects to Qdrant and PostgreSQL

Summary by CodeRabbit

  • New Features

    • Added new SQL analysis pipelines: query summarization, breakdown, expansion, and database schema recommendations.
  • Infrastructure Updates

    • Deployed comprehensive Kubernetes infrastructure with optimized pod scheduling and resource management.
    • Configured storage classes and TLS/SSL certificate handling for secure deployments.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 21, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request establishes comprehensive Kubernetes infrastructure for the Wren AI system, including submodule URL updates, new SQL-related service pipelines, pod scheduling constraints across deployments, persistent volume configuration, and extensive manifest definitions for multi-component deployment with services, storage, and networking.

Changes

Cohort / File(s) Summary
Submodule Configuration
.gitmodules
Updated submodule URL from SSH (git@...) to HTTPS scheme with minor formatting adjustments.
Service Pipeline Configuration
deployment/kustomizations/base/cm.yaml
Added four new SQL-related pipelines: sql_summary, sql_breakdown, sql_expansion, and question_recommendation_db_schema_retrieval (with embedder and document_store references).
Deployment Pod Scheduling
deployment/kustomizations/base/deploy-wren-*.yaml (wren-ai-service, wren-engine, wren-ibis-server, wren-ui)
Added nodeSelector (if-wren-ai-pod: 'true') and tolerations for if-wren-ai-pod and if-monitoring-pod taints across all four deployment manifests to constrain pod placement.
Persistent Volume Configuration
deployment/kustomizations/base/pvc.yaml
Set explicit storageClassName to gp2, replacing unspecified/commented vsphere configuration.
Example Configurations
deployment/kustomizations/examples/certificate-wren_example.yaml, deployment/kustomizations/examples/ingress-wren_example.yaml
Updated certificate dnsNames and issuerRef from myhost.net example to wren.drivex.dev; updated ingress host and TLS config, added cert-manager and nginx annotations for SSL/proxy timeouts.
Helm Values
deployment/kustomizations/helm-values-qdrant_1.11.0.yaml, deployment/kustomizations/helm-values_postgresql_15.yaml
Added resource limits/requests, nodeSelector, tolerations, storageClassName (gp2), security context fields, topology constraints for Qdrant; added image config, persistence, nodeSelector, and tolerations for PostgreSQL.
Kustomization Resources
deployment/kustomizations/kustomization.yaml
Uncommented example ingress resource reference to enable it in kustomization.
Kubernetes Manifests
deployment/kustomizations/manifests.yaml, deployment/kustomizations/output.yaml
Added 1261+ lines defining complete deployment topology: ServiceAccounts (wren-postgresql, wren-qdrant), ConfigMaps (wren-ai-service-config with multi-model pipelines, wren-config, wren-qdrant), Services (wren-ai-service-svc, wren-engine-svc, wren-ibis-server-svc, wren-ui-svc, PostgreSQL, Qdrant variants), StatefulSets for PostgreSQL and Qdrant, Deployments for AI service/engine/IBIS/UI, PersistentVolumeClaims, Ingress (wren-ui-ingress routing to wren.drivex.dev), NetworkPolicy for PostgreSQL, and PodDisruptionBudget.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

deployment, wren-ai-service, ai-env-changed

Suggested reviewers

  • imAsterSun
  • yichieh-lu

Poem

🐰 A cluster takes shape, so grand and so wide,
With pipelines for SQL and nowhere to hide,
StatefulSets dance with tolerations so true,
Nodes bow to selectors—this orchestration's new!
From Postgres to Qdrant, all services align,
The Wren AI stack rises—infrastructure divine!

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant