Repository navigation
feat: Make Vector PostgreSQL schema configurable via POSTGRES_SCHEMA - #84
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical issues remain with the sink connection syntax and propagation of the selected schema to migrations and application datasources.
Review effort: Lite
Findings: 3
Open (5)
Unsupported currentSchema option will not set PostgreSQL search_path · New Schema change is not propagated to migrations and applications · New Selected schema is not wired through Helm deployment · New Validation test does not verify PostgreSQL schema routing · New Documentation omits PostgreSQL schema configuration · New
What changed in this PR
This PR makes Vector’s PostgreSQL schema configurable through Helm and environment variables.
Changes:
- Adds
POSTGRES_SCHEMAto Vector sink configuration. - Exposes
postgresql.schemathrough Helm. - Updates Vector deployment wiring and validation configuration.
| File | Summary |
|---|---|
data-index/helm/data-index/values.yaml |
Adds the PostgreSQL schema value. |
data-index/helm/data-index/templates/vector-daemonset.yaml |
Injects the schema into Vector. |
data-index/collectors/vector/mode1-postgresql/vector.yaml |
Adds schema-aware sink configuration and documentation. |
data-index/collectors/src/test/java/org/kubesmarts/logic/apps/dataindex/collectors/VectorConfigValidationIT.java |
Supplies the schema during validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ricardozanini
force-pushed
the
feat/vector-schema-configurable
branch
2 times, most recently
from
September 28, 2026 17:24
2d59023 to
f4df360
Compare
ricardozanini
force-pushed
the
feat/vector-schema-configurable
branch
3 times, most recently
from
September 28, 2026 17:38
9aab81d to
4de9747
Compare
…DataIndex Configure schema for Vector's search_path, Flyway migrations, and DataIndex JDBC connection. Allows operator to deploy with custom schemas (e.g., 'logicflow' in production). Changes: - Vector endpoint: Add search_path parameter via PostgreSQL connection option - DataIndex JDBC: Add currentSchema parameter to connection string - Flyway: Configure target schema via QUARKUS_FLYWAY_SCHEMAS - DaemonSet: Add POSTGRES_SCHEMA environment variable for Vector - Helm values: Set default schema to logicapps for testing - E2E tests: Pass POSTGRES_SCHEMA to verification script - Documentation: Update vector-config.adoc with schema configuration examples - Unit tests: Validate Vector config with logicapps schema - CI fix: Update MODE 2 build command to use Maven reactor with -am flag Verified: KIND E2E MODE 1 test passes with custom schema
ricardozanini
force-pushed
the
feat/vector-schema-configurable
branch
from
September 28, 2026 18:53
5de1234 to
6ea12dc
Compare
3 tasks
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
Vector and Flyway migrations both interact with PostgreSQL tables, but lacked a mechanism to ensure they use the same schema. This PR makes PostgreSQL schema explicitly configurable across Vector, Flyway, and DataIndex services, ensuring consistent table resolution and migration creation.
Addresses #83
Technical Details
The Fix
Vector PostgreSQL sink now uses the
search_pathconnection parameter:DataIndex JDBC datasource (Flyway + JPA) now includes schema via
currentSchema:Flyway migrations target the configured schema:
This ensures all components consistently target the same schema:
Schema Configuration
logicapps(for testing and production use cases)postgresql.schemavaluePOSTGRES_SCHEMAenvironment variablecurrentSchemaQUARKUS_FLYWAY_SCHEMASenvironment variableUsage in logic-operator
When logic-operator deploys DataIndex with a custom schema:
All components automatically use the same schema:
logicflowschemalogicflowschema for insertslogicflowschemalogicflowschema for tablesChanges
options=-c%20search_path%3D${POSTGRES_SCHEMA}to PostgreSQL sinkcurrentSchemaparameter to connection string helperQUARKUS_FLYWAY_SCHEMASenvironment variablePOSTGRES_SCHEMAenvironment variablepostgresql.schemadefault tologicappsPOSTGRES_SCHEMA=logicappsto verificationPOSTGRES_SCHEMAenv var)POSTGRES_SCHEMA=logicapps-amflagVerification
Unit Tests ✅
E2E Tests ✅
Implementation Notes
logicappssupports the operator use case while remaining configurable${POSTGRES_SCHEMA:-public}fallback for backward compatibility