Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BugtoolRootCmd = &cobra.Command{ Use: "cilium-bugtool [OPTIONS]", Short: "Collects agent & system information useful for bug reporting", Example: ` # Collect information and create archive file $ cilium-bugtool [...] # Collect and retrieve archive if Cilium is running in a Kubernetes pod $ kubectl get pods --namespace kube-system NAME READY STATUS RESTARTS AGE cilium-kg8lv 1/1 Running 0 13m [...] $ kubectl -n kube-system exec cilium-kg8lv -- cilium-bugtool $ kubectl cp kube-system/cilium-kg8lv:/tmp/cilium-bugtool-243785589.tar /tmp/cilium-bugtool-243785589.tar`, Run: func(cmd *cobra.Command, args []string) { runTool() }, }
BugtoolRootCmd is the top level command for the bugtool.
var ExtraCommands []ExtraCommandsFunc
ExtraCommands is a slice of ExtraCommandsFunc each of which generates a list of additional commands to be executed alongside the default ones.
Functions ¶
This section is empty.
Types ¶
type BugtoolConfiguration ¶
type BugtoolConfiguration struct { // Commands is the exact commands that will be run by the bugtool Commands []string `json:"commands"` }
BugtoolConfiguration creates and loads the configuration file used to run the commands. The only commands not managed by the configuration is initial setup, for ex. searching for Cilium daemonset pods or running uname.
type ExtraCommandsFunc ¶ added in v1.16.0
ExtraCommandsFunc represents a function that builds and returns a list of extra commands to gather additional information in specific environments.
confDir is the directory where the output of "config commands" (e.g: "uname -r") is stored. cmdDir is the directory where the output of "info commands" (e.g: "cilium-dbg debuginfo", "cilium-dbg metrics list" and pprof traces) is stored. k8sPods is a list of the cilium pods.
It returns a slice of strings with all the commands to be executed.