Documentation
¶
Index ¶
- Variables
- func DeletePod(ctx context.Context, clientset *kubernetes.Clientset, podName string, ...) error
- func GetClientSet(ctx context.Context, clusterName string) (*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 RunCommandInTemporaryPod(ctx context.Context, config *rest.Config, ...) (*commandoutput.CommandOutput, 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 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 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)
Types ¶
This section is empty.