kube

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package kube contains helpers for looking at pod logs

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

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

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

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