feat: add Prefect readiness init container#60
Open
PhillSimonds wants to merge 2 commits into
Open
Conversation
Add an opt-out init container to infrahubTaskWorker and infrahubServer deployments that blocks main-container startup until Prefect's /api/health endpoint responds. Resolves the CrashLoopBackOff observed on fresh installs when task worker pods race ahead of the bundled prefect-server. - New waitForPrefect values block on both deployments (enabled=true, busybox:1.37, http://prefect-server:4200/api/health, pollSeconds=5, timeoutSeconds=300, explicit resource requests/limits) - Shared infrahub-helm.waitForPrefect.initContainer helper in _helpers.tpl so both deployments render the same shape - charts/infrahub: 4.20.2 -> 4.21.0 (MINOR, additive) - charts/infrahub-enterprise: 4.6.3 -> 4.6.4 (PATCH); infrahub subchart dep 4.20.2 -> 4.21.0 (enterprise inherits the gate transparently) - README values table updated with 18 new rows Validated on OrbStack: - Community and enterprise default installs: zero httpx.ConnectError messages in task-worker or server logs - Gate-disabled render is byte-identical to pre-feature baseline outside the init-container region (only helm.sh/chart label and regenerated rabbitmq-erlang-cookie differ) - Unreachable gate surfaces Init:Error at exactly timeoutSeconds (30s test confirmed) Note: one task-worker replica still observed restarting once on fresh installs from prefect.exceptions.ObjectAlreadyExists (a race between replicas creating the Prefect work pool). This is separate from the httpx.ConnectError symptom covered by this fix and warrants a follow-up issue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PhillSimonds
force-pushed
the
001-prefect-readiness-gate
branch
from
April 17, 2026 04:56
791d6d5 to
792b56d
Compare
Contributor
|
Thanks @PhillSimonds |
fatih-acar
reviewed
Apr 17, 2026
| # This is the chart version. This version number should be incremented each time you make changes | ||
| # to the chart and its templates, including the app version. | ||
| # Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
| version: 4.6.4 |
Contributor
There was a problem hiding this comment.
We should bump to 4.7.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #59
Add an opt-out init container to infrahubTaskWorker and infrahubServer deployments that blocks main-container startup until Prefect's /api/health endpoint responds. Resolves the CrashLoopBackOff observed on fresh installs when task worker pods race ahead of the bundled prefect-server.
Validated on OrbStack:
Note: one task-worker replica still observed restarting once on fresh installs from prefect.exceptions.ObjectAlreadyExists (a race between replicas creating the Prefect work pool). This is separate from the httpx.ConnectError symptom covered by this fix and warrants a follow-up issue.