Replace FluentBit by Vector on MODE 1 - #73
Conversation
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
…heck-vector-configs
| 0.54.0 is the newest release where both the MODE 1 and MODE 2 configs | ||
| validate unchanged (0.56.0 removed `api.playground` and tightened | ||
| elasticsearch sink endpoint parsing - handle in a dedicated bump PR). --> | ||
| <vector.version>0.54.0</vector.version> |
There was a problem hiding this comment.
| [WARNING] | ||
| ==== | ||
| **MODE 1 (PostgreSQL) ONLY** | ||
| **DEPRECATED — replaced by Vector.** |
There was a problem hiding this comment.
This section can be deleted.
| ---- | ||
| bash data-index/scripts/e2e/full-test-mode1.sh # PostgreSQL + Vector + triggers | ||
| bash data-index/scripts/e2e/full-test-mode2.sh # Elasticsearch + Vector + transforms | ||
| bash data-index/scripts/e2e/full-test-mode3.sh # Kafka ingestion |
There was a problem hiding this comment.
We have a Makefile for this!
| ==== | ||
| Vector replaced FluentBit per ADR-0001 (Red Hat OpenShift alignment — Vector is | ||
| the default collector in OpenShift Logging 4.10+). The FluentBit configuration is | ||
| xref:deployment/fluentbit-config.adoc[deprecated] and kept for one release. |
There was a problem hiding this comment.
FluentBit deprecation can be removed.
| @@ -114,9 +114,9 @@ elasticsearch: | |||
| kafka: | |||
| enabled: false | |||
| fluentbit: | |||
| > **DEPRECATED (ADR-0001).** MODE 1 log collection moved from FluentBit to Vector | ||
| > (issue #63). Use `data-index/collectors/vector/mode1-postgresql/vector.yaml`. | ||
| > Kept for one release; removal target: next release. | ||
|
|
There was a problem hiding this comment.
Can be deleted, this whole dir.
| @kubectl logs -n logging -l app=vector --tail=50 | ||
|
|
||
| logs-fluentbit: ## Show FluentBit logs (DEPRECATED - ADR-0001) | ||
| @kubectl logs -n logging -l app=fluentbit --tail=50 |
| @kind delete cluster --name $(CLUSTER_NAME) 2>/dev/null || echo "No cluster to delete" | ||
| @echo "$(GREEN)✓ Cluster deleted$(NC)" | ||
|
|
||
| sync-vector-configs: ## Copy collector Vector configs into the Helm chart (run after editing collectors/vector/*) |
There was a problem hiding this comment.
Instead, perhaps helm can follow symlinks so we don't keep a copy in each dir? (collectors and helm)
There was a problem hiding this comment.
🟡 Changes recommended
Critical Vector liveness and existing-secret credential issues remain unresolved, along with configuration and readiness gaps.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR replaces FluentBit with Vector for MODE 1 event collection while retaining PostgreSQL trigger-based normalization.
Changes:
- Adds Vector PostgreSQL pipelines, Helm deployment, and validation.
- Updates E2E scripts, CI, and operational documentation.
- Deprecates FluentBit configurations and guidance.
File summaries
| File | Summary |
|---|---|
data-index/workflow-test-app/README.md |
Updates collection documentation to Vector. |
data-index/scripts/kafka/README.md |
Clarifies MODE 3 collector behavior. |
data-index/scripts/fluentbit/README.md |
Deprecates FluentBit configuration. |
data-index/scripts/fluentbit/postgresql/README.md |
Deprecates MODE 1 FluentBit documentation. |
data-index/scripts/fluentbit/generate-configmap.sh |
Adds a deprecation notice. |
data-index/scripts/fluentbit/deploy-fluentbit.sh |
Adds a deprecation notice. |
data-index/scripts/e2e/verify-infrastructure.sh |
Verifies Vector infrastructure; readiness checks should validate the full DaemonSet. |
data-index/scripts/e2e/full-test-mode1.sh |
Migrates the MODE 1 E2E flow to Vector. |
data-index/scripts/e2e/common-setup.sh |
Installs artifacts for E2E builds. |
data-index/README.md |
Updates deployment mode descriptions. |
data-index/Makefile |
Adds Vector sync and validation targets; CI does not invoke the documented config check. |
data-index/helm/data-index/values.yaml |
Defines shared Vector defaults. |
data-index/helm/data-index/values-mode2.yaml |
Selects the MODE 2 Vector configuration. |
data-index/helm/data-index/values-mode1.yaml |
Enables the MODE 1 Vector configuration. |
data-index/helm/data-index/templates/workflow-test-app.yaml |
Updates logging comments and timestamp guidance. |
data-index/helm/data-index/templates/vector-daemonset.yaml |
Adds Vector database configuration; host configurability and existing-secret credential wiring require changes. |
data-index/helm/data-index/templates/vector-configmap.yaml |
Selects mode-specific Vector configuration. |
data-index/helm/data-index/templates/fluentbit-daemonset.yaml |
Marks the FluentBit deployment deprecated. |
data-index/helm/data-index/templates/fluentbit-configmap.yaml |
Marks the FluentBit ConfigMap deprecated. |
data-index/helm/data-index/templates/data-index-service.yaml |
Updates raw-table ownership documentation. |
data-index/helm/data-index/README.md |
Documents Vector-based deployments. |
data-index/helm/data-index/configs/vector/vector-mode2-elasticsearch.yaml |
Adds the Helm MODE 2 Vector configuration. |
data-index/helm/data-index/configs/vector/vector-mode1-postgresql.yaml |
Adds the Helm MODE 1 Vector configuration. |
data-index/helm/data-index/configs/fluentbit/README.md |
Deprecates Helm FluentBit configurations. |
data-index/docs/README.md |
Updates collector documentation references. |
data-index/docs/MULTI_TENANT_FLUENTBIT.md |
Marks FluentBit guidance deprecated. |
data-index/docs/elasticsearch/TRANSFORM_OPTIMIZATION.md |
Updates MODE 2 collector references. |
data-index/docs/deployment/MODE3_KAFKA_INGESTION.md |
Updates mode comparison terminology. |
data-index/docs/deployment/MODE2_E2E_TESTING.md |
Marks the old MODE 2 guide superseded. |
data-index/data-index-storage/data-index-storage-postgresql/README.md |
Updates raw-table ingestion documentation. |
data-index/data-index-storage/data-index-storage-migrations/README.md |
Documents Vector raw-table writes. |
data-index/data-index-storage/data-index-storage-elasticsearch/README.md |
Updates Elasticsearch ingestion references. |
data-index/data-index-service/README.md |
Updates collector ownership documentation. |
data-index/data-index-e2e-tests/README.md |
Updates E2E architecture references. |
data-index/data-index-docs/README.md |
Adds Vector documentation navigation. |
data-index/data-index-docs/modules/ROOT/pages/operations/event-reliability.adoc |
Reworks reliability guidance for Vector. |
data-index/data-index-docs/modules/ROOT/pages/index.adoc |
Updates project architecture and prerequisites. |
data-index/data-index-docs/modules/ROOT/pages/getting-started.adoc |
Updates KIND deployment instructions. |
data-index/data-index-docs/modules/ROOT/pages/developers/quarkus-flow-integration.adoc |
Updates Vector integration guidance. |
data-index/data-index-docs/modules/ROOT/pages/developers/quarkus-flow-apps.adoc |
Updates application integration guidance. |
data-index/data-index-docs/modules/ROOT/pages/developers/configuration.adoc |
Updates Kubernetes collector configuration. |
data-index/data-index-docs/modules/ROOT/pages/deployment/vector-config.adoc |
Adds Vector configuration documentation. |
data-index/data-index-docs/modules/ROOT/pages/deployment/troubleshooting.adoc |
Updates troubleshooting commands for Vector. |
data-index/data-index-docs/modules/ROOT/pages/deployment/postgresql.adoc |
Replaces FluentBit deployment instructions with Vector. |
data-index/data-index-docs/modules/ROOT/pages/deployment/overview.adoc |
Updates deployment architecture. |
data-index/data-index-docs/modules/ROOT/pages/deployment/kind-local.adoc |
Updates KIND deployment guidance; removes the stale FluentBit parser troubleshooting command. |
data-index/data-index-docs/modules/ROOT/pages/deployment/kafka.adoc |
Updates mode comparison tables. |
data-index/data-index-docs/modules/ROOT/pages/deployment/fluentbit-config.adoc |
Marks FluentBit documentation deprecated. |
data-index/data-index-docs/modules/ROOT/pages/deployment/elasticsearch.adoc |
Updates Vector RBAC and HA references. |
data-index/data-index-docs/modules/ROOT/pages/architecture/postgresql-mode.adoc |
Documents the Vector PostgreSQL pipeline. |
data-index/data-index-docs/modules/ROOT/pages/architecture/overview.adoc |
Updates overall architecture. |
data-index/data-index-docs/modules/ROOT/pages/architecture/kafka-mode.adoc |
Updates ingestion-layer comparisons. |
data-index/data-index-docs/modules/ROOT/nav.adoc |
Adds Vector and deprecated FluentBit navigation. |
data-index/collectors/vector/mode1-postgresql/vector.yaml |
Adds the MODE 1 pipeline; URI password encoding and the documented Maven test phase require correction. |
data-index/collectors/src/test/java/org/kubesmarts/logic/apps/dataindex/collectors/VectorConfigValidationIT.java |
Validates Vector configuration; the documented mvn test command does not execute this integration test. |
data-index/collectors/pom.xml |
Updates Vector test/build configuration. |
data-index/collectors/examples/mode1-postgresql/daemonset.yaml |
Adds a reference DaemonSet; the liveness probe targets the wrong Vector port. |
CLAUDE.md |
Updates repository architecture and operational references. |
.github/workflows/data-index-integration-tests.yml |
Collects Vector logs in CI. |
.github/renovate.json5 |
Tracks Vector versions in example manifests. |
Review details
Suppressed comments (5)
data-index/Makefile:63
- The help text says CI runs
check-vector-configs, but no workflow invokes that target; config-copy drift can therefore pass CI despite this claim. Either add the target to the workflow or remove the parenthetical.
@echo " make check-vector-configs Verify the Helm copies are in sync (CI does this too)"
data-index/collectors/examples/mode1-postgresql/daemonset.yaml:197
- The readiness probe has the same port mismatch:
/healthis on the Vector API at 8686, not on the Prometheus exporter at 9598. With the reference DaemonSet applied, the pod will remain unready; use port 8686 here as well.
readinessProbe:
httpGet:
path: /health
port: 9598
data-index/collectors/src/test/java/org/kubesmarts/logic/apps/dataindex/collectors/VectorConfigValidationIT.java:89
- The new MODE 1 validation is in
VectorConfigValidationIT; the collectors POM runs**/*IT.javaunder Failsafe and does not include IT classes in Surefire. Consequently,mvn test -pl collectors(the command documented by this config) will not execute this check. Run/documentmvn verifyor configure/rename the test so the promised command actually covers the new pipeline.
@Test
void mode1PostgreSQLConfigIsValid() throws Exception {
Path configPath = getConfigPath("mode1-postgresql/vector.yaml");
String configContent = Files.readString(configPath);
assertThat(configContent)
.as("Config should define the kubernetes_logs source")
.contains("sources:")
.contains("kubernetes_logs:");
assertThat(configContent)
.as("Config should define one postgres sink per raw table")
.contains("postgres_workflow:")
.contains("postgres_task:")
.contains("table: workflow_events_raw")
.contains("table: task_events_raw");
validateWithVectorContainer(configPath, MODE1_ENV);
data-index/collectors/vector/mode1-postgresql/vector.yaml:168
- The PostgreSQL connection URI embeds the password without URI encoding. Valid production passwords containing reserved characters such as
@,/,#, or%will be parsed as part of the URI structure and the sink will fail to connect; the old pgsql configuration passed the password as a separate option. Use a URI-safe/encoded credential or a connection mechanism that does not embed raw credentials in the endpoint.
endpoint: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
data-index/collectors/vector/mode1-postgresql/vector.yaml:181
- The task sink repeats the raw-password URI construction, so passwords with URI-reserved characters will fail task-event delivery even if the workflow sink is corrected. Apply the same credential-encoding/connection handling to this endpoint.
endpoint: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
- Files reviewed: 59/60 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…x Vector config - Remove deprecated FluentBit files/dirs, values, and doc references now that MODE 1 and MODE 2 are fully on Vector - Make POSTGRES_HOST configurable and use secretKeyRef for Vector's DB credentials instead of literal values (adds the Postgres secret to the logging namespace) - Symlink helm/configs/vector/*.yaml to collectors/vector/*, replacing the copy+diff sync with a check that the symlink exists and resolves - Fix liveness/readiness probe port, mvn verify docs, and a couple of stale e2e/troubleshooting commands flagged by Copilot
make check-vector-configs already guards the symlinks; drop the duplicate Java assertion and the now-stale doc reference to it.
Auto-update triggered by: Replace FluentBit by Vector on MODE 1 (#73) * Replace FluentBit by Vector on MODE 1 Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com> * Sync Helm MODE 1 Vector config with collector source; add make sync/check-vector-configs * Make e2e setup run mvn install so data-index-e2e-tests resolves SNAPSHOT deps * Fix flaky Vector container startup check in collectors IT * Address PR #73 review comments: drop FluentBit remnants, fix Vector config - Remove deprecated FluentBit files/dirs, values, and doc references now that MODE 1 and MODE 2 are fully on Vector - Make POSTGRES_HOST configurable and use secretKeyRef for Vector's DB credentials instead of literal values (adds the Postgres secret to the logging namespace) - Symlink helm/configs/vector/*.yaml to collectors/vector/*, replacing the copy+diff sync with a check that the symlink exists and resolves - Fix liveness/readiness probe port, mvn verify docs, and a couple of stale e2e/troubleshooting commands flagged by Copilot * Remove symlink-check test from VectorConfigValidationIT make check-vector-configs already guards the symlinks; drop the duplicate Java assertion and the now-stale doc reference to it. --------- Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com> Graph statistics: - See .graphify/GRAPH_REPORT.md for details - Updated by GitHub Actions workflow
Changes
This pull request aims to replace the FluentBit to Vector.
Closes #63
Below you can see how to test the entire change with a real Kubernetes cluster with KinD.
Step-by-step walkthrough to manually verify the Vector migration for MODE 1
Starting Colima:
1. Create the KIND cluster
Maps
localhost:30080(GraphQL),localhost:30082(workflow app),localhost:30432(Postgres).2. Build + load the MODE 1 images
Check docker images:
3. Install the chart (Postgres + Vector + triggers)
Confirm one
vectorDaemonSet, nofluentbit:4. Wait for pods
PostgreSQL:
kubectl wait -n postgresql --for=condition=ready pod/postgresql-0 --timeout=180sVector:
kubectl wait -n logging --for=condition=ready pod -l app=vector --timeout=180sData Index Service:
kubectl wait -n default --for=condition=ready pod -l app=data-index-service --timeout=300sWorkflow Test App:
kubectl wait -n workflows --for=condition=ready pod -l app=workflow-test-app --timeout=300s5. Verify the infrastructure
Expect: Vector running, GraphQL ready, 4 tables, 2 triggers.
NOTE: If you got some "Timed out." you can restart the
daemonset/vector:6. Turn on event tracing (optional)
kubectl set env daemonset/vector -n logging DEBUG_EVENTS=true(leave that streaming in another terminal)
7. Trigger a workflow
Traced Vector output should show lines shaped
{"tag":"io.serverlessworkflow.workflow.started.v1","time":"...","data":{...}}.8. Verify raw tables (written by the Vector
postgressinks)9. Verify normalized tables (written by the V1 triggers)
Expect the workflow row
status = COMPLETEDand its task rows.10. Verify the GraphQL API
WorkflowInstance/TaskExecutionfields:id name namespace version status startedAt endedAt lastUpdate eventTimestamp inputData outputData error{ ... } taskExecutions{ ... }. Introspect with{ __type(name:"WorkflowInstance"){ fields{ name } } }.11. Idempotency spot-check (optional)
Expect:
0 rows.12. Cleanup
Config source of truth:
data-index/collectors/vector/mode1-postgresql/vector.yaml.Full reference:
data-index/data-index-docs/modules/ROOT/pages/deployment/vector-config.adoc.