Skip to content

Commit

Permalink
feat(must-gather): get kepler internals
Browse files Browse the repository at this point in the history
Signed-off-by: Sunil Thaha <sthaha@redhat.com>
  • Loading branch information
sthaha committed Jan 31, 2024
1 parent 356126d commit d82658b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion must-gather/common
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

set -eu -o pipefail

export KEPLER_NS=$(oc get ns -l app.kubernetes.io/managed-by=kepler-operator --output=jsonpath='{.items[*].metadata.name}')
export KEPLER_NS=$(oc get keplerinternals kepler -o jsonpath='{.spec.exporter.deployment.namespace}')
export LOGFILE_NAME="gather-debug.log"

get_timestamp() {
Expand Down
11 changes: 11 additions & 0 deletions must-gather/gather
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ print_usage() {
echo -e "Usage: /usr/bin/gather <gather-collection-path>"
}

get_kepler_internal_instances() {
log "getting kepler internal instance(s)"
KEPLER_INTERNALS=$(oc get keplerinternals.kepler.system.sustainable.computing.io -oname)
if [ -n "$KEPLER_INTERNALS" ]; then
run oc get "$KEPLER_INTERNALS" -oyaml "$BASE_COLLECTION_PATH/kepler-internals.yaml"
else
echo "no kepler internals found" >>"$BASE_COLLECTION_PATH/kepler-internals.yaml"
fi
}

get_kepler_instance() {
log "getting kepler instance(s)"
KEPLERS=$(oc get keplers.kepler.system.sustainable.computing.io -oname)
Expand Down Expand Up @@ -124,6 +134,7 @@ main() {
gather_olm_info
gather_operator_info
get_kepler_instance
get_kepler_internal_instances
get_kepler_events
get_kepler_daemon_set
get_kepler_config_map
Expand Down

0 comments on commit d82658b

Please sign in to comment.