🧰 A terminal based UI to explore Crossplane traces
xpdig
provides a terminal based UI (similar to k9s
) to interactively explore
Crossplane traces,
making it easier to navigate, debug and understand objects. It leverages
crossplane trace
to render the object tree.
- ✨ Expanded details at a glance, with highlight colouring for possible issues
- 📖 Get, describe, edit and delete objects from the explorer, without the need
to separately execute
kubectl
- 🔨 Use your own
$PAGER
and$EDITOR
when exploring the traces - 📋 Copy full qualified objects names straight from UI (API group + Kind + name)
- ♻️ Automatic refresh
crossplane
, kubectl
and some pager (eg: less
)
installed, since this application runs these within it.
The pager used can be customised via PAGER
in your environment variables
(eg, bat
). It defaults to less
.
Check the releases section for more information details.
brew install brunoluiz/tap/xpdig
Use go install
to install it
go install github.com/brunoluiz/xpdig/cmd/xpdig@latest
# Loading a trace
## It supports XRs (non-namespaced objects)
xpdig trace XObject/hello-world
## It supports Claims (namespaced objects)
xpdig trace -n <namespace> Object/hello-world
# Support for other context (eg: dev/prod cluster)
xpdig trace --context <context> Object/hello-world
# Loading a trace generated by `crossplane beta trace -o json <>`
cat <trace.json> | xpdig trace --stdin
crossplane beta trace -o json <> | xpdig trace --stdin
h/?
: show helparrow keys or j/k
: cursor up/downenter/d
: executeskubectl describe
on the resourcey
: executeskubectl get
on the resourcee
: executeskubectl edit
on the resourcectrl+d
: executeskubectl delete
on the resource/
: search (ENTER to submit, ESC to clear)n/N
: navigate between search resultsctrl+f/ctrl+b | pageUp/pageDown
: jumps full page of results (up or down)q/ctrl+c
: quit
Since k9s
supports plugins, there is a
basic configuration that can be copied to your own setup in k9s.yaml
.
For MacOS users, you can copy the sample file to ~/Library/Application\ Support/k9s/plugins.yaml
,
while Linux users can copy to $XDG_CONFIG_HOME/k9s/plugins.yaml
.
In case the application is misbehaving, enable the logs by adding --log [dst:./tmp/logs.json]
and live tail the file to follow what is happening (eg, tail -f ./tmp/logs.json
).
If --log-level debug
is set, it will output all events received by the main
handler in bubbles/app
. Bear in mind that this includes all Crossplane
traces, which might have sensitive metadata, such as: domain specific names,
labels etc.