Documentation
¶
Index ¶
- Variables
- func CopyFileToPod(ctx context.Context, config *rest.Config, localFile string, destPath string, ...) error
- func CreatePod(ctx context.Context, config *rest.Config, ...) error
- func DeletePod(ctx context.Context, clientset *kubernetes.Clientset, podName string, ...) error
- func Exec(ctx context.Context, config *rest.Config, ...) (*commandoutput.CommandOutput, error)
- func GetClientSet(ctx context.Context, clusterName string) (*kubernetes.Clientset, error)
- func GetClientSetFromRestConfig(ctx context.Context, restConfig *rest.Config) (*kubernetes.Clientset, error)
- func GetConfig(ctx context.Context, clusterName string) (*rest.Config, error)
- func GetConfigFromKubeconfig(ctx context.Context, clusterName string) (*rest.Config, error)
- func GetContainerAllLogs(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) ([]byte, error)
- func GetContainerLogs(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) (stdout []byte, stderr []byte, err error)
- func GetContainerStderrLogs(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) ([]byte, error)
- func GetContainerStdoutLogs(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...) ([]byte, error)
- func GetInClusterConfig(ctx context.Context) (*rest.Config, error)
- func PodExists(ctx context.Context, clientSet *kubernetes.Clientset, podName string, ...) (bool, error)
- func RunCommandInTemporaryPod(ctx context.Context, config *rest.Config, ...) (*commandoutput.CommandOutput, error)
- func WaitForPodDeleted(ctx context.Context, clientset *kubernetes.Clientset, namespaceName string, ...) error
- func WaitForPodRunning(ctx context.Context, clientSet *kubernetes.Clientset, namespace string, ...) error
- func WaitForPodSucceeded(ctx context.Context, clientSet *kubernetes.Clientset, namespace string, ...) error
Constants ¶
This section is empty.
Variables ¶
var ErrOnlyCombinedStreamAvailable = errors.New("specify the stream is not supported. Only combinded stream is availalbe by the kubernetes API, feature flag seems deactivated")
Functions ¶
func CopyFileToPod ¶ added in v0.438.0
func CreatePod ¶ added in v0.436.0
func CreatePod(ctx context.Context, config *rest.Config, options *kubernetesparameteroptions.RunCommandOptions) error
func Exec ¶ added in v0.436.0
func Exec(ctx context.Context, config *rest.Config, options *kubernetesparameteroptions.RunCommandOptions) (*commandoutput.CommandOutput, error)
func GetClientSet ¶
Get the kubernetes.Clientset to communicate with the kubernetes cluster.
If in cluster authentication is available (e.g. running in a pod in the cluster) the returned clientset uses this method.
Otherwise a clientset based on ~/.kube/config is returned.
clusterName is optional. If not specified the default cluster is taken.
func GetClientSetFromRestConfig ¶ added in v0.438.0
func GetConfig ¶ added in v0.341.0
Get the rest.Config to communicate with the kubernetes cluster.
If in cluster authentication is available (e.g. running in a pod in the cluster) the returned config uses this method.
Otherwise a config based on ~/.kube/config is returned.
clusterName is optional. If not specified the default cluster is taken.
func GetConfigFromKubeconfig ¶ added in v0.341.0
func GetContainerAllLogs ¶ added in v0.361.0
func GetContainerAllLogs(ctx context.Context, clientset *kubernetes.Clientset, namespace string, podName string, containerName string) ([]byte, error)
'All' combines stdout and stderr.
func GetContainerLogs ¶ added in v0.361.0
func GetContainerStderrLogs ¶ added in v0.361.0
func GetContainerStdoutLogs ¶ added in v0.361.0
func GetInClusterConfig ¶ added in v0.341.0
func RunCommandInTemporaryPod ¶ added in v0.361.0
func RunCommandInTemporaryPod(ctx context.Context, config *rest.Config, options *kubernetesparameteroptions.RunCommandOptions) (*commandoutput.CommandOutput, error)
func WaitForPodDeleted ¶ added in v0.436.0
func WaitForPodRunning ¶ added in v0.436.0
Types ¶
This section is empty.