forked from grafana/tempo-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test mut-gather script (grafana#1052)
- Loading branch information
1 parent
642fc96
commit 88d46a5
Showing
4 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Check if must gather directory exists | ||
MUST_GATHER_DIR=/tmp/monolithic-route | ||
mkdir -p $MUST_GATHER_DIR | ||
|
||
# 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 | ||
|
||
# Define required files and directories | ||
REQUIRED_ITEMS=( | ||
"event-filter.html" | ||
"timestamp" | ||
"*sha*/deployment-tempo-operator-controller.yaml" | ||
"*sha*/olm/operator-servicemeshoperator-openshift-operators.yaml" | ||
"*sha*/olm/installplan-install-*.yaml" | ||
"*sha*/olm/clusterserviceversion-tempo-operator-*.yaml" | ||
"*sha*/olm/operator-opentelemetry-product-openshift-opentelemetry-operator.yaml" | ||
"*sha*/olm/operator-tempo-operator-tempo-operator.yaml" | ||
"*sha*/olm/operator-tempo-product-openshift-tempo-operator.yaml" | ||
"*sha*/olm/subscription-tempo-operator-*-sub.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/tempomonolithic-mono-route.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/service-tempo-mono-route-jaegerui.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/configmap-tempo-mono-route-serving-cabundle.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/statefulset-tempo-mono-route.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/service-tempo-mono-route.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/route-tempo-mono-route-jaegerui.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/configmap-tempo-mono-route-config.yaml" | ||
"*sha*/namespaces/chainsaw-mono-route/tempomonolithic/mono-route/serviceaccount-tempo-mono-route.yaml" | ||
"*sha*/tempo-operator-controller-*" | ||
) | ||
|
||
# Verify each required item | ||
for item in "${REQUIRED_ITEMS[@]}"; do | ||
if ! find "$MUST_GATHER_DIR" -path "$MUST_GATHER_DIR/$item" -print -quit | grep -q .; then | ||
echo "Missing: $item" | ||
exit 1 | ||
else | ||
echo "Found: $item" | ||
fi | ||
done | ||
|
||
# Cleanup the must-gather directory | ||
rm -rf $MUST_GATHER_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
# Check if must gather directory exists | ||
MUST_GATHER_DIR=/tmp/route | ||
mkdir -p $MUST_GATHER_DIR | ||
|
||
# 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 | ||
|
||
# Define required files and directories | ||
REQUIRED_ITEMS=( | ||
"event-filter.html" | ||
"timestamp" | ||
"*sha*/deployment-tempo-operator-controller.yaml" | ||
"*sha*/olm/installplan-install-*" | ||
"*sha*/olm/clusterserviceversion-tempo-operator-*.yaml" | ||
"*sha*/olm/operator-opentelemetry-product-openshift-opentelemetry-operator.yaml" | ||
"*sha*/olm/operator-tempo-operator-tempo-operator.yaml" | ||
"*sha*/olm/operator-tempo-product-openshift-tempo-operator.yaml" | ||
"*sha*/olm/subscription-tempo-operator-*-sub.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-distributor.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-ingester.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/deployment-tempo-simplest-distributor.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-querier.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/configmap-tempo-simplest.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-compactor.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-query-frontend.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/deployment-tempo-simplest-querier.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/tempostack-simplest.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/serviceaccount-tempo-simplest-query-frontend.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/statefulset-tempo-simplest-ingester.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/deployment-tempo-simplest-query-frontend.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/route-tempo-simplest-query-frontend.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-gossip-ring.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/configmap-tempo-simplest-ca-bundle.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/serviceaccount-tempo-simplest.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/deployment-tempo-simplest-compactor.yaml" | ||
"*sha*/namespaces/chainsaw-route/tempostack/simplest/service-tempo-simplest-query-frontend-discovery.yaml" | ||
"*sha*/tempo-operator-controller-*" | ||
) | ||
|
||
# Verify each required item | ||
for item in "${REQUIRED_ITEMS[@]}"; do | ||
if ! find "$MUST_GATHER_DIR" -path "$MUST_GATHER_DIR/$item" -print -quit | grep -q .; then | ||
echo "Missing: $item" | ||
exit 1 | ||
else | ||
echo "Found: $item" | ||
fi | ||
done | ||
|
||
# Cleanup the must-gather directory | ||
rm -rf $MUST_GATHER_DIR |