Skip to content

Commit

Permalink
Test timeout for non-multitenant TempoStack and TempoMonolithic insta…
Browse files Browse the repository at this point in the history
…nces (grafana#1049)
  • Loading branch information
IshwarKanse authored Oct 8, 2024
1 parent c7eb01b commit ff0d0dc
Show file tree
Hide file tree
Showing 11 changed files with 667 additions and 17 deletions.
1 change: 0 additions & 1 deletion tests/e2e-openshift/monolithic-route/chainsaw-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
Expand Down
54 changes: 48 additions & 6 deletions tests/e2e-openshift/monolithic-route/install-tempo-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
- --tls-cert=/etc/tls/private/tls.crt
- --tls-key=/etc/tls/private/tls.key
- --upstream=http://localhost:16686
- --upstream-timeout=70s
- --upstream-timeout=2m0s
- '--openshift-sar={"namespace": "chainsaw-mono-route", "resource": "pods",
"verb": "get"}'
name: oauth-proxy
Expand Down Expand Up @@ -249,24 +249,66 @@ spec:
app.kubernetes.io/instance: mono-route
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo-monolithic

---
apiVersion: v1
data:
tempo-query.yaml: |
address: 127.0.0.1:7777
backend: 127.0.0.1:3200
tenant_header_key: x-scope-orgid
services_query_duration: 72h0m0s
tempo.yaml: |
server:
http_listen_port: 3200
http_server_read_timeout: 2m0s
http_server_write_timeout: 2m0s
internal_server:
enable: true
http_listen_address: 0.0.0.0
storage:
trace:
backend: local
wal:
path: /var/tempo/wal
local:
path: /var/tempo/blocks
distributor:
receivers:
otlp:
protocols:
grpc: {}
http: {}
usage_report:
reporting_enabled: false
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: config
app.kubernetes.io/instance: mono-route
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo-monolithic
name: tempo-mono-route-config

---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
annotations:
haproxy.router.openshift.io/timeout: 120s
labels:
app.kubernetes.io/component: jaegerui
app.kubernetes.io/instance: mono-route
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo-monolithic
name: tempo-mono-jaegerui
namespace: chainsaw-mono-route
annotations:
haproxy.router.openshift.io/timeout: 70s
name: tempo-mono-route-jaegerui
spec:
port:
targetPort: oauth-proxy
tls:
termination: reencrypt
to:
kind: Service
name: tempo-mono-jaegerui
name: tempo-mono-route-jaegerui
weight: 100
wildcardPolicy: None
2 changes: 1 addition & 1 deletion tests/e2e-openshift/monolithic-route/install-tempo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: mono-route
namespace: chainsaw-mono-route
spec:
timeout: 70s
timeout: 2m
jaegerui:
enabled: true
route:
Expand Down
12 changes: 12 additions & 0 deletions tests/e2e-openshift/route/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ kind: Test
metadata:
name: route
spec:
namespace: chainsaw-route
steps:
- name: Install Minio storage
try:
- apply:
file: install-storage.yaml
- assert:
file: install-storage-assert.yaml
- name: Install TempoStack with ingress type route
try:
- apply:
file: install-tempo.yaml
- assert:
file: install-tempo-assert.yaml
- name: Check the status of TempoStack
try:
- script:
timeout: 5m
content: kubectl get --namespace $NAMESPACE tempo simplest -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}' | grep True
6 changes: 6 additions & 0 deletions tests/e2e-openshift/route/install-storage-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
status:
readyReplicas: 1
75 changes: 75 additions & 0 deletions tests/e2e-openshift/route/install-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app.kubernetes.io/name: minio
name: minio
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
spec:
selector:
matchLabels:
app.kubernetes.io/name: minio
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: minio
spec:
containers:
- command:
- /bin/sh
- -c
- |
mkdir -p /storage/tempo && \
minio server /storage
env:
- name: MINIO_ACCESS_KEY
value: tempo
- name: MINIO_SECRET_KEY
value: supersecret
image: quay.io/minio/minio:latest
name: minio
ports:
- containerPort: 9000
volumeMounts:
- mountPath: /storage
name: storage
volumes:
- name: storage
persistentVolumeClaim:
claimName: minio
---
apiVersion: v1
kind: Service
metadata:
name: minio
spec:
ports:
- port: 9000
protocol: TCP
targetPort: 9000
selector:
app.kubernetes.io/name: minio
type: ClusterIP
---
apiVersion: v1
kind: Secret
metadata:
name: minio
stringData:
endpoint: http://minio:9000
bucket: tempo
access_key_id: tempo
access_key_secret: supersecret
type: Opaque
Loading

0 comments on commit ff0d0dc

Please sign in to comment.