inspect

package
v0.0.0-alpha.0....-430c822 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventFilterPage

func CreateEventFilterPage(rootDir string) error

CreateEventFilterPage reads all events in rootDir recursively, produces a single file, and produces a webpage that can be viewed locally to filter the events.

func GetPodCondition

func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)

GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func GetPodConditionFromList

func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)

GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.

func GetPodReadyCondition

func GetPodReadyCondition(status v1.PodStatus) *v1.PodCondition

Extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.

func InspectResource

func InspectResource(ctx context.Context, info *resource.Info, resourceCtx *resourceContext, o *InspectOptions) error

InspectResource receives an object to gather debugging data for, and a context to keep track of already-seen objects when following related-object reference chains.

func IsPodReady

func IsPodReady(pod *v1.Pod) bool

IsPodReady returns true if a pod is ready; false otherwise.

func IsPodReadyConditionTrue

func IsPodReadyConditionTrue(status v1.PodStatus) bool

IsPodReady returns true if a pod is ready; false otherwise.

func NewCmdInspect

func NewCmdInspect(streams genericiooptions.IOStreams) *cobra.Command

func NewResourceContext

func NewResourceContext(serverResources sets.String) *resourceContext

func PodRunningReady

func PodRunningReady(p *v1.Pod) (bool, error)

PodRunningReady checks whether pod p's phase is running and it has a ready condition of status true.

Types

type InspectOptions

type InspectOptions struct {
	RESTConfig *rest.Config

	// directory where all gathered data will be stored
	DestDir string

	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

func NewInspectOptions

func NewInspectOptions(streams genericiooptions.IOStreams) *InspectOptions

func (*InspectOptions) Complete

func (o *InspectOptions) Complete(args []string) error

func (*InspectOptions) Run

func (o *InspectOptions) Run() error

func (*InspectOptions) RunContext

func (o *InspectOptions) RunContext(ctx context.Context) error

func (*InspectOptions) Validate

func (o *InspectOptions) Validate() error

type MultiSourceFileWriter

type MultiSourceFileWriter struct {
	// contains filtered or unexported fields
}

func NewMultiSourceWriter

func NewMultiSourceWriter(printer printers.ResourcePrinter) *MultiSourceFileWriter

func (*MultiSourceFileWriter) WriteFromResource

func (f *MultiSourceFileWriter) WriteFromResource(ctx context.Context, filepath string, obj runtime.Object) error

func (*MultiSourceFileWriter) WriteFromSource

func (f *MultiSourceFileWriter) WriteFromSource(ctx context.Context, filepath string, source fileWriterSource) error

type TextWriterSource

type TextWriterSource struct {
	Text string
}

func (*TextWriterSource) Stream

func (t *TextWriterSource) Stream(ctx context.Context) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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