Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Fix e2e tests #1071

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions tests/e2e-openshift/monitoring/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 17 additions & 1 deletion tests/e2e-openshift/monolithic-route/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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=(
Expand Down
18 changes: 17 additions & 1 deletion tests/e2e-openshift/route/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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=(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions tests/e2e-openshift/tls-singletenant/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down