Repository navigation
feat(helm): align engine overrides and connection options (FB-4387) - #117
simonzelenskifbio wants to merge 9 commits into
Conversation
Mintlify docs previewDocs were aggregated into the Firebolt documentation site.
Mintlify may take a few minutes to finish building. This comment updates on each sync while the source PR is open. |
| value: {{ .Values.postgresql.credentials.mountPath }}/username | ||
| - name: POSTGRES_PASSWORD_FILE | ||
| value: {{ .Values.postgresql.credentials.mountPath }}/password | ||
| {{- if .Values.postgresql.tls.enabled }} |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: MEDIUM
Description: postgresql.tls.enabled documents verify-full but the Metadata Service connection is not bound to that gate. The chart mounts a CA and sets libpq PGSSLMODE/PGSSLROOTCERT, while dedicated-pensieve is configured from config.yaml plus POSTGRES_*_FILE, and this PR renamed the reserved TLS env from POSTGRES_SSLMODE/POSTGRES_SSLROOTCERT to the libpq names without adding sslmode/CA fields on metadata_storage.postgresql.
Impact: An operator who sets postgresql.tls.enabled expects certificate-chain and hostname verification on the Metadata Service → external PostgreSQL path. If that client ignores PGSSLMODE, the new gate is fail-open: an on-path attacker can still intercept metadata-store traffic and database credentials. That matters because the PR replaces the previous 'encrypt at the network layer' guidance with a claimed verify-full control, so installers can drop the old mitigation while the actual Pensieve client is unchanged.
Remediation: Drive TLS from the same Metadata Service surface as host and credentials: set POSTGRES_SSLMODE/POSTGRES_SSLROOTCERT (or add sslmode/sslrootcert on metadata_storage.postgresql) and fail closed if dedicated-pensieve cannot apply verify-full to postgresql.host. Do not treat a green helm test-postgres (psql/libpq) as proof the Metadata Service client verifies the chain and hostname. Restore the previous network-layer-TLS caveat until that binding is demonstrated against /dedicated-pensieve.
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve. Cursor Security Agent reported an unresolved medium finding that the Metadata Service Postgres TLS path is not bound to
postgresql.tls.enabledverify-full. Assigned fstr and gm42 for human review.Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7548616. Configure here.
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve because the PR exceeds the medium risk threshold (engine StatefulSets, gateway routing, storage-type migration, and Metadata Service PostgreSQL TLS). Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve. The change set still includes engine StatefulSet, gateway routing, storage-type, and Metadata Service TLS paths, which is above the medium approval threshold, and an unresolved Security Agent finding remains on the Postgres TLS binding. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve because Cursor Bugbot stayed pending past the 8-minute wait and the change set exceeds the medium approval threshold. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve because Cursor Bugbot did not finish within the wait window, and engine StatefulSet, gateway routing, storage-type, and Metadata Service TLS changes remain above the medium approval threshold. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve because engine StatefulSet, gateway routing, storage-type, and Metadata Service TLS changes remain above the medium approval threshold. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Stale comment
Risk: high. Left a non-blocking comment; this automation did not approve because the change set exceeds the medium risk threshold (engine StatefulSets, gateway routing, storage-type migration, and Metadata Service PostgreSQL TLS). Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Infra Reviewer
There was a problem hiding this comment.
Risk: high. Left a non-blocking comment; this automation did not approve because engine StatefulSets, gateway routing, storage-type migration, and Metadata Service PostgreSQL TLS remain above the medium approval threshold. Cursor Bugbot completed with no unresolved findings; Security Agent was not running. Human review is needed.
Sent by Cursor Approval Agent: Infra Reviewer



Background
FB-4387: Engine overrides are inconsistently applied and the chart lacks explicit ephemeral storage, query-parameter routing, and verified TLS for external PostgreSQL.
Summary
Resolve Engine settings once across pods, ports, config, and certificates. Explicit per-Engine false/empty values replace defaults; image fields and PVC storage fields inherit individually. Keep installation identity global, support mixed ServiceAccounts, and disable automatic API token mounting at pod level. Move default resource sizing into engineSpec so custom Engines inherit it.
Add opt-in emptyDir local storage alongside the default retained PVC and legacy hostPath paths. Existing StatefulSets require a planned storage migration. Accept validated
engine=URL routing, remove the selector before forwarding, and reject duplicates/conflicts. Add external PostgreSQL verify-full TLS with a CA Secret, rollout tracking, and a Helm authentication hook. Update generated values documentation and usage guides.Stack 5/6 for FB-4382, based on #114. Merge order: #111 → #112 → #113 → #114 → this PR. Scope is the Helm chart; no operator changes.
Test Plan
These checks establish the tested deployment paths, not zero-downtime Engine rollout or automatic certificate/CA rotation guarantees. The local SQL tests needed a 4 GiB Engine limit; the 2 GiB agent overlay ran out of memory during INSERT.
Stack navigation: #111 → #112 → #113 → #114 → #117 → #120. Parent: FB-4382. All PRs remain drafts; merge in this order.
Audit follow-up: DNS, reachability, and readiness hooks now honor each Engine’s effective nodeHostSuffix. Corrected PostgreSQL TLS and supplied-ServiceAccount documentation and regenerated helm-docs. The approved final stack passes 18 render tests, full chart validation, and docs checks. Full SQL/Helm hooks passed on the local TLS-enabled release after certificate replacement.
Note
Medium Risk
Touches engine StatefulSet volumes (storage backend changes are migration-sensitive), gateway request routing, and Metadata Service database TLS—operational misconfiguration can break queries or DB connectivity.
Overview
Aligns how per-engine settings are applied by resolving each engine once via
fbinstance.effectiveEngineacross StatefulSets, services, config, and TLS SANs. Explicit per-engine values (includingfalse,[],{}) replace sharedengineSpecdefaults; image and PVCstoragefields still merge field-by-field. Default sizing moves intoengineSpec.resources, with optional per-enginecustomEngineConfigoverlays (but notinstance.id). Mixed ServiceAccounts are supported and every engine pod setsautomountServiceAccountToken: false.Adds
engineSpec.storageType(pvc,emptyDir,hostPath) with legacyhostPathStorageEnabledmapping and validation when combined withemptyDir. Gateway routing moves tofiles/gateway-routing.lua, acceptingengine=in the query string (stripped before upstream), cross-checkingX-Firebolt-Engine, and returning 400 on invalid/duplicate/conflicting selectors.For external PostgreSQL,
postgresql.tlsenables verify-full (PGSSLMODE/ CA mount on the Metadata Service), render-time validation, CA Secret checksum rollouts, and updated security/usage docs plus Helm tests and hooks.Reviewed by Cursor Bugbot for commit 064a78c. Bugbot is set up for automated code reviews on this repo. Configure here.