diff --git a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main.yaml b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main.yaml index e4240bd55424..72f13aa712c9 100644 --- a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main.yaml +++ b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main.yaml @@ -83,6 +83,7 @@ tests: steps: env: SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer + tests/e2e-openshift/otlp-metrics-traces test: - as: install cli: latest diff --git a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-amd64-upgrade.yaml b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-amd64-upgrade.yaml index 5fbdc45690fb..13c0b981de11 100644 --- a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-amd64-upgrade.yaml +++ b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-amd64-upgrade.yaml @@ -81,6 +81,7 @@ tests: steps: env: SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer + tests/e2e-openshift/otlp-metrics-traces test: - ref: operatorhub-subscribe-amq-streams - ref: distributed-tracing-install-jaeger-product diff --git a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-hypershift.yaml b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-hypershift.yaml index 4e2ad1e6af1e..295004e96098 100644 --- a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-hypershift.yaml +++ b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.13-hypershift.yaml @@ -80,6 +80,7 @@ tests: env: BASE_DOMAIN: qe.devcluster.openshift.com SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer + tests/e2e-openshift/otlp-metrics-traces test: - ref: cucushift-hypershift-extended-health-check - ref: cucushift-pre diff --git a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.14-amd64.yaml b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.14-amd64.yaml index a33ca03e7dd8..978f0203882a 100644 --- a/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.14-amd64.yaml +++ b/ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__ocp-4.14-amd64.yaml @@ -77,6 +77,7 @@ tests: steps: env: SKIP_TESTS: tests/e2e-targetallocator/targetallocator-features tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer + tests/e2e-openshift/otlp-metrics-traces test: - ref: operatorhub-subscribe-amq-streams - ref: distributed-tracing-install-jaeger-product diff --git a/ci-operator/step-registry/distributed-tracing/tests/opentelemetry/distributed-tracing-tests-opentelemetry-commands.sh b/ci-operator/step-registry/distributed-tracing/tests/opentelemetry/distributed-tracing-tests-opentelemetry-commands.sh index 1918506ff67f..a8e5ab5984be 100755 --- a/ci-operator/step-registry/distributed-tracing/tests/opentelemetry/distributed-tracing-tests-opentelemetry-commands.sh +++ b/ci-operator/step-registry/distributed-tracing/tests/opentelemetry/distributed-tracing-tests-opentelemetry-commands.sh @@ -108,9 +108,12 @@ else rm -rf $SKIP_TESTS_TO_REMOVE fi - # Enable required feature gates. + # Initialize a variable to keep track of errors + any_errors=false + + # Set the operator args required for tests execution. OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}') - oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--feature-gates=+operator.autoinstrumentation.go,+operator.observability.prometheus,+operator.autoinstrumentation.nginx\"]}]" + oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx\"]}]" sleep 10 oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager @@ -127,9 +130,9 @@ else tests/e2e-instrumentation \ tests/e2e-pdb \ tests/e2e-opampbridge \ - tests/e2e-targetallocator + tests/e2e-targetallocator || any_errors=true - # Enable required feature gates. + # Set the operator args required for tests execution. OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}') oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--enable-multi-instrumentation\"]}]" sleep 10 @@ -141,5 +144,27 @@ else --report-path "$ARTIFACT_DIR" \ --report-format "XML" \ --test-dir \ - tests/e2e-multi-instrumentation + tests/e2e-multi-instrumentation || any_errors=true + + # Set the operator args required for tests execution. + OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}') + oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p "[{\"op\":\"replace\",\"path\":\"/spec/install/spec/deployments/0/spec/template/spec/containers/0/args\",\"value\":[\"--metrics-addr=127.0.0.1:8080\", \"--enable-leader-election\", \"--zap-log-level=info\", \"--zap-time-encoding=rfc3339nano\", \"--target-allocator-image=${TARGETALLOCATOR_IMG}\", \"--operator-opamp-bridge-image=${OPERATOROPAMPBRIDGE_IMG}\", \"--annotations-filter=*filter.out\", \"--labels=*filter.out\"]}]" + sleep 10 + oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager + + # Execute OpenTelemetry e2e tests + chainsaw test \ + --report-name "$REPORT_NAME" \ + --report-path "$ARTIFACT_DIR" \ + --report-format "XML" \ + --test-dir \ + tests/e2e-metadata-filters || any_errors=true + + # Check if any errors occurred + if $any_errors; then + echo "Tests failed, check the logs for more details." + exit 1 + else + echo "All the tests passed." + fi fi