diff --git a/CHANGELOG.md b/CHANGELOG.md index ace2151..5ca1b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ All notable changes to this project will be documented in this file. - All product containers now run with `securityContext.runAsNonRoot` set to `true` to improve security ([#172]). - All pods now set `securityContext.seccompProfile.type` to `RuntimeDefault` ([#198]). - The operator now early-exits the reconcile action when the cluster is marked for deletion ([#179]). -- test: Bump vector-aggregator to 0.58.0 ([#195]). +- Support Vector 0.58.0 ([#195], [#197]). - Replace the unmaintained `serde_yaml` crate with `yaml_serde` ([#198]). ### Fixed @@ -44,6 +44,7 @@ All notable changes to this project will be documented in this file. [#189]: https://github.com/stackabletech/opensearch-operator/pull/189 [#190]: https://github.com/stackabletech/opensearch-operator/pull/190 [#195]: https://github.com/stackabletech/opensearch-operator/pull/195 +[#197]: https://github.com/stackabletech/opensearch-operator/pull/197 [#198]: https://github.com/stackabletech/opensearch-operator/pull/198 ## [26.7.0] - 2026-07-21 diff --git a/rust/operator-binary/src/controller/build/product_logging/test-vector.sh b/rust/operator-binary/src/controller/build/product_logging/test-vector.sh index f548ddb..bee7acc 100755 --- a/rust/operator-binary/src/controller/build/product_logging/test-vector.sh +++ b/rust/operator-binary/src/controller/build/product_logging/test-vector.sh @@ -1,17 +1,20 @@ #!/usr/bin/env sh -SUBSTITUTED_VECTOR_YAML="vector-subst.yaml" -trap 'rm "$SUBSTITUTED_VECTOR_YAML"' EXIT +set -eu -DATA_DIR=/stackable/log/_vector-state \ -LOG_DIR=/stackable/log \ -OPENSEARCH_SERVER_LOG_FILE=opensearch_server.json \ -NAMESPACE=default \ -CLUSTER_NAME=opensearch \ -ROLE_NAME=nodes \ -ROLE_GROUP_NAME=cluster-manager \ -VECTOR_AGGREGATOR_ADDRESS=vector-aggregator \ -VECTOR_FILE_LOG_LEVEL=info \ -envsubst < vector.yaml > "$SUBSTITUTED_VECTOR_YAML" +export DATA_DIR=/stackable/log/_vector-state +export LOG_DIR=/stackable/log +export OPENSEARCH_SERVER_LOG_FILE=opensearch_server.json +export NAMESPACE=default +export CLUSTER_NAME=opensearch +export ROLE_NAME=nodes +export ROLE_GROUP_NAME=cluster-manager +export VECTOR_AGGREGATOR_ADDRESS=http://vector-aggregator:6000 +export VECTOR_FILE_LOG_LEVEL=info -vector test "$SUBSTITUTED_VECTOR_YAML" vector-test.yaml +# Required because vector.yaml contains ${...} placeholders +export VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION=true + +vector validate --no-environment vector.yaml + +vector test vector.yaml vector-test.yaml diff --git a/rust/operator-binary/src/controller/build/product_logging/vector-test.yaml b/rust/operator-binary/src/controller/build/product_logging/vector-test.yaml index 0813bca..75511d2 100644 --- a/rust/operator-binary/src/controller/build/product_logging/vector-test.yaml +++ b/rust/operator-binary/src/controller/build/product_logging/vector-test.yaml @@ -17,6 +17,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -61,6 +62,7 @@ tests: timestamp: 2025-10-01T12:47:29.473451193+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -107,6 +109,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -141,6 +144,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -175,6 +179,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -206,6 +211,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -240,6 +246,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -274,6 +281,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -308,6 +316,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -342,6 +351,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -373,6 +383,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -407,6 +418,7 @@ tests: timestamp: 2025-10-01T12:47:29.473487331+0000 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -449,6 +461,7 @@ tests: version: 0.49.0 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -493,6 +506,7 @@ tests: level: INFO outputs: - extract_from: filtered_logs_vector + expected_event_count: 1 conditions: - type: vrl source: | @@ -506,6 +520,7 @@ tests: level: WARN outputs: - extract_from: filtered_logs_vector + expected_event_count: 1 conditions: - type: vrl source: | @@ -519,6 +534,7 @@ tests: level: ERROR outputs: - extract_from: filtered_logs_vector + expected_event_count: 1 conditions: - type: vrl source: | diff --git a/rust/operator-binary/src/controller/build/product_logging/vector.yaml b/rust/operator-binary/src/controller/build/product_logging/vector.yaml index 3cc4ab1..766ea3a 100644 --- a/rust/operator-binary/src/controller/build/product_logging/vector.yaml +++ b/rust/operator-binary/src/controller/build/product_logging/vector.yaml @@ -93,7 +93,7 @@ transforms: # Extends the processed files with the fields "container" and "file" extended_logs_files: inputs: - - processed_files_* + - processed_files_opensearch_server type: remap source: | del(.source_type) @@ -133,7 +133,8 @@ transforms: # Add the fields "namespace", "cluster", "role" and "roleGroup" to all logs extended_logs: inputs: - - extended_logs_* + - extended_logs_files + - extended_logs_vector type: remap source: | .namespace = "${NAMESPACE}" @@ -147,7 +148,11 @@ sinks: inputs: - extended_logs type: vector - address: ${VECTOR_AGGREGATOR_ADDRESS} + routing: + endpoints: + - ${VECTOR_AGGREGATOR_ADDRESS} + compression: zstd + keepalive: {} console: inputs: - vector diff --git a/tests/templates/kuttl/logging/10-install-opensearch-vector-aggregator.yaml b/tests/templates/kuttl/logging/10-install-opensearch-vector-aggregator.yaml index de8350b..71fd22f 100644 --- a/tests/templates/kuttl/logging/10-install-opensearch-vector-aggregator.yaml +++ b/tests/templates/kuttl/logging/10-install-opensearch-vector-aggregator.yaml @@ -14,4 +14,4 @@ kind: ConfigMap metadata: name: opensearch-vector-aggregator-discovery data: - ADDRESS: opensearch-vector-aggregator:6123 + ADDRESS: http://opensearch-vector-aggregator:6123