package debug
import "k8s.io/kubectl/pkg/cmd/debug"
Index ¶
- Constants
- func NewCmdDebug(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- type DebugOptions
- func NewDebugOptions(streams genericclioptions.IOStreams) *DebugOptions
- func (o *DebugOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *DebugOptions) Run(f cmdutil.Factory, cmd *cobra.Command) error
- func (o *DebugOptions) Validate() error
- type ProfileApplier
Constants ¶
const ProfileLegacy = "legacy"
ProfileLegacy represents the legacy debugging profile which is backwards-compatible with 1.23 behavior.
Functions ¶
func NewCmdDebug ¶
NewCmdDebug returns a cobra command that runs kubectl debug.
Types ¶
type DebugOptions ¶
type DebugOptions struct { Args []string ArgsOnly bool Attach bool Container string CopyTo string Replace bool Env []corev1.EnvVar Image string Interactive bool Namespace string TargetNames []string PullPolicy corev1.PullPolicy Quiet bool SameNode bool SetImages map[string]string bool TargetContainer string TTY bool Profile string genericclioptions.IOStreams WarningPrinter *printers.WarningPrinter // contains filtered or unexported fields }
DebugOptions holds the options for an invocation of kubectl debug.
func NewDebugOptions ¶
func NewDebugOptions(streams genericclioptions.IOStreams) *DebugOptions
NewDebugOptions returns a DebugOptions initialized with default values.
func (*DebugOptions) Complete ¶
Complete finishes run-time initialization of debug.DebugOptions.
func (*DebugOptions) Run ¶
Run executes a kubectl debug.
func (*DebugOptions) Validate ¶
func (o *DebugOptions) Validate() error
Validate checks that the provided debug options are specified.
type ProfileApplier ¶
type ProfileApplier interface { // Apply applies the profile to the given container in the pod. Apply(pod *corev1.Pod, containerName string, target runtime.Object) error }
func NewProfileApplier ¶
func NewProfileApplier(profile string) (ProfileApplier, error)
NewProfileApplier returns a new Options for the given profile name.
Source Files ¶
debug.go profile_applier.go profiles.go
- Version
- v0.26.1
- Published
- Jan 19, 2023
- Platform
- js/wasm
- Imports
- 34 packages
- Last checked
- 2 hours ago –
Tools for package owners.