Skip to content

P4DEVOPS-11504: add waitForRedis init container option to vmpooler chart#182

Open
smahima27 wants to merge 5 commits into
mainfrom
P4DEVOPS-11504-wait-for-redis
Open

P4DEVOPS-11504: add waitForRedis init container option to vmpooler chart#182
smahima27 wants to merge 5 commits into
mainfrom
P4DEVOPS-11504-wait-for-redis

Conversation

@smahima27

Copy link
Copy Markdown
Contributor

Problem

vmpooler-dev hits Redis::CannotConnectError on startup because the API container starts before Redis is ready. Dev Redis has limited resources (13m CPU / 96Mi memory) and takes longer to become available, exhausting the connection retry window.

Workaround (this PR)

Adds an opt-in waitForRedis init container to the api and manager deployments. When enabled, Kubernetes holds the main containers until the init container confirms Redis is accepting connections via redis-cli ping.

Changes

  • values.yaml — added api.waitForRedis: false and manager.waitForRedis: false (off by default, safe for prod)
  • templates/deployment-api.yaml — conditional initContainers block when api.waitForRedis: true
  • templates/deployment-manager.yaml — same for manager
  • Chart.yaml — version bumped 3.10.4

Usage

Enable in resource-constrained environments (e.g. vmpooler-dev) by setting:

vmpooler:
  api:
    waitForRedis: true
  manager:
    waitForRedis: true

Note

The permanent fix is in puppetlabs/vmpooler#701 — passing redis_reconnect_attempts to the API's Redis connection. Once that ships and a new image is released, the waitForRedis flag can be disabled.

@smahima27 smahima27 requested a review from a team as a code owner May 5, 2026 11:31
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