This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1f1538
commit e187e03
Showing
7 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,6 @@ | ||
FROM quay.io/openshift/origin-cli:latest | ||
|
||
# copy all collection scripts to /usr/bin | ||
COPY collection-scripts/* /usr/bin/ | ||
|
||
ENTRYPOINT /usr/bin/gather |
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,10 @@ | ||
GATHER_IMG ?= must-gather | ||
IMAGE_BUILDER ?= docker | ||
|
||
build-must-gather: | ||
${IMAGE_BUILDER} build . -t ${GATHER_IMG} | ||
|
||
push-must-gather: | ||
${IMAGE_BUILDER} push ${GATHER_IMG} | ||
|
||
build-and-push-must-gather: build-must-gather push-must-gather |
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,32 @@ | ||
# must-gather for Open Data Hub | ||
|
||
The must-gather script allows a cluster admin to collect information about various key resources and namespaces | ||
for Open Data Hub. | ||
|
||
## Data Collected | ||
|
||
The must-gather script currently collects data from all the namespaces that has - | ||
- `KfDef` instances | ||
- `Notebook` instances | ||
- `Inferenceservice` instances | ||
|
||
|
||
## Usage | ||
|
||
``` | ||
oc adm must-gather --image=quay.io/opendatahub/must-gather:v1.0.0 | ||
``` | ||
## Developer Guide | ||
|
||
To build custom image : | ||
|
||
``` | ||
export GATHER_IMG= <image-name> | ||
make build-and-push-must-gather | ||
``` | ||
|
||
To collect data for custom repositories for Open Data Hub set the following variables: | ||
|
||
``` | ||
export ODH_NAMESPACE= <name-for-odh-namespace> |
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,18 @@ | ||
#!/bin/bash | ||
|
||
kfdefs=$(oc get kfdefs --all-namespaces -o=jsonpath='{range .items[*]}{.metadata.namespace}{"\n"}{end}') | ||
|
||
# Get logs from all KfDef namespaces | ||
for i in $kfdefs; | ||
do | ||
# Get pod logs for all the pods in KfDef namespaces | ||
oc adm inspect namespace/"$i" --dest-dir=must-gather || echo "Error getting logs from $i" | ||
|
||
done | ||
|
||
## Get Operator pod logs | ||
mkdir must-gather/odh-operator || echo "Error creating odh-operator directory" | ||
oc logs deployment/opendatahub-operator -n openshift-operators >> must-gather/odh-operator/pod.log | ||
|
||
exit 0 | ||
|
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,12 @@ | ||
#!/bin/bash | ||
|
||
inferenceservices=$(oc get inferenceservice --all-namespaces -o=jsonpath='{range .items[*]}{.metadata.namespace}{"\n"}{end}') | ||
|
||
# Get logs from all Inferenceservices namespaces | ||
for i in $inferenceservices; | ||
do | ||
# Get pod logs for all the pods in Inferenceservices namespaces | ||
oc adm inspect namespace/"$i" --dest-dir=must-gather || echo "Error getting logs from $i" | ||
|
||
done | ||
|
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,13 @@ | ||
#!/bin/bash | ||
|
||
notebooks=$(oc get notebook --all-namespaces -o=jsonpath='{range .items[*]}{.metadata.namespace}{"\n"}{end}') | ||
|
||
# Get logs from all notebook namespaces | ||
for i in $notebooks; | ||
do | ||
# Get pod logs for all the pods in Notebook namespaces | ||
mkdir must-gather/notebooks || echo "Error creating odh-operator directory" | ||
oc adm inspect namespace/"$i" --dest-dir=must-gather/notebooks || echo "Error getting logs from $i" | ||
|
||
done | ||
|