kube

package
v1.39.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Description: Contains helpers for looking at pod logs

Index

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 GetKubeConfig() (string, error)

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.

Jump to

Keyboard shortcuts

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