Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDebugCmd ¶
func NewDebugCmd(streams genericclioptions.IOStreams) *cobra.Command
NewDebugCmd returns a cobra command wrapping DebugOptions
Types ¶
type Config ¶
type Config struct {
AgentPort int `yaml:"agentPort,omitempty"`
Image string `yaml:"image,omitempty"`
RegistrySecretName string `yaml:"registrySecretName,omitempty"`
RegistrySecretNamespace string `yaml:"registrySecretNamespace,omitempty"`
RegistrySkipTLSVerify bool `yaml:"registrySkipTLSVerify,omitempty"`
ForkPodRetainLabels []string `yaml:"forkPodRetainLabels,omitempty"`
DebugAgentDaemonSet string `yaml:"debugAgentDaemonset,omitempty"`
DebugAgentNamespace string `yaml:"debugAgentNamespace,omitempty"`
Command []string `yaml:"command,omitempty"`
PortForward bool `yaml:"portForward,omitempty"`
CreateDebugAgentPod bool `yaml:"createDebugAgentPod,omitempty"`
AgentPodNamePrefix string `yaml:"agentPodNamePrefix,omitempty"`
AgentPodNamespace string `yaml:"agentPodNamespace,omitempty"`
AgentImage string `yaml:"agentImage,omitempty"`
AgentImagePullPolicy string `yaml:"agentImagePullPolicy,omitempty"`
AgentImagePullSecretName string `yaml:"agentImagePullSecretName,omitempty"`
AgentPodCpuRequests string `yaml:"agentCpuRequests,omitempty"`
AgentPodMemoryRequests string `yaml:"agentMemoryRequests,omitempty"`
AgentPodCpuLimits string `yaml:"agentCpuLimits,omitempty"`
AgentPodMemoryLimits string `yaml:"agentMemoryLimits,omitempty"`
IsLxcfsEnabled bool `yaml:"isLxcfsEnabled,omitempty"`
Verbosity int `yaml:"verbosity,omitempty"`
}
type DebugOptions ¶
type DebugOptions struct {
// target pod select options
Namespace string
PodName string
Fork bool
ForkPodRetainLabels []string
// Debug-container options
Image string
RegistrySecretName string
RegistrySecretNamespace string
RegistrySkipTLSVerify bool
IsLxcfsEnabled bool
ContainerName string
Command []string
AppName string
ConfigLocation string
// Debug-agent options
CreateDebugAgentPod bool
AgentImage string
AgentPort int
AgentImagePullPolicy string
AgentImagePullSecretName string
// agentPodName = agentPodNamePrefix + nodeName
AgentPodName string
AgentPodNamespace string
AgentPodNode string
AgentPodResource agentPodResources
Flags *genericclioptions.ConfigFlags
CoreClient coreclient.CoreV1Interface
KubeCli *kubernetes.Clientset
Args []string
Config *restclient.Config
// use for port-forward
RESTClient *restclient.RESTClient
PortForwarder portForwarder
Ports []string
StopChannel chan struct{}
ReadyChannel chan struct{}
PortForward bool
DebugAgentDaemonSet string
DebugAgentNamespace string
genericclioptions.IOStreams
Verbosity int
Logger *log.Logger
UserName string
// contains filtered or unexported fields
}
DebugOptions specify how to run debug container in a running pod
func NewDebugOptions ¶
func NewDebugOptions(streams genericclioptions.IOStreams) *DebugOptions
NewDebugOptions new debug options
func (*DebugOptions) Run ¶
func (o *DebugOptions) Run() error
TODO: refactor Run() spaghetti code Run run
Click to show internal directories.
Click to hide internal directories.