supabase-kubernetes icon indicating copy to clipboard operation
supabase-kubernetes copied to clipboard

Make postgres initContainer images configurable via values.yaml

Open hongaar opened this issue 3 months ago • 0 comments

This PR addresses the hardcoded postgres:15-alpine images used in initContainers across multiple Supabase services by making them configurable through values.yaml.

Problem

Previously, all initContainers across the Supabase Helm chart used a hardcoded postgres:15-alpine image, making it impossible to:

  • Use different postgres versions for database connectivity testing
  • Use custom postgres images with additional tools or configurations
  • Control image pull policies for initContainers
  • Use images from private registries

Solution

Added a new global initContainer configuration section to values.yaml that follows the same pattern used by other services in the chart:

initContainer:
  image:
    repository: postgres
    pullPolicy: IfNotPresent
    tag: "15-alpine"

Updated all deployment templates to reference this configurable value instead of the hardcoded image:

  • charts/supabase/templates/analytics/deployment.yaml
  • charts/supabase/templates/auth/deployment.yaml
  • charts/supabase/templates/realtime/deployment.yaml
  • charts/supabase/templates/storage/deployment.yaml
  • charts/supabase/templates/test/db.yaml

Usage Example

Users can now customize the initContainer image in their values.yaml:

initContainer:
  image:
    repository: postgres
    pullPolicy: Always
    tag: "14"

Backward Compatibility

The change is fully backward compatible - the default values maintain the existing behavior (postgres:15-alpine with IfNotPresent pull policy).

Testing

  • ✅ Helm lint passes
  • ✅ Template generation works correctly
  • ✅ Verified custom image configurations are applied correctly
  • ✅ All initContainers now use the configured image values

🤖 This PR was generated by Copilot

hongaar avatar Sep 05 '25 00:09 hongaar