kubernetes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

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 string, command string) (stdout string, stderr string, err error)

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

func NewCLIClient

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

type PortForwarder

type PortForwarder interface {
	Start() 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