Skip to content

Conversation

hongaar
Copy link

@hongaar hongaar commented Sep 5, 2025

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

Copilot AI and others added 2 commits September 4, 2025 23:53
Co-authored-by: hongaar <205834+hongaar@users.noreply.github.com>
@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 00:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes postgres initContainer images configurable across Supabase services by introducing a global initContainer configuration section in values.yaml, replacing hardcoded postgres:15-alpine references.

  • Adds global initContainer.image configuration with repository, pullPolicy, and tag settings
  • Updates all deployment templates to use the configurable image values instead of hardcoded strings
  • Maintains backward compatibility with existing default values

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
charts/supabase/values.yaml Adds global initContainer image configuration section
charts/supabase/templates/analytics/deployment.yaml Updates initContainer to use configurable image values
charts/supabase/templates/auth/deployment.yaml Updates initContainer to use configurable image values
charts/supabase/templates/realtime/deployment.yaml Updates initContainer to use configurable image values
charts/supabase/templates/storage/deployment.yaml Updates initContainer to use configurable image values
charts/supabase/templates/test/db.yaml Updates test container to use configurable image values

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

2 participants