-
[OPIK-6699] [HELM] fix: add waitForRedis init container to opik-python-backend (#7301)
发布于
2026-07-13 08:18:12 +00:00 - [OPIK-6699] [HELM] fix: add waitForRedis init container to opik-python-backend
On a fresh deploy Redis (StatefulSet) can boot after opik-python-backend.
The startup Redis ping then fails, RQ worker init is skipped, and
Optimization Studio jobs sit in INITIALIZED forever with no manual restart
to recover them.Add a wait-for-redis-service init container (mirroring wait-for-mysql-service)
that blocks python-backend startup until the Redis service accepts connections.
The unbounded until/sleep loop survives multi-minute cold starts (PVC
provisioning + image pull) that a fixed in-code retry could not.Gated solely on RQ_WORKER_ENABLED (unset = true, matching is_rq_worker_enabled):
the worker is the only thing here that needs Redis, so executor-only deploys
(RQ_WORKER_ENABLED=false) skip the wait automatically. Uses dig rather than
defaultso an explicit bool false is honored (default swallows false).Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(helm): gate wait-for-redis on redis.enabled + add opt-out flag, quote tag
Address review feedback:
- Gate the init container on redis.enabled so managed/external Redis
installs (redis.enabled: false) skip it — no StatefulSet boot race
there, and the default host opik-redis-master would not resolve. - Add waitForRedis.enabled (default true) as an explicit opt-out for
bundled-Redis installs, restoring parity with waitForMysql.enabled. - Quote the busybox tag ("1.36") so it is a YAML string, immune to
float trailing-zero truncation on future bumps.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- [OPIK-6699] Derive wait-for-redis host from redis.fullnameOverride
The wait-for-redis-service init container hardcoded opik-redis-master,
which probes the wrong host when redis.fullnameOverride is set. Fall
back to redis.fullnameOverride (then opik-redis-master) when
waitForRedis.redis.host is unset, matching chart-pre-upgrade-migration-job.yaml.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- [OPIK-6699] Regenerate chart README for waitForRedis host default
helm-docs regeneration after defaulting waitForRedis.redis.host to "".
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com
下载附件