command

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommandInCluster

func RunCommandInCluster(ctx context.Context, c *kubernetes.Clientset, nodeName string, ns string, command string, log logr.Logger, opts ...RunOption) (string, error)

RunCommandInCluster runs a command in a pod in the cluster and returns the output

Types

type RunOption added in v1.15.0

type RunOption interface {
	// contains filtered or unexported methods
}

func CreateOptionNoExpectedOutput added in v1.15.0

func CreateOptionNoExpectedOutput() RunOption

CreateOptionNoExpectedOutput allows executing a command on a pod when no output is expected from the command

func CreateOptionUseCustomizedExecutePod added in v1.15.0

func CreateOptionUseCustomizedExecutePod(pod *corev1.Pod) RunOption

CreateOptionUseCustomizedExecutePod allows executing a command on a pod provided by this option instead of the default one

Jump to

Keyboard shortcuts

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