Documentation ¶
Overview ¶
Package kube contains helpers for looking at pod logs
Description: Contains helpers for looking at pod logs
Index ¶
- func GetKubeClient() (kubernetes.Interface, error)
- func GetKubeClientWithConfig() (kubernetes.Interface, *rest.Config, error)
- func GetKubeConfig() (string, error)
- func JobSucceeded(ctx context.Context, k kubernetes.Interface, name, namespace string) (bool, error)
- func StreamJobLogs(ctx context.Context, k kubernetes.Interface, log logrus.FieldLogger, ...) error
- func StreamPodLogs(ctx context.Context, k kubernetes.Interface, log logrus.FieldLogger, ...) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubeClient ¶
func GetKubeClient() (kubernetes.Interface, error)
GetKubeClient returns a Kubernetes client
func GetKubeClientWithConfig ¶
func GetKubeClientWithConfig() (kubernetes.Interface, *rest.Config, error)
func GetKubeConfig ¶
func JobSucceeded ¶ added in v1.33.0
func JobSucceeded(ctx context.Context, k kubernetes.Interface, name, namespace string) (bool, error)
JobSucceeded returns a bool if the given job has/hasn't succeeded. If an error is returned, this is considered unrecoverable.
func StreamJobLogs ¶ added in v1.33.0
func StreamJobLogs(ctx context.Context, k kubernetes.Interface, log logrus.FieldLogger, name, namespace string, w io.Writer) error
StreamJobLogs streams pod logs to the provided io.Writer
func StreamPodLogs ¶ added in v1.33.0
func StreamPodLogs(ctx context.Context, k kubernetes.Interface, log logrus.FieldLogger, name, namespace string) (io.ReadCloser, error)
StreamPodLogs streams pod logs from a given pod
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.