kubernetes

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 29 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 ValidateSecretObjectReference added in v0.5.0

func ValidateSecretObjectReference(ctx context.Context, client k8sclient.Client, secretObjRef *gwapiv1.SecretObjectReference, namespace string) (*corev1.Secret, string, error)

ValidateSecretObjectReference validate secret object reference for extension tls and ratelimit tls settings.

Types

type CLIClient

type CLIClient interface {
	// RESTConfig returns the Kubernetes rest.Config used to configure the clients.
	RESTConfig() *rest.Config

	// Pod returns the pod for the given namespaced name.
	Pod(namespacedName types.NamespacedName) (*corev1.Pod, error)

	// PodsForSelector finds pods matching selector.
	PodsForSelector(namespace string, labelSelectors ...string) (*corev1.PodList, error)

	// PodExec takes a command and the pod data to run the command in the specified pod.
	PodExec(namespacedName types.NamespacedName, container, command string) (stdout, stderr string, err error)

	// Kube returns kube client.
	Kube() kubernetes.Interface
}

func NewCLIClient

func NewCLIClient(clientConfig clientcmd.ClientConfig) (CLIClient, error)

func NewForRestConfig added in v1.1.0

func NewForRestConfig(cfg *rest.Config) (CLIClient, error)

type PortForwarder

type PortForwarder interface {
	// Start waits indefinitely for the port forward to become ready. Prefer
	// StartWithContext when the caller needs a bound on how long it can block.
	Start() error

	// StartWithContext is like Start, but returns ctx.Err() once ctx is done instead of
	// blocking forever. This can't interrupt a Kubernetes upgrade/dial already in flight -
	// client-go's dialer offers no cancellation hook for it - but it guarantees the caller
	// isn't blocked past ctx's deadline, and it stops the forwarder before returning so a
	// dial that does eventually complete doesn't outlive the caller.
	StartWithContext(ctx context.Context) error

	Stop()

	WaitForStop()

	// Address returns the address of the local forwarded address.
	Address() string
}

func NewLocalPortForwarder

func NewLocalPortForwarder(client CLIClient, namespacedName types.NamespacedName, localPort, podPort int) (PortForwarder, error)

Jump to

Keyboard shortcuts

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