From 8afe9501b3f513a019720b904c68c8ca5fb5aa17 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Tue, 27 Aug 2024 11:44:13 +0530 Subject: [PATCH] Update disconnected tests --- .../compatibility/00-install-storage.yaml | 2 +- .../compatibility/01-assert.yaml | 8 +- .../jaeger-otel-sidecar/02-assert.yaml | 8 +- .../02-assert.yaml | 15 +++- .../02-install-otelcol.yaml | 25 ++++++- .../03-assert.yaml | 11 ++- .../03-generate-traces.yaml | 22 +++++- .../04-assert.yaml | 22 +++++- .../04-verify-traces.yaml | 62 +++++++++++++++- .../multitenancy/00-install-storage.yaml | 2 +- .../multitenancy/01-assert.yaml | 5 +- .../multitenancy/02-install-otelcol.yaml | 26 ++++--- .../multitenancy/03-assert.yaml | 12 ++- .../multitenancy/03-generate-traces.yaml | 23 +++++- .../multitenancy/04-assert.yaml | 24 +++++- .../multitenancy/04-verify-traces.yaml | 73 ++++++++++++++++++- .../multitenancy/chainsaw-test.yaml | 1 + .../02-otel-metrics-collector.yaml | 2 - .../smoke-targetallocator/00-assert.yaml | 5 +- .../smoke-targetallocator/00-install.yaml | 1 - .../01-change-ta-config.yaml | 1 - .../smoke-targetallocator/chainsaw-test.yaml | 1 + 22 files changed, 305 insertions(+), 46 deletions(-) diff --git a/tests/e2e-disconnected/compatibility/00-install-storage.yaml b/tests/e2e-disconnected/compatibility/00-install-storage.yaml index cdc2441..204f7cc 100644 --- a/tests/e2e-disconnected/compatibility/00-install-storage.yaml +++ b/tests/e2e-disconnected/compatibility/00-install-storage.yaml @@ -38,7 +38,7 @@ spec: value: tempo - name: MINIO_SECRET_KEY value: supersecret - image: docker.io/minio/minio@sha256:7cb3f11447d1ac7c4b73420dd8f3601afa16ea0cd7e929ecb00be1a8af1eac05 + image: quay.io/minio/minio@sha256:7586fd4e11b48d7e41efdc6898b73147231da847cd0d4383d0a718ad2c98e6d8 name: minio ports: - containerPort: 9000 diff --git a/tests/e2e-disconnected/compatibility/01-assert.yaml b/tests/e2e-disconnected/compatibility/01-assert.yaml index 56d2873..e316183 100644 --- a/tests/e2e-disconnected/compatibility/01-assert.yaml +++ b/tests/e2e-disconnected/compatibility/01-assert.yaml @@ -157,6 +157,10 @@ metadata: name: tempo-simplest-distributor spec: ports: + - name: otlp-http + port: 4318 + protocol: TCP + targetPort: otlp-http - name: otlp-grpc port: 4317 protocol: TCP @@ -165,10 +169,6 @@ spec: port: 3200 protocol: TCP targetPort: http - - name: otlp-http - port: 4318 - protocol: TCP - targetPort: otlp-http - name: thrift-http port: 14268 protocol: TCP diff --git a/tests/e2e-disconnected/jaeger-otel-sidecar/02-assert.yaml b/tests/e2e-disconnected/jaeger-otel-sidecar/02-assert.yaml index 7f12b65..2b7d951 100644 --- a/tests/e2e-disconnected/jaeger-otel-sidecar/02-assert.yaml +++ b/tests/e2e-disconnected/jaeger-otel-sidecar/02-assert.yaml @@ -14,6 +14,8 @@ metadata: name: otel namespace: kuttl-jaeger-otel-sidecar-app spec: + args: + feature-gates: -component.UseLocalHostAsDefaultHost config: exporters: otlp: @@ -52,16 +54,17 @@ spec: - opencensus - otlp - zipkin + configVersions: 3 daemonSetUpdateStrategy: {} deploymentUpdateStrategy: {} ingress: route: {} + ipFamilyPolicy: SingleStack managementState: managed mode: sidecar observability: metrics: {} - podDisruptionBudget: - maxUnavailable: 1 + podDnsConfig: {} replicas: 1 resources: {} targetAllocator: @@ -75,6 +78,7 @@ spec: serviceMonitorSelector: {} resources: {} upgradeStrategy: automatic + --- apiVersion: apps/v1 kind: Deployment diff --git a/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-assert.yaml b/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-assert.yaml index 5f988e5..8e4e81a 100644 --- a/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-assert.yaml +++ b/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-assert.yaml @@ -11,10 +11,21 @@ apiVersion: v1 kind: Service metadata: name: dev-collector + namespace: chainsaw-monolithic-multitenancy spec: ports: - appProtocol: grpc - name: otlp-grpc + name: otlp-grpc-grpc port: 4317 protocol: TCP - targetPort: 4317 \ No newline at end of file + targetPort: 4317 + - appProtocol: http + name: otlp-http-http + port: 4318 + protocol: TCP + targetPort: 4318 + selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: chainsaw-monolithic-multitenancy.dev + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry \ No newline at end of file diff --git a/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-install-otelcol.yaml b/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-install-otelcol.yaml index fdf70f8..0c04001 100644 --- a/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-install-otelcol.yaml +++ b/tests/e2e-disconnected/monolithic-multitenancy-openshift/02-install-otelcol.yaml @@ -9,9 +9,12 @@ spec: filename: /var/run/secrets/kubernetes.io/serviceaccount/token receivers: - otlp: + otlp/grpc: protocols: grpc: + otlp/http: + protocols: + http: exporters: otlp: @@ -22,10 +25,26 @@ spec: authenticator: bearertokenauth headers: X-Scope-OrgID: dev # tenantName + otlphttp: + endpoint: https://tempo-monolithic-multitenancy-openshift-gateway.chainsaw-monolithic-multitenancy.svc.cluster.local:8080/api/traces/v1/dev + tls: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt + auth: + authenticator: bearertokenauth + headers: + X-Scope-OrgID: dev # tenantName service: + telemetry: + logs: + level: "DEBUG" + development: true + encoding: "json" extensions: [bearertokenauth] pipelines: - traces: - receivers: [otlp] + traces/grpc: + receivers: [otlp/grpc] exporters: [otlp] + traces/http: + receivers: [otlp/http] + exporters: [otlphttp] diff --git a/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-assert.yaml b/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-assert.yaml index d63e4dc..55038b2 100644 --- a/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-assert.yaml +++ b/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-assert.yaml @@ -1,8 +1,17 @@ apiVersion: batch/v1 kind: Job metadata: - name: generate-traces + name: generate-traces-grpc status: conditions: - status: "True" type: Complete +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-http +status: + conditions: + - status: "True" + type: Complete diff --git a/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-generate-traces.yaml b/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-generate-traces.yaml index a29914d..8504ba6 100644 --- a/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-generate-traces.yaml +++ b/tests/e2e-disconnected/monolithic-multitenancy-openshift/03-generate-traces.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: generate-traces + name: generate-traces-grpc spec: template: spec: @@ -11,6 +11,26 @@ spec: args: - traces - --otlp-endpoint=dev-collector:4317 + - --service=grpc - --otlp-insecure - --traces=10 restartPolicy: Never +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-http +spec: + template: + spec: + containers: + - name: telemetrygen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:a036b2ec403f445adc68bfcc359d5040a6603af4081a76a6cf02a5de55138a4e + args: + - traces + - --otlp-endpoint=dev-collector:4318 + - --otlp-http + - --otlp-insecure + - --service=http + - --traces=10 + restartPolicy: Never \ No newline at end of file diff --git a/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-assert.yaml b/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-assert.yaml index ddc1310..ddf7cd3 100644 --- a/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-assert.yaml +++ b/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-assert.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: verify-traces-jaegerui + name: verify-traces-jaegerui-grpc status: conditions: - status: "True" @@ -10,8 +10,26 @@ status: apiVersion: batch/v1 kind: Job metadata: - name: verify-traces-traceql + name: verify-traces-traceql-grpc status: conditions: - status: "True" type: Complete +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-jaegerui-http +status: + conditions: + - status: "True" + type: Complete +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-traceql-http +status: + conditions: + - status: "True" + type: Complete diff --git a/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-verify-traces.yaml b/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-verify-traces.yaml index df47729..e290fa7 100644 --- a/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-verify-traces.yaml +++ b/tests/e2e-disconnected/monolithic-multitenancy-openshift/04-verify-traces.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: verify-traces-jaegerui + name: verify-traces-jaegerui-grpc spec: template: spec: @@ -15,7 +15,7 @@ spec: --header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ https://tempo-monolithic-multitenancy-openshift-gateway.chainsaw-monolithic-multitenancy.svc:8080/api/traces/v1/dev/api/traces \ - --data-urlencode "service=telemetrygen" \ + --data-urlencode "service=grpc" \ | tee /tmp/jaeger.out num_traces=$(jq ".data | length" /tmp/jaeger.out) @@ -28,7 +28,7 @@ spec: apiVersion: batch/v1 kind: Job metadata: - name: verify-traces-traceql + name: verify-traces-traceql-grpc spec: template: spec: @@ -41,7 +41,7 @@ spec: curl -sS -G \ --header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ - --data-urlencode 'q={ resource.service.name="telemetrygen" }' \ + --data-urlencode 'q={ resource.service.name="grpc" }' \ https://tempo-monolithic-multitenancy-openshift-gateway.chainsaw-monolithic-multitenancy.svc:8080/api/traces/v1/dev/tempo/api/search \ | tee /tmp/tempo.out @@ -51,3 +51,57 @@ spec: exit 1 fi restartPolicy: Never +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-jaegerui-http +spec: + template: + spec: + containers: + - name: verify-traces + image: ghcr.io/grafana/tempo-operator/test-utils@sha256:7cf76bad82feb2cc338d23b29d7585c9399dfc8105bbab0c0636a776916aa3bc + command: ["/bin/bash", "-eux", "-c"] + args: + - | + curl -vG \ + --header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ + --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ + https://tempo-monolithic-multitenancy-openshift-gateway.chainsaw-monolithic-multitenancy.svc:8080/api/traces/v1/dev/api/traces \ + --data-urlencode "service=http" \ + | tee /tmp/jaeger.out + + num_traces=$(jq ".data | length" /tmp/jaeger.out) + if [[ "$num_traces" != "10" ]]; then + echo && echo "The Jaeger API returned $num_traces instead of 10 traces." + exit 1 + fi + restartPolicy: Never +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-traceql-http +spec: + template: + spec: + containers: + - name: verify-traces + image: ghcr.io/grafana/tempo-operator/test-utils@sha256:7cf76bad82feb2cc338d23b29d7585c9399dfc8105bbab0c0636a776916aa3bc + command: ["/bin/bash", "-eux", "-c"] + args: + - | + curl -sS -G \ + --header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ + --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ + --data-urlencode 'q={ resource.service.name="http" }' \ + https://tempo-monolithic-multitenancy-openshift-gateway.chainsaw-monolithic-multitenancy.svc:8080/api/traces/v1/dev/tempo/api/search \ + | tee /tmp/tempo.out + + num_traces=$(jq ".traces | length" /tmp/tempo.out) + if [[ "$num_traces" != "10" ]]; then + echo && echo "The Tempo API returned $num_traces instead of 10 traces." + exit 1 + fi + restartPolicy: Never diff --git a/tests/e2e-disconnected/multitenancy/00-install-storage.yaml b/tests/e2e-disconnected/multitenancy/00-install-storage.yaml index 239c00a..91897fd 100644 --- a/tests/e2e-disconnected/multitenancy/00-install-storage.yaml +++ b/tests/e2e-disconnected/multitenancy/00-install-storage.yaml @@ -46,7 +46,7 @@ spec: value: tempo - name: MINIO_SECRET_KEY value: supersecret - image: docker.io/minio/minio@sha256:7cb3f11447d1ac7c4b73420dd8f3601afa16ea0cd7e929ecb00be1a8af1eac05 + image: quay.io/minio/minio@sha256:7586fd4e11b48d7e41efdc6898b73147231da847cd0d4383d0a718ad2c98e6d8 name: minio ports: - containerPort: 9000 diff --git a/tests/e2e-disconnected/multitenancy/01-assert.yaml b/tests/e2e-disconnected/multitenancy/01-assert.yaml index 26ef8f9..75f05cb 100644 --- a/tests/e2e-disconnected/multitenancy/01-assert.yaml +++ b/tests/e2e-disconnected/multitenancy/01-assert.yaml @@ -154,7 +154,8 @@ spec: - --traces.tenant-header=x-scope-orgid - --web.listen=0.0.0.0:8080 - --web.internal.listen=0.0.0.0:8081 - - --traces.write.endpoint=tempo-simplest-distributor.chainsaw-multitenancy.svc.cluster.local:4317 + - --traces.write.otlpgrpc.endpoint=tempo-simplest-distributor.chainsaw-multitenancy.svc.cluster.local:4317 + - --traces.write.otlphttp.endpoint=https://tempo-simplest-distributor.chainsaw-multitenancy.svc.cluster.local:4318 - --traces.tempo.endpoint=https://tempo-simplest-query-frontend.chainsaw-multitenancy.svc.cluster.local:3200 - --grpc.listen=0.0.0.0:8090 - --rbac.config=/etc/tempo-gateway/cm/rbac.yaml @@ -165,11 +166,13 @@ spec: - --traces.tls.key-file=/var/run/tls/server/tls.key - --traces.tls.cert-file=/var/run/tls/server/tls.crt - --traces.tls.ca-file=/var/run/ca/service-ca.crt + - --traces.tls.watch-certs=true - --tls.server.cert-file=/etc/tempo-gateway/serving-certs/tls.crt - --tls.server.key-file=/etc/tempo-gateway/serving-certs/tls.key - --tls.healthchecks.server-ca-file=/etc/tempo-gateway/cabundle/service-ca.crt - --tls.healthchecks.server-name=tempo-simplest-gateway.chainsaw-multitenancy.svc.cluster.local - --web.healthchecks.url=https://localhost:8080 + - --tls.client-auth-type=NoClientCert - --traces.read.endpoint=https://tempo-simplest-query-frontend.chainsaw-multitenancy.svc.cluster.local:16686 livenessProbe: failureThreshold: 10 diff --git a/tests/e2e-disconnected/multitenancy/02-install-otelcol.yaml b/tests/e2e-disconnected/multitenancy/02-install-otelcol.yaml index 1717cd3..b555512 100644 --- a/tests/e2e-disconnected/multitenancy/02-install-otelcol.yaml +++ b/tests/e2e-disconnected/multitenancy/02-install-otelcol.yaml @@ -12,16 +12,12 @@ spec: filename: "/var/run/secrets/kubernetes.io/serviceaccount/token" receivers: - otlp: + otlp/grpc: protocols: grpc: - http: - jaeger: + otlp/http: protocols: - thrift_binary: - thrift_compact: - thrift_http: - grpc: + http: processors: @@ -35,6 +31,15 @@ spec: authenticator: bearertokenauth headers: X-Scope-OrgID: "dev" + otlphttp: + endpoint: https://tempo-simplest-gateway.chainsaw-multitenancy.svc.cluster.local:8080/api/traces/v1/dev + tls: + insecure: false + ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt" + auth: + authenticator: bearertokenauth + headers: + X-Scope-OrgID: "dev" service: telemetry: @@ -44,9 +49,12 @@ spec: encoding: "json" extensions: [bearertokenauth] pipelines: - traces: - receivers: [otlp, jaeger] + traces/grpc: + receivers: [otlp/grpc] exporters: [otlp] + traces/http: + receivers: [otlp/http] + exporters: [otlphttp] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/tests/e2e-disconnected/multitenancy/03-assert.yaml b/tests/e2e-disconnected/multitenancy/03-assert.yaml index 87c9132..9c5a6a6 100644 --- a/tests/e2e-disconnected/multitenancy/03-assert.yaml +++ b/tests/e2e-disconnected/multitenancy/03-assert.yaml @@ -1,7 +1,17 @@ apiVersion: batch/v1 kind: Job metadata: - name: generate-traces + name: generate-traces-grpc + namespace: chainsaw-multitenancy +status: + conditions: + - status: "True" + type: Complete +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-http namespace: chainsaw-multitenancy status: conditions: diff --git a/tests/e2e-disconnected/multitenancy/03-generate-traces.yaml b/tests/e2e-disconnected/multitenancy/03-generate-traces.yaml index 9fe3206..bf34814 100644 --- a/tests/e2e-disconnected/multitenancy/03-generate-traces.yaml +++ b/tests/e2e-disconnected/multitenancy/03-generate-traces.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: generate-traces + name: generate-traces-grpc namespace: chainsaw-multitenancy spec: template: @@ -12,6 +12,27 @@ spec: args: - traces - --otlp-endpoint=dev-collector:4317 + - --service=grpc - --otlp-insecure - --traces=10 restartPolicy: Never +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-http + namespace: chainsaw-multitenancy +spec: + template: + spec: + containers: + - name: telemetrygen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:a036b2ec403f445adc68bfcc359d5040a6603af4081a76a6cf02a5de55138a4e + args: + - traces + - --otlp-endpoint=dev-collector:4318 + - --otlp-http + - --otlp-insecure + - --service=http + - --traces=10 + restartPolicy: Never diff --git a/tests/e2e-disconnected/multitenancy/04-assert.yaml b/tests/e2e-disconnected/multitenancy/04-assert.yaml index 3091c7c..c849ba6 100644 --- a/tests/e2e-disconnected/multitenancy/04-assert.yaml +++ b/tests/e2e-disconnected/multitenancy/04-assert.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: verify-traces + name: verify-traces-grpc namespace: chainsaw-multitenancy status: conditions: @@ -11,7 +11,27 @@ status: apiVersion: batch/v1 kind: Job metadata: - name: verify-traces-traceql + name: verify-traces-traceql-grpc + namespace: chainsaw-multitenancy +status: + conditions: + - status: "True" + type: Complete +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-http + namespace: chainsaw-multitenancy +status: + conditions: + - status: "True" + type: Complete +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-traceql-http namespace: chainsaw-multitenancy status: conditions: diff --git a/tests/e2e-disconnected/multitenancy/04-verify-traces.yaml b/tests/e2e-disconnected/multitenancy/04-verify-traces.yaml index 3169ec4..2ce27d2 100644 --- a/tests/e2e-disconnected/multitenancy/04-verify-traces.yaml +++ b/tests/e2e-disconnected/multitenancy/04-verify-traces.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: verify-traces + name: verify-traces-grpc namespace: chainsaw-multitenancy spec: template: @@ -21,7 +21,7 @@ spec: --header "Authorization: Bearer $token" \ --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ https://tempo-simplest-gateway.chainsaw-multitenancy.svc:8080/api/traces/v1/dev/api/traces \ - --data-urlencode "service=telemetrygen" \ + --data-urlencode "service=grpc" \ | tee /tmp/jaeger.out num_traces=$(jq ".data | length" /tmp/jaeger.out) @@ -34,7 +34,7 @@ spec: apiVersion: batch/v1 kind: Job metadata: - name: verify-traces-traceql + name: verify-traces-traceql-grpc namespace: chainsaw-multitenancy spec: template: @@ -54,7 +54,72 @@ spec: --header "Authorization: Bearer $token" \ --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ https://tempo-simplest-gateway.chainsaw-multitenancy.svc:8080/api/traces/v1/dev/tempo/api/search \ - --data-urlencode 'q={ resource.service.name="telemetrygen" }' \ + --data-urlencode 'q={ resource.service.name="grpc" }' \ + | tee /tmp/jaeger.out + num_traces=$(jq ".traces | length" /tmp/jaeger.out) + if [[ "$num_traces" != "10" ]]; then + echo && echo "The Jaeger API returned $num_traces instead of 10 traces." + exit 1 + fi + restartPolicy: Never +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-http + namespace: chainsaw-multitenancy +spec: + template: + spec: + containers: + - name: verify-traces + image: ghcr.io/grafana/tempo-operator/test-utils@sha256:7cf76bad82feb2cc338d23b29d7585c9399dfc8105bbab0c0636a776916aa3bc + command: + - /bin/bash + - -eux + - -c + args: + - | + token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) + curl \ + -v -G \ + --header "Authorization: Bearer $token" \ + --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ + https://tempo-simplest-gateway.chainsaw-multitenancy.svc:8080/api/traces/v1/dev/api/traces \ + --data-urlencode "service=http" \ + | tee /tmp/jaeger.out + + num_traces=$(jq ".data | length" /tmp/jaeger.out) + if [[ "$num_traces" != "10" ]]; then + echo && echo "The Jaeger API returned $num_traces instead of 10 traces." + exit 1 + fi + restartPolicy: Never +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: verify-traces-traceql-http + namespace: chainsaw-multitenancy +spec: + template: + spec: + containers: + - name: verify-traces + image: ghcr.io/grafana/tempo-operator/test-utils@sha256:7cf76bad82feb2cc338d23b29d7585c9399dfc8105bbab0c0636a776916aa3bc + command: + - /bin/bash + - -eux + - -c + args: + - | + token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) + curl \ + -v -G \ + --header "Authorization: Bearer $token" \ + --cacert /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt \ + https://tempo-simplest-gateway.chainsaw-multitenancy.svc:8080/api/traces/v1/dev/tempo/api/search \ + --data-urlencode 'q={ resource.service.name="http" }' \ | tee /tmp/jaeger.out num_traces=$(jq ".traces | length" /tmp/jaeger.out) if [[ "$num_traces" != "10" ]]; then diff --git a/tests/e2e-disconnected/multitenancy/chainsaw-test.yaml b/tests/e2e-disconnected/multitenancy/chainsaw-test.yaml index 8c36a40..2565e94 100755 --- a/tests/e2e-disconnected/multitenancy/chainsaw-test.yaml +++ b/tests/e2e-disconnected/multitenancy/chainsaw-test.yaml @@ -5,6 +5,7 @@ metadata: creationTimestamp: null name: multitenancy spec: + namespace: chainsaw-multitenancy steps: - name: step-00 try: diff --git a/tests/e2e-disconnected/otlp-metrics-traces/02-otel-metrics-collector.yaml b/tests/e2e-disconnected/otlp-metrics-traces/02-otel-metrics-collector.yaml index db821a7..0ff520e 100644 --- a/tests/e2e-disconnected/otlp-metrics-traces/02-otel-metrics-collector.yaml +++ b/tests/e2e-disconnected/otlp-metrics-traces/02-otel-metrics-collector.yaml @@ -30,9 +30,7 @@ spec: pipelines: traces: receivers: [otlp] - processors: [] exporters: [otlp] metrics: receivers: [otlp] - processors: [] exporters: [prometheus] diff --git a/tests/e2e-disconnected/smoke-targetallocator/00-assert.yaml b/tests/e2e-disconnected/smoke-targetallocator/00-assert.yaml index 53d8bc5..5d01cb0 100644 --- a/tests/e2e-disconnected/smoke-targetallocator/00-assert.yaml +++ b/tests/e2e-disconnected/smoke-targetallocator/00-assert.yaml @@ -33,16 +33,15 @@ data: config: {} target_allocator: collector_id: ${POD_NAME} - endpoint: http://stateful-targetallocator:80 + endpoint: http://stateful-targetallocator.chainsaw-smoke-targetallocator.svc.cluster.local:80 interval: 30s service: pipelines: traces: exporters: - debug - processors: [] receivers: - jaeger kind: ConfigMap metadata: - name: stateful-collector-fb278632 + name: stateful-collector-2687b61c diff --git a/tests/e2e-disconnected/smoke-targetallocator/00-install.yaml b/tests/e2e-disconnected/smoke-targetallocator/00-install.yaml index 585a293..5eac75d 100644 --- a/tests/e2e-disconnected/smoke-targetallocator/00-install.yaml +++ b/tests/e2e-disconnected/smoke-targetallocator/00-install.yaml @@ -60,7 +60,6 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [] exporters: [debug] mode: statefulset targetAllocator: diff --git a/tests/e2e-disconnected/smoke-targetallocator/01-change-ta-config.yaml b/tests/e2e-disconnected/smoke-targetallocator/01-change-ta-config.yaml index 1907f75..7ea4232 100644 --- a/tests/e2e-disconnected/smoke-targetallocator/01-change-ta-config.yaml +++ b/tests/e2e-disconnected/smoke-targetallocator/01-change-ta-config.yaml @@ -34,5 +34,4 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [] exporters: [debug] diff --git a/tests/e2e-disconnected/smoke-targetallocator/chainsaw-test.yaml b/tests/e2e-disconnected/smoke-targetallocator/chainsaw-test.yaml index 242d3ef..e8ddfd8 100755 --- a/tests/e2e-disconnected/smoke-targetallocator/chainsaw-test.yaml +++ b/tests/e2e-disconnected/smoke-targetallocator/chainsaw-test.yaml @@ -5,6 +5,7 @@ metadata: creationTimestamp: null name: smoke-targetallocator spec: + namespace: chainsaw-smoke-targetallocator steps: - name: step-00 try: