Skip to content

Commit 62a0a71

Browse files
IshwarKanseclaude
andauthored
fix(otel-upstream): use opentelemetry-operator-system namespace in upstream step (#79419)
* fix(otel-upstream): use opentelemetry-operator-system namespace The OpenTelemetry Operator upstream e2e tests now install the operator into opentelemetry-operator-system (the OLM default) instead of the old opentelemetry-operator namespace. Update all oc -n and CSV patch commands in the upstream step to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(otel-upstream): use opentelemetry-operator-system in job configs Update the operator install namespace from opentelemetry-operator to opentelemetry-operator-system in the upstream OCP 4.12, 4.21, and 4.22 job configs. Aligns with the step script change and the upstream operator repo standardization. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(otel-upstream): revert PROJECT_NAME to opentelemetry-operator PROJECT_NAME is consumed by the Snyk SAST step as the Snyk project name, not as an OCP namespace. Revert the inadvertent rename. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Run Tempo TLS profile tests last as an isolated chainsaw invocation The TLS profile tests patch the cluster-wide APIServer resource, triggering node-level TLS reconciliation that disrupts concurrently running tests. Run them as a separate chainsaw invocation after all other suites complete, matching the same any_errors pattern used in the OTel upstream test step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fcbb493 commit 62a0a71

5 files changed

Lines changed: 44 additions & 23 deletions

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__upstream-ocp-4.12-amd64.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ tests:
128128
- as: install
129129
cli: latest
130130
commands: |
131-
oc create namespace opentelemetry-operator
132-
oc label namespace opentelemetry-operator openshift.io/cluster-monitoring="true"
133-
operator-sdk run bundle --timeout=5m --security-context-config restricted -n opentelemetry-operator "$OO_BUNDLE"
134-
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager
131+
oc create namespace opentelemetry-operator-system
132+
oc label namespace opentelemetry-operator-system openshift.io/cluster-monitoring="true"
133+
operator-sdk run bundle --timeout=5m --security-context-config restricted -n opentelemetry-operator-system "$OO_BUNDLE"
134+
oc wait --for condition=Available -n opentelemetry-operator-system deployment opentelemetry-operator-controller-manager
135135
dependencies:
136136
- env: OO_BUNDLE
137137
name: opentelemetry-bundle

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__upstream-ocp-4.21-amd64.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ tests:
118118
- as: install
119119
cli: latest
120120
commands: |
121-
oc create namespace opentelemetry-operator
122-
oc label namespace opentelemetry-operator openshift.io/cluster-monitoring="true"
123-
operator-sdk run bundle --timeout=5m --security-context-config restricted -n opentelemetry-operator "$OO_BUNDLE"
124-
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager
121+
oc create namespace opentelemetry-operator-system
122+
oc label namespace opentelemetry-operator-system openshift.io/cluster-monitoring="true"
123+
operator-sdk run bundle --timeout=5m --security-context-config restricted -n opentelemetry-operator-system "$OO_BUNDLE"
124+
oc wait --for condition=Available -n opentelemetry-operator-system deployment opentelemetry-operator-controller-manager
125125
dependencies:
126126
- env: OO_BUNDLE
127127
name: opentelemetry-bundle

ci-operator/config/openshift/open-telemetry-opentelemetry-operator/openshift-open-telemetry-opentelemetry-operator-main__upstream-ocp-4.22-amd64.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ tests:
124124
- as: install
125125
cli: latest
126126
commands: |
127-
oc create namespace opentelemetry-operator
128-
oc label namespace opentelemetry-operator openshift.io/cluster-monitoring="true"
129-
operator-sdk run bundle --timeout=5m --security-context-config restricted -n opentelemetry-operator "$OO_BUNDLE"
130-
oc wait --for condition=Available -n opentelemetry-operator deployment opentelemetry-operator-controller-manager
127+
oc create namespace opentelemetry-operator-system
128+
oc label namespace opentelemetry-operator-system openshift.io/cluster-monitoring="true"
129+
operator-sdk run bundle --timeout=5m --security-context-config restricted -n opentelemetry-operator-system "$OO_BUNDLE"
130+
oc wait --for condition=Available -n opentelemetry-operator-system deployment opentelemetry-operator-controller-manager
131131
dependencies:
132132
- env: OO_BUNDLE
133133
name: opentelemetry-bundle

ci-operator/step-registry/distributed-tracing/tests/opentelemetry/upstream/distributed-tracing-tests-opentelemetry-upstream-commands.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ fi
4747
any_errors=false
4848

4949
# Set the operator environment variables required for tests execution.
50-
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
51-
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p '[
50+
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $1}')
51+
oc -n opentelemetry-operator-system patch csv $OTEL_CSV_NAME --type=json -p '[
5252
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_TARGET_ALLOCATOR","value":"'"${TARGETALLOCATOR_IMG}"'"}},
5353
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_OPERATOR_OPAMP_BRIDGE","value":"'"${OPERATOROPAMPBRIDGE_IMG}"'"}}
5454
]'
5555
sleep 60
56-
if oc -n opentelemetry-operator get deployment opentelemetry-operator-controller-manager -o jsonpath='{.status.conditions[?(@.type=="Available")].status}' | grep -q "True"; then
56+
if oc -n opentelemetry-operator-system get deployment opentelemetry-operator-controller-manager -o jsonpath='{.status.conditions[?(@.type=="Available")].status}' | grep -q "True"; then
5757
echo "Operator deployment updated successfully, continuing script execution..."
5858
else
5959
echo "Operator deployment update failed, exiting with error."
@@ -98,13 +98,13 @@ tests/e2e-prometheuscr \
9898
tests/e2e-sidecar || any_errors=true
9999

