forked from stolostron/search-v2-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.
Adding regularly used scripts to this repo in a formal way (stolostro…
…n#132) * Adding regularly used scripts to this repo in a formal way Signed-off-by: Joydeep Banerjee <[email protected]> * Adding regularly used scripts to this repo in a formal way Signed-off-by: Joydeep Banerjee <[email protected]> --------- Signed-off-by: Joydeep Banerjee <[email protected]>
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Tools | ||
|
||
This directory has scripts and other utilites to help in your Search journey | ||
|
||
1. This [script](postgres-debug.sh) collects data from the Postgres instance to help debug issues with the RHACM search service. | ||
1. This [script](/resource-extractor.sh) collects the number of different kubernetes resources running on a cluster. If there are `x` number of manager clusters of this size going to the connect to a ACM Hub, this data can be used to simulate loading on the search service in ACM Hub. |
File renamed without changes.
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,15 @@ | ||
#!/bin/bash | ||
|
||
# HOW TO RUN THIS SCRIPT: | ||
# Log into the Managed Cluster with "oc login --server='' --token='' " | ||
# ./resource-extractor.sh | ||
|
||
# DESCRIPTION: | ||
# This script collects the number of different kubernetes resources running on a cluster. | ||
|
||
kinds=( $(oc api-resources --no-headers --verbs='watch','list' | awk '{print $1;}') ) | ||
declare kinds >> /dev/null | ||
for i in "${kinds[@]}" | ||
do | ||
echo "$(oc get ${i} --all-namespaces --ignore-not-found | wc -l) - ${i}" | ||
done |