kubeconfigpipe

package
v0.1.0-c02.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 11 Imported by: ? 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

Overview

Package kubeconfigpipe replays one bounded pipe-backed kubeconfig through a fresh anonymous pipe for each child command without placing the credential in argv, the environment, or a regular file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLifecycleFailure

func IsLifecycleFailure(err error) bool

IsLifecycleFailure reports failures where command output cannot be trusted: process cleanup, replay completion, or inherited-I/O WaitDelay expiry.

func Run

func Run(command *exec.Cmd, replay *Replay) error

Run executes one configured command inside the platform process-tree boundary. When replay is non-nil, it attaches a fresh pipe-backed kubeconfig. Process-tree cleanup always finishes before replay completion, so a child cannot keep either inherited output descriptors or the replay writer blocked.

Types

type Replay

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

Replay owns an in-memory kubeconfig until Close. It is concurrency-safe.

func NewFromFD

func NewFromFD(fd int) (*Replay, error)

NewFromFD reads a kubeconfig from an inherited anonymous or named pipe. The caller retains ownership of the original descriptor; reading its duplicate consumes the same stream.

func (*Replay) Attach

func (replay *Replay) Attach(command *exec.Cmd) (func() error, error)

Attach adds a fresh replay pipe to an unstarted command and returns an idempotent completion function. Low-level callers must contain and clean the complete process tree before invoking completion; prefer Run for the safe combined lifecycle.

func (*Replay) Close

func (replay *Replay) Close() error

Close zeroes the retained kubeconfig. It is safe to call repeatedly.

Jump to

Keyboard shortcuts

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