k8s

package
v0.133.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecPod

func ExecPod(ctx context.Context, clusterID string, pod *corev1.Pod) error

ExecPod exects into a pod.

func FindLatestOrLastFailedPod

func FindLatestOrLastFailedPod(pods []corev1.Pod) (latest *corev1.Pod, lastFailed *corev1.Pod)

FindLatestOrLastFailedPod finds the latest pod and the last failed pod from the given list of pods.

func ListPodsForJob

func ListPodsForJob(ctx context.Context, clusterID, ns, name string) ([]corev1.Pod, error)

ListPodsForJob lists all pods for the given job.

func NewClient

func NewClient(env *runtime.Env, clusterID string) (kubernetes.Interface, error)

NewClient creates a new Kubernetes client.

func PortForward

func PortForward(ctx context.Context, clusterID string, pod *corev1.Pod, localPort, remotePort int) error

PortForward establishes a port-forwarding session to a pod.

This first attempts tunneling (websocket) dialer, then fallback to SPDY dialer. Please note that the websocket works only with k8s 1.30 with the "PortForwardWebsockets" feature gate enabled.

func StreamPodsLogs

func StreamPodsLogs(ctx context.Context, clusterID string, follow bool, pods ...corev1.Pod) error

StreamPodsLogs streams logs from the given pod to stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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