100100
# Set the operator environment variables for metadata filters tests.
101-
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
102-
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p '[
101+
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $1}')
102+
oc -n opentelemetry-operator-system patch csv $OTEL_CSV_NAME --type=json -p '[
103103
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"ANNOTATIONS_FILTER","value":".*filter.out,config.*.gke.io.*"}},
104104
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"LABELS_FILTER","value":".*filter.out"}}
105105
]'
106106
sleep 60
107-
if oc -n opentelemetry-operator get deployment opentelemetry-operator-controller-manager -o jsonpath='{.status.conditions[?(@.type=="Available")].status}' | grep -q "True"; then
107+
if oc -n opentelemetry-operator-system get deployment opentelemetry-operator-controller-manager -o jsonpath='{.status.conditions[?(@.type=="Available")].status}' | grep -q "True"; then
108108
echo "Operator deployment updated successfully for metadata filters, continuing script execution..."
109109
else
110110
echo "Operator deployment update for metadata filters failed, exiting with error."
@@ -121,16 +121,16 @@ chainsaw test \
121121
tests/e2e-metadata-filters || any_errors=true
122122

123123
# Set the operator environment variables with instrumentation images for e2e-instrumentation tests.
124-
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator | grep "opentelemetry-operator" | awk '{print $1}')
125-
oc -n opentelemetry-operator patch csv $OTEL_CSV_NAME --type=json -p '[
124+
OTEL_CSV_NAME=$(oc get csv -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $1}')
125+
oc -n opentelemetry-operator-system patch csv $OTEL_CSV_NAME --type=json -p '[
126126
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA","value":"'"${INSTRUMENTATION_JAVA_IMG}"'"}},
127127
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_AUTO_INSTRUMENTATION_NODEJS","value":"'"${INSTRUMENTATION_NODEJS_IMG}"'"}},
128128
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_AUTO_INSTRUMENTATION_PYTHON","value":"'"${INSTRUMENTATION_PYTHON_IMG}"'"}},
129129
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_AUTO_INSTRUMENTATION_DOTNET","value":"'"${INSTRUMENTATION_DOTNET_IMG}"'"}},
130130
{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"RELATED_IMAGE_AUTO_INSTRUMENTATION_APACHE_HTTPD","value":"'"${INSTRUMENTATION_APACHE_HTTPD_IMG}"'"}}
131131
]'
132132
sleep 60
133-
if oc -n opentelemetry-operator get deployment opentelemetry-operator-controller-manager -o jsonpath='{.status.conditions[?(@.type=="Available")].status}' | grep -q "True"; then
133+
if oc -n opentelemetry-operator-system get deployment opentelemetry-operator-controller-manager -o jsonpath='{.status.conditions[?(@.type=="Available")].status}' | grep -q "True"; then
134134
echo "Operator deployment updated successfully with instrumentation images, continuing script execution..."
135135
else
136136
echo "Operator deployment update with instrumentation images failed, exiting with error."

ci-operator/step-registry/distributed-tracing/tests/tempo/upstream/distributed-tracing-tests-tempo-upstream-commands.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ fi
3535
# Unset environment variable which conflicts with Chainsaw
3636
unset NAMESPACE
3737

38+
# Initialize a variable to keep track of errors
39+
any_errors=false
40+
3841
# Execute Tempo e2e tests
3942
chainsaw test \
4043
--quiet \
@@ -50,5 +53,23 @@ tests/e2e-openshift-ossm \
5053
tests/e2e-openshift-object-stores \
5154
tests/e2e-long-running \
5255
tests/e2e-openshift-tshirt-sizes \
53-
tests/operator-metrics \
54-
tests/e2e-openshift-tls-profile
56+
tests/operator-metrics || any_errors=true
57+
58+
# Execute TLS profile tests last: they patch the cluster-wide APIServer resource,
59+
# triggering node-level TLS reconciliation that would disrupt concurrently running tests.
60+
chainsaw test \
61+
--quiet \
62+
--config .chainsaw-openshift.yaml \
63+
--report-name "junit_tempo_e2e_tls_profile" \
64+
--report-path "$ARTIFACT_DIR" \
65+
--report-format "XML" \
66+
--test-dir \
67+
tests/e2e-openshift-tls-profile || any_errors=true
68+
69+
# Check if any errors occurred
70+
if $any_errors; then
71+
echo "Tests failed, check the logs for more details."
72+
exit 1
73+
else
74+
echo "All the tests passed."
75+
fi

0 commit comments

Comments
 (0)