Documentation
¶
Index ¶
- func Create(args ...string) ([]byte, error)
- func CreateFromSpec(spec []byte, namespace string, args ...string) ([]byte, error)
- func Delete(resourceType, name, namespace string) ([]byte, error)
- func GetNamespaces(ctx context.Context, runner utils.CommandRunner) ([]string, error)
- func GetNodesAddr(ctx context.Context) ([]string, error)
- func GetPodContainers(ctx context.Context, namespace, pod string, runner utils.CommandRunner) ([]string, error)
- func GetPods(ctx context.Context, namespace string, runner utils.CommandRunner) ([]string, error)
- func Run(name string, args ...string) ([]byte, error)
- func RunCommand(cmd *Cmd, options ...OptionSetter) ([]byte, error)
- type Cmd
- type OptionSetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromSpec ¶
CreateFromSpec creates resources specified in the provided spec in the given namespace. Returns the output of the create command.
func GetNamespaces ¶
GetNamespaces fetches the names of all namespaces
func GetNodesAddr ¶
GetNodesAddr returns internal IP addresses of all nodes in the cluster
func GetPodContainers ¶
func GetPodContainers(ctx context.Context, namespace, pod string, runner utils.CommandRunner) ([]string, error)
GetPodContainers fetches the names of the containers from the specified pod in the given namespace
func RunCommand ¶
func RunCommand(cmd *Cmd, options ...OptionSetter) ([]byte, error)
RunCommand runs a kubectl command specified with args
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
Cmd is a kubectl command with arguments
type OptionSetter ¶
type OptionSetter func(*Cmd)
OptionSetter is a functional option for configuring commands
func WithPrivilegedConfig ¶
func WithPrivilegedConfig() OptionSetter
WithPrivilegedConfig returns a command option to specify a privileged kubeconfig
Click to show internal directories.
Click to hide internal directories.