diff --git a/tests/e2e-openshift/monitoring/02-assert.yaml b/tests/e2e-openshift/monitoring/02-assert.yaml index 55227f6a5..67115088a 100644 --- a/tests/e2e-openshift/monitoring/02-assert.yaml +++ b/tests/e2e-openshift/monitoring/02-assert.yaml @@ -310,6 +310,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: + app.kubernetes.io/component: query-frontend app.kubernetes.io/instance: tempostack app.kubernetes.io/managed-by: tempo-operator app.kubernetes.io/name: tempo @@ -320,28 +321,17 @@ spec: - path: /metrics port: http relabelings: - - sourceLabels: + - action: replace + sourceLabels: - __meta_kubernetes_service_label_app_kubernetes_io_instance targetLabel: cluster - - separator: / + - action: replace + separator: / sourceLabels: - __meta_kubernetes_namespace - __meta_kubernetes_service_label_app_kubernetes_io_component targetLabel: job - scheme: https - tlsConfig: - ca: - configMap: - key: service-ca.crt - name: tempo-tempostack-ca-bundle - cert: - secret: - key: tls.crt - name: tempo-tempostack-query-frontend-mtls - keySecret: - key: tls.key - name: tempo-tempostack-query-frontend-mtls - serverName: tempo-tempostack-query-frontend.chainsaw-monitoring.svc.cluster.local + scheme: http namespaceSelector: matchNames: - chainsaw-monitoring diff --git a/tests/e2e-openshift/monolithic-route/chainsaw-test.yaml b/tests/e2e-openshift/monolithic-route/chainsaw-test.yaml index 410f1d13e..bda7a4ee2 100755 --- a/tests/e2e-openshift/monolithic-route/chainsaw-test.yaml +++ b/tests/e2e-openshift/monolithic-route/chainsaw-test.yaml @@ -13,6 +13,22 @@ spec: file: install-tempo-assert.yaml - name: Run the must-gather and verify the contents try: + - command: + entrypoint: oc + args: + - get + - pods + - -A + - -l control-plane=controller-manager + - -l app.kubernetes.io/name=tempo-operator + - -o + - jsonpath={.items[0].metadata.namespace} + outputs: + - name: TEMPO_NAMESPACE + value: ($stdout) - script: + env: + - name: temponamespace + value: ($TEMPO_NAMESPACE) timeout: 5m - content: ./check-must-gahter.sh + content: ./check-must-gather.sh diff --git a/tests/e2e-openshift/monolithic-route/check-must-gahter.sh b/tests/e2e-openshift/monolithic-route/check-must-gather.sh similarity index 92% rename from tests/e2e-openshift/monolithic-route/check-must-gahter.sh rename to tests/e2e-openshift/monolithic-route/check-must-gather.sh index 2757209a3..b573afcc3 100755 --- a/tests/e2e-openshift/monolithic-route/check-must-gahter.sh +++ b/tests/e2e-openshift/monolithic-route/check-must-gather.sh @@ -1,11 +1,10 @@ #!/bin/bash -# Check if must gather directory exists -MUST_GATHER_DIR=/tmp/monolithic-route -mkdir -p $MUST_GATHER_DIR +# Create a temporary directory to store must-gather +MUST_GATHER_DIR=$(mktemp -d) # Run the must-gather script -oc adm must-gather --dest-dir=$MUST_GATHER_DIR --image=quay.io/rhn_support_ikanse/tempo-must-gather:latest -- /usr/bin/must-gather --operator-namespace tempo-operator +oc adm must-gather --dest-dir=$MUST_GATHER_DIR --image=quay.io/rhn_support_ikanse/tempo-must-gather:latest -- /usr/bin/must-gather --operator-namespace $temponamespace # Define required files and directories REQUIRED_ITEMS=( diff --git a/tests/e2e-openshift/route/chainsaw-test.yaml b/tests/e2e-openshift/route/chainsaw-test.yaml index c6e031a3f..d6496764c 100755 --- a/tests/e2e-openshift/route/chainsaw-test.yaml +++ b/tests/e2e-openshift/route/chainsaw-test.yaml @@ -25,6 +25,22 @@ spec: content: kubectl get --namespace $NAMESPACE tempo simplest -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}' | grep True - name: Run the must-gather and verify the contents try: + - command: + entrypoint: oc + args: + - get + - pods + - -A + - -l control-plane=controller-manager + - -l app.kubernetes.io/name=tempo-operator + - -o + - jsonpath={.items[0].metadata.namespace} + outputs: + - name: TEMPO_NAMESPACE + value: ($stdout) - script: + env: + - name: temponamespace + value: ($TEMPO_NAMESPACE) timeout: 5m - content: ./check-must-gahter.sh + content: ./check-must-gather.sh diff --git a/tests/e2e-openshift/route/check-must-gahter.sh b/tests/e2e-openshift/route/check-must-gather.sh similarity index 95% rename from tests/e2e-openshift/route/check-must-gahter.sh rename to tests/e2e-openshift/route/check-must-gather.sh index fb3b1b1b8..0a1185b72 100755 --- a/tests/e2e-openshift/route/check-must-gahter.sh +++ b/tests/e2e-openshift/route/check-must-gather.sh @@ -1,11 +1,10 @@ #!/bin/bash -# Check if must gather directory exists -MUST_GATHER_DIR=/tmp/route -mkdir -p $MUST_GATHER_DIR +# Create a temporary directory to store must-gather +MUST_GATHER_DIR=$(mktemp -d) # Run the must-gather script -oc adm must-gather --dest-dir=$MUST_GATHER_DIR --image=quay.io/rhn_support_ikanse/tempo-must-gather:latest -- /usr/bin/must-gather --operator-namespace tempo-operator +oc adm must-gather --dest-dir=$MUST_GATHER_DIR --image=quay.io/rhn_support_ikanse/tempo-must-gather:latest -- /usr/bin/must-gather --operator-namespace $temponamespace # Define required files and directories REQUIRED_ITEMS=( diff --git a/tests/e2e-openshift/tempo-single-tenant-auth/install-tempo-assert.yaml b/tests/e2e-openshift/tempo-single-tenant-auth/install-tempo-assert.yaml index 9b6f74c5b..a24baf2d3 100644 --- a/tests/e2e-openshift/tempo-single-tenant-auth/install-tempo-assert.yaml +++ b/tests/e2e-openshift/tempo-single-tenant-auth/install-tempo-assert.yaml @@ -52,6 +52,7 @@ spec: - -config.file=/conf/tempo-query-frontend.yaml - -mem-ballast-size-mbs=1024 - -log.level=info + - -config.expand-env=true - --storage.trace.s3.secret_key=$(S3_SECRET_KEY) - --storage.trace.s3.access_key=$(S3_ACCESS_KEY) env: diff --git a/tests/e2e-openshift/tls-singletenant/01-assert.yaml b/tests/e2e-openshift/tls-singletenant/01-assert.yaml index fbaa7d6f9..d6d176a9f 100644 --- a/tests/e2e-openshift/tls-singletenant/01-assert.yaml +++ b/tests/e2e-openshift/tls-singletenant/01-assert.yaml @@ -47,6 +47,7 @@ spec: - -config.file=/conf/tempo-query-frontend.yaml - -mem-ballast-size-mbs=1024 - -log.level=info + - -config.expand-env=true - --storage.trace.s3.secret_key=$(S3_SECRET_KEY) - --storage.trace.s3.access_key=$(S3_ACCESS_KEY) env: