sim icon indicating copy to clipboard operation
sim copied to clipboard

improvement(helm): added more to helm charts, remove instance selector for various cloud providers

Open waleedlatif1 opened this issue 2 months ago • 2 comments

Summary

  • added more to helm charts, remove instance selector for various cloud providers

Type of Change

  • [x] Documentation

Testing

Tested manually

Checklist

  • [x] Code follows project style guidelines
  • [x] Self-reviewed my changes
  • [x] Tests added/updated and passing
  • [x] No new warnings introduced
  • [x] I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

waleedlatif1 avatar Dec 16 '25 23:12 waleedlatif1

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Dec 17, 2025 2:19am

vercel[bot] avatar Dec 16 '25 23:12 vercel[bot]

Greptile Overview

Greptile Summary

This PR improves Helm chart usability by removing hardcoded cloud-specific node selectors and making configuration more flexible. The changes include:

  • Node selector flexibility: Commented out hardcoded nodeSelector values across all cloud provider examples (AWS, Azure, GCP) to prevent deployment failures when specific node pools/types don't exist
  • Socket server auto-detection: Removed SOCKET_SERVER_URL env var in favor of automatic service discovery via the sim.socketServerUrl helper function, simplifying configuration
  • Conservative defaults: Changed Ollama to enabled: false and TLS to enabled: false by default since these features require additional setup (GPU nodes and cert-manager)
  • Storage class adjustments: Updated AWS/Azure examples to use default storage classes (gp2, managed-csi) instead of premium options that may not exist
  • Password validation: Added regex validation ensuring PostgreSQL passwords only contain URL-safe characters to prevent DATABASE_URL parsing issues
  • Schema simplification: Removed URI format validation from optional branding URLs to allow empty values
  • Rate limit cleanup: Removed tier-specific rate limit variables, keeping only free tier limits

The PR addresses a previous review comment about incomplete regex patterns in password validation (helm/sim/templates/_helpers.tpl:207, 213).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - all changes improve configuration flexibility and usability
  • Changes are well-structured configuration improvements with no logical errors. The password validation strengthens security, auto-detection reduces configuration complexity, and commenting out node selectors prevents common deployment failures. All modifications are backwards-compatible documentation/configuration changes.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
helm/sim/examples/values-aws.yaml 5/5 Commented out hardcoded node selectors, changed storage from gp3 to gp2, disabled Ollama and TLS by default, removed SOCKET_SERVER_URL (now auto-detected)
helm/sim/templates/_helpers.tpl 5/5 Added password validation to ensure DATABASE_URL compatibility by restricting passwords to alphanumeric and safe characters
helm/sim/templates/deployment-app.yaml 5/5 Changed SOCKET_SERVER_URL from direct env var to helper function for auto-detection
helm/sim/values.yaml 5/5 Removed SOCKET_SERVER_URL env var (auto-detected), removed tier-specific rate limits, simplified configuration

Sequence Diagram

sequenceDiagram
    participant User as User/Helm Install
    participant Values as values.yaml
    participant Helper as _helpers.tpl
    participant Deployment as deployment-app.yaml
    participant App as App Container

    User->>Values: Configure realtime.enabled=true
    User->>Values: Set NEXT_PUBLIC_SOCKET_URL
    Note over User,Values: SOCKET_SERVER_URL no longer set manually
    
    Deployment->>Helper: Call sim.socketServerUrl helper
    
    alt realtime.enabled == true
        Helper->>Helper: Build internal service URL
        Helper-->>Deployment: http://sim-realtime:3002
    else realtime.enabled == false
        Helper->>Values: Read app.env.SOCKET_SERVER_URL
        Helper-->>Deployment: Custom URL or localhost fallback
    end
    
    Deployment->>App: Inject SOCKET_SERVER_URL env var
    App->>App: Use internal service for backend connections
    
    Note over Values,App: NEXT_PUBLIC_SOCKET_URL used separately<br/>for browser WebSocket connections

greptile-apps[bot] avatar Dec 16 '25 23:12 greptile-apps[bot]

@greptile

waleedlatif1 avatar Dec 17 '25 02:12 waleedlatif1