Documentation ¶
Index ¶
- func CopyFilesFromPod(c *CopyConfig, waitMsg string) error
- func CopyFilesToPod(c *CopyConfig, waitMsg string) error
- func RunCommand(kc *KubectlConfig, podName string, cmdArgs ...string) error
- func RunScript(kc *KubectlConfig, podName string, scriptDir string, scriptName string) error
- func SetLastAppliedConfigurationAnnotation(obj runtime.Object) error
- func SetPipes(kc *KubectlConfig)
- type CopyConfig
- type FilePath
- type KubectlConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFilesFromPod ¶
func CopyFilesFromPod(c *CopyConfig, waitMsg string) error
CopyFilesFromPod copies one or more remote files in a pod to local files. This function stops if an error occurs copying any of the files, and the remaining files are not copied.
func CopyFilesToPod ¶
func CopyFilesToPod(c *CopyConfig, waitMsg string) error
CopyFilesToPod copies one or more files to a pod. This function stops if an error occurs copying any of the files, and the remaining files are not copied.
func RunCommand ¶
func RunCommand(kc *KubectlConfig, podName string, cmdArgs ...string) error
func RunScript ¶
func RunScript(kc *KubectlConfig, podName string, scriptDir string, scriptName string) error
RunScript runs a script on a pod
func SetLastAppliedConfigurationAnnotation ¶
SetLastAppliedConfigurationAnnotation applies the kubectl.kubernetes.io/last-applied-configuration annotation in order to calculate correct 3-way merges between object configuration file/configuration file, live object configuration/live configuration and declarative configuration writer/declarative writer
func SetPipes ¶
func SetPipes(kc *KubectlConfig)
SetPipes connects the out and error streams of a KubectlConfig to write to pipes.
Types ¶
type CopyConfig ¶
type CopyConfig struct { *KubectlConfig FilePaths []FilePath PodName string }
CopyConfig contains information used to copy to and from the pod
type KubectlConfig ¶
type KubectlConfig struct { ConfigFlags *genericclioptions.ConfigFlags Streams genericiooptions.IOStreams StreamOut io.Reader StreamErr io.Reader StreamOutWriter io.WriteCloser StreamErrWriter io.WriteCloser Namespace string ErrBuf *bytes.Buffer IgnoreErrors []string }
KubectlConfig contains information used access a pod via kubectl
func NewKubectlConfig ¶
func NewKubectlConfig(restConfig *rest.Config, kubeConfigPath string, namespace string, ignoreErrors []string, usePipes bool) (*KubectlConfig, error)
NewKubectlConfig gets the configuration needed to use kubectl