podcmd

package
v0.29.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 19

Documentation

Index

Constants

View Source
const DefaultContainerAnnotationName = "kubectl.kubernetes.io/default-container"

DefaultContainerAnnotationName is an annotation name that can be used to preselect the interesting container from a pod when running kubectl.

Variables

This section is empty.

Functions

func AllContainerNames added in v0.24.0

func AllContainerNames(pod *v1.Pod) string

func FindContainerByName

func FindContainerByName(pod *v1.Pod, name string) (*v1.Container, string)

FindContainerByName selects the named container from the spec of the provided pod or return nil if no such container exists.

func FindOrDefaultContainerByName

func FindOrDefaultContainerByName(pod *v1.Pod, name string, quiet bool, warn io.Writer) (*v1.Container, error)

FindOrDefaultContainerByName defaults a container for a pod to the first container if any exists, or returns an error. It will print a message to the user indicating a default was selected if there was more than one container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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