xpdig
đ§° 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.
⨠Features
Trace
- ⨠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
$PAGERand$EDITORwhen exploring the traces - đ Copy full qualified objects names straight from UI (API group + Kind + name)
- âťď¸ Automatic refresh
đ Install
Dependencies
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.
Linux and Windows
Check the releases section for more information details.
MacOS
brew install brunoluiz/tap/xpdig
Other
Use go install to install it
go install github.com/brunoluiz/xpdig/cmd/xpdig@latest
âď¸ Usage
# 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
Navigation
h/?: show helparrow keys or j/k: cursor up/downenter/d: executeskubectl describeon the resourcey: executeskubectl geton the resourcee: executeskubectl editon the resourcectrl+d: executeskubectl deleteon 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
k9s integration
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.
Troubleshooting and debugging
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.
