feat: Prefect docket URL and cleaner service separation for enterprise presets#68
Draft
fatih-acar wants to merge 2 commits into
Draft
feat: Prefect docket URL and cleaner service separation for enterprise presets#68fatih-acar wants to merge 2 commits into
fatih-acar wants to merge 2 commits into
Conversation
50d8027 to
4433643
Compare
Pulls in native docket support (prefect-helm#615) and Prefect 3.7.x chart defaults. The chart now injects PREFECT_SERVER_DATABASE_* env vars instead of the PREFECT_API_DATABASE_* names; the Prefect bundled in Infrahub (3.6.13) accepts both spellings via settings aliases. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Fatih Acar <fatih@opsmill.com>
…sets Set backgroundServices.messaging.docket.url in every preset so all Prefect pods share a Redis-backed docket (db 2, next to messaging on db 1). Without it each background-services replica runs its own memory:// docket, which Prefect documents as causing duplicate scheduled runs and duplicate automation actions; the medium/large presets run 2 replicas. Validation now rejects the example hostname in docket.url just like messaging.redis.host. Drop the per-service PREFECT_SERVER_SERVICES_*_ENABLED toggles: the PREFECT__SERVER_WEBSERVER_ONLY switch (what 'prefect server start --no-services' toggles internally) already disables all background services on the API pods, and the background-services deployment runs them with their default enabled state. The event_logger service (default off, debug only) is no longer force-enabled. Pin PREFECT_API_DATABASE_MIGRATE_ON_START=false explicitly on the server: the bumped chart injects the renamed PREFECT_SERVER_ alias, but create_infrahub_prefect() checks this exact legacy name to detect distributed mode and run the Infrahub Prefect bootstrap. ref: https://docs.prefect.io/v3/advanced/self-hosted Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Fatih Acar <fatih@opsmill.com>
4433643 to
8a31ca6
Compare
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.
Summary
Implements the two recommendations from Prefect's self-hosted scaling guide in the enterprise config presets:
prefect-serversubchart to2026.6.5172345and setsbackgroundServices.messaging.docket.url(native support from feat(prefect-server): add support for PREFECT_SERVER_DOCKET_URL PrefectHQ/prefect-helm#615) in every preset. The chart injectsPREFECT_SERVER_DOCKET_URLinto both the API server and background-services deployments. Without this, each background-services replica runs its ownmemory://docket — Prefect documents this as causing duplicate scheduled runs and duplicate automation actions, and the medium/large presets run 2 replicas.PREFECT_SERVER_SERVICES_*_ENABLEDenv toggles.PREFECT__SERVER_WEBSERVER_ONLY(already set; it is the exact switchprefect server start --no-servicestoggles internally, and the only form usable with Infrahub's custom gunicorn entrypoint) disables all services on API pods, and the background-services deployment runs them with default enabled state.Notes
_validation.tplnow rejects the example hostname indocket.urlthe same way it does formessaging.redis.host.PREFECT_SERVER_DATABASE_{CONNECTION_URL,MIGRATE_ON_START}. Prefect 3.6.13 (bundled in Infrahub 1.9.8) accepts both spellings, butcreate_infrahub_prefect()checks the literal legacy namePREFECT_API_DATABASE_MIGRATE_ON_STARTto detect distributed mode — the presets now set it explicitly so the Infrahub Prefect bootstrap keeps running.event_loggerservice (debug-only, disabled by default upstream) is no longer force-enabled on background services.gateway.enabled: false.Verification
helm templatewith all 5 presets:PREFECT_SERVER_DOCKET_URLrendered once on each deployment, no*_ENABLEDleftovers, both migrate-on-start spellings present on the API pods, no migrations Job rendered.docket.urlstill contains the example hostname; default (non-preset) renders of both charts pass.🤖 Generated with Claude Code