diff --git a/CHANGELOG.md b/CHANGELOG.md index 49c95b4f..3f4f5fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ - Environment variable overrides (`envOverrides`) are now applied after all environment variables set by the operator ([#799]). - Make operations infallible where dependent on static inputs ([#803]). -- test: Bump vector-aggregator to 0.58.0 ([#821]). +- Support Vector 0.58.0 ([#821], [#825]). - test: Update OPA to 1.20.2 in integration tests ([#823]). - All pods now set `securityContext.seccompProfile.type` to `RuntimeDefault` ([#824]). - Replace the unmaintained `serde_yaml` with `yaml_serde` ([#824]). @@ -66,6 +66,7 @@ [#821]: https://github.com/stackabletech/hbase-operator/pull/821 [#823]: https://github.com/stackabletech/hbase-operator/pull/823 [#824]: https://github.com/stackabletech/hbase-operator/pull/824 +[#825]: https://github.com/stackabletech/hbase-operator/pull/825 ## [26.7.0] - 2026-07-21 diff --git a/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh b/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh index c2072269..48b4448d 100755 --- a/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh +++ b/rust/operator-binary/src/controller/build/properties/product_logging/test-vector.sh @@ -1,11 +1,19 @@ #!/usr/bin/env sh -DATA_DIR=/stackable/log/_vector-state \ -LOG_DIR=/stackable/log \ -NAMESPACE=default \ -CLUSTER_NAME=hbase \ -ROLE_NAME=regionserver \ -ROLE_GROUP_NAME=default \ -VECTOR_AGGREGATOR_ADDRESS=vector-aggregator \ -VECTOR_FILE_LOG_LEVEL=info \ +set -eu + +export DATA_DIR=/stackable/log/_vector-state +export LOG_DIR=/stackable/log +export NAMESPACE=default +export CLUSTER_NAME=hbase +export ROLE_NAME=regionserver +export ROLE_GROUP_NAME=default +export VECTOR_AGGREGATOR_ADDRESS=http://vector-aggregator:6000 +export VECTOR_FILE_LOG_LEVEL=info + +# 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/properties/product_logging/vector-test.yaml b/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml index 8266dca5..40a79236 100644 --- a/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml +++ b/rust/operator-binary/src/controller/build/properties/product_logging/vector-test.yaml @@ -17,6 +17,7 @@ tests: timestamp: 2025-10-02T09:27:28.582Z outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -47,6 +48,7 @@ tests: timestamp: 2025-10-02T09:27:28.582Z outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -82,6 +84,7 @@ tests: timestamp: 2025-10-02T09:27:29.473487331Z outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -119,6 +122,7 @@ tests: version: 0.49.0 outputs: - extract_from: extended_logs + expected_event_count: 1 conditions: - type: vrl source: | @@ -147,6 +151,7 @@ tests: level: INFO outputs: - extract_from: filtered_logs_vector + expected_event_count: 1 conditions: - type: vrl source: | diff --git a/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml b/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml index e4d40b6e..2fd3d923 100644 --- a/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml +++ b/rust/operator-binary/src/controller/build/properties/product_logging/vector.yaml @@ -176,7 +176,9 @@ transforms: # Extends the processed files with the fields "container" and "file" extended_logs_files: inputs: - - processed_files_* + - processed_files_stdout + - processed_files_stderr + - processed_files_log4j2 type: remap source: | del(.source_type) @@ -214,7 +216,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}" @@ -228,4 +231,8 @@ sinks: inputs: - extended_logs type: vector - address: ${VECTOR_AGGREGATOR_ADDRESS} + routing: + endpoints: + - ${VECTOR_AGGREGATOR_ADDRESS} + compression: zstd + keepalive: {} diff --git a/tests/templates/kuttl/logging/01-install-hbase-vector-aggregator.yaml b/tests/templates/kuttl/logging/01-install-hbase-vector-aggregator.yaml index bc239def..1f924504 100644 --- a/tests/templates/kuttl/logging/01-install-hbase-vector-aggregator.yaml +++ b/tests/templates/kuttl/logging/01-install-hbase-vector-aggregator.yaml @@ -14,4 +14,4 @@ kind: ConfigMap metadata: name: hbase-vector-aggregator-discovery data: - ADDRESS: hbase-vector-aggregator:6123 + ADDRESS: http://hbase-vector-aggregator:6123 diff --git a/tests/templates/kuttl/logging/hbase-vector-aggregator-values.yaml.j2 b/tests/templates/kuttl/logging/hbase-vector-aggregator-values.yaml.j2 index b1384987..098fb0fb 100644 --- a/tests/templates/kuttl/logging/hbase-vector-aggregator-values.yaml.j2 +++ b/tests/templates/kuttl/logging/hbase-vector-aggregator-values.yaml.j2 @@ -112,7 +112,9 @@ customConfig: aggregator: inputs: [vector] type: vector - address: {{ lookup('env', 'VECTOR_AGGREGATOR') }} + routing: + endpoints: + - {{ lookup('env', 'VECTOR_AGGREGATOR') }} buffer: # Avoid back pressure from VECTOR_AGGREGATOR. The test should # not fail if the aggregator is not available. diff --git a/tests/templates/kuttl/smoke/30-assert.yaml.j2 b/tests/templates/kuttl/smoke/30-assert.yaml.j2 index 502b7ae1..5038ff06 100644 --- a/tests/templates/kuttl/smoke/30-assert.yaml.j2 +++ b/tests/templates/kuttl/smoke/30-assert.yaml.j2 @@ -324,7 +324,7 @@ spec: - |- mkdir --parents /stackable/log/_vector-state # Vector will ignore SIGTERM (as PID != 1) and must be shut down by writing a shutdown trigger file - vector & vector_pid=$! + /stackable/bin/vector-with-env-var-interpolation & vector_pid=$! if [ ! -f "/stackable/log/_vector/shutdown" ]; then mkdir -p /stackable/log/_vector inotifywait -qq --event create /stackable/log/_vector; @@ -559,7 +559,7 @@ spec: - |- mkdir --parents /stackable/log/_vector-state # Vector will ignore SIGTERM (as PID != 1) and must be shut down by writing a shutdown trigger file - vector & vector_pid=$! + /stackable/bin/vector-with-env-var-interpolation & vector_pid=$! if [ ! -f "/stackable/log/_vector/shutdown" ]; then mkdir -p /stackable/log/_vector inotifywait -qq --event create /stackable/log/_vector; @@ -790,7 +790,7 @@ spec: - |- mkdir --parents /stackable/log/_vector-state # Vector will ignore SIGTERM (as PID != 1) and must be shut down by writing a shutdown trigger file - vector & vector_pid=$! + /stackable/bin/vector-with-env-var-interpolation & vector_pid=$! if [ ! -f "/stackable/log/_vector/shutdown" ]; then mkdir -p /stackable/log/_vector inotifywait -qq --event create /stackable/log/_vector; diff --git a/tests/templates/kuttl/smoke/32_cm-test-hbase-master-default.yaml.j2 b/tests/templates/kuttl/smoke/32_cm-test-hbase-master-default.yaml.j2 index 09d623dc..5802be9c 100644 --- a/tests/templates/kuttl/smoke/32_cm-test-hbase-master-default.yaml.j2 +++ b/tests/templates/kuttl/smoke/32_cm-test-hbase-master-default.yaml.j2 @@ -285,7 +285,9 @@ vector.yaml: | # Extends the processed files with the fields "container" and "file" extended_logs_files: inputs: - - processed_files_* + - processed_files_stdout + - processed_files_stderr + - processed_files_log4j2 type: remap source: | del(.source_type) @@ -323,7 +325,8 @@ vector.yaml: | # 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}" @@ -337,5 +340,9 @@ vector.yaml: | inputs: - extended_logs type: vector - address: ${VECTOR_AGGREGATOR_ADDRESS} + routing: + endpoints: + - ${VECTOR_AGGREGATOR_ADDRESS} + compression: zstd + keepalive: {} {%- endif %} diff --git a/tests/templates/kuttl/smoke/32_cm-test-hbase-regionserver-default.yaml.j2 b/tests/templates/kuttl/smoke/32_cm-test-hbase-regionserver-default.yaml.j2 index d9f65882..0eaf5d18 100644 --- a/tests/templates/kuttl/smoke/32_cm-test-hbase-regionserver-default.yaml.j2 +++ b/tests/templates/kuttl/smoke/32_cm-test-hbase-regionserver-default.yaml.j2 @@ -285,7 +285,9 @@ vector.yaml: | # Extends the processed files with the fields "container" and "file" extended_logs_files: inputs: - - processed_files_* + - processed_files_stdout + - processed_files_stderr + - processed_files_log4j2 type: remap source: | del(.source_type) @@ -323,7 +325,8 @@ vector.yaml: | # 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}" @@ -337,5 +340,9 @@ vector.yaml: | inputs: - extended_logs type: vector - address: ${VECTOR_AGGREGATOR_ADDRESS} + routing: + endpoints: + - ${VECTOR_AGGREGATOR_ADDRESS} + compression: zstd + keepalive: {} {%- endif %} diff --git a/tests/templates/kuttl/smoke/32_cm-test-hbase-restserver-default.yaml.j2 b/tests/templates/kuttl/smoke/32_cm-test-hbase-restserver-default.yaml.j2 index 0394e6cc..ede8bc87 100644 --- a/tests/templates/kuttl/smoke/32_cm-test-hbase-restserver-default.yaml.j2 +++ b/tests/templates/kuttl/smoke/32_cm-test-hbase-restserver-default.yaml.j2 @@ -265,7 +265,9 @@ vector.yaml: | # Extends the processed files with the fields "container" and "file" extended_logs_files: inputs: - - processed_files_* + - processed_files_stdout + - processed_files_stderr + - processed_files_log4j2 type: remap source: | del(.source_type) @@ -303,7 +305,8 @@ vector.yaml: | # 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}" @@ -317,5 +320,9 @@ vector.yaml: | inputs: - extended_logs type: vector - address: ${VECTOR_AGGREGATOR_ADDRESS} + routing: + endpoints: + - ${VECTOR_AGGREGATOR_ADDRESS} + compression: zstd + keepalive: {} {%- endif %}