utils

package
v0.0.8-internal Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMonitorCommand = "watch -n 1 rocm-smi"

Functions

func ExecInContainer

func ExecInContainer(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	config *rest.Config,
	podName string,
	containerName string,
	namespace string,
	command []string,
	interactive bool,
	tty bool,
) error

func IsGPUPod

func IsGPUPod(pod corev1.Pod) bool

func OutputLogs

func OutputLogs(
	ctx context.Context,
	clientset *kubernetes.Clientset,
	podName string,
	containerName string,
	tailLines int64,
	namespace string,
	follow bool,
) error

OutputLogs outputs logs for a given pod container to the standard output

func ParseCommand

func ParseCommand(command string) []string

func ValidateCommand

func ValidateCommand(command string) error

Types

type PodSelectionPredicate

type PodSelectionPredicate func(pod corev1.Pod) bool

Jump to

Keyboard shortcuts

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