cmd

package
v1.16.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 32 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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

type ExtraCommandsFunc func(confDir string, cmdDir string, k8sPods []string) []string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL