Documentation
¶
Overview ¶
Package shell implements the deployah shell command.
The command opens an interactive shell inside a running pod for a selected component, handling pod discovery, container selection, and kubectl exec wiring on behalf of the user.
Register the command with Register on a nabat.dev/nabat.App instance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecuteOptions ¶
type ExecuteOptions struct {
// ProjectName is the Deployah project name.
ProjectName string
// Component is the target component name.
Component string
// Container selects a container when the pod has more than one.
Container string
// Shell is the shell binary to run inside the container.
Shell string
// Command runs a single command instead of an interactive shell.
Command string
// WorkDir is the working directory inside the container.
WorkDir string
// Environment limits pod selection to one environment.
Environment string
}
ExecuteOptions configures an interactive or one-shot shell session.
type Options ¶
type Options struct {
Project string `nabat:"project"`
Component string `nabat:"component"`
Container string `nabat:"container"`
Shell string `nabat:"shell"`
Command string `nabat:"command"`
WorkDir string `nabat:"workdir"`
Environment string `nabat:"environment"`
}
Options holds command-line flags for shell.
type ShellExecutor ¶
type ShellExecutor struct {
// contains filtered or unexported fields
}
ShellExecutor runs kubectl exec sessions against Deployah pods.
func NewShellExecutor ¶
NewShellExecutor constructs a ShellExecutor from a resolved session.Cluster.
func (*ShellExecutor) Execute ¶
func (e *ShellExecutor) Execute(opts ExecuteOptions) error
Execute runs a shell or command in the selected pod container.
Click to show internal directories.
Click to hide internal directories.