k8s

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 24 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(config *config.Config, outputPath string, kind string, namespace string, name string)

func AddDescription

func AddDescription(config *config.Config, outputPath string, kind string, namespace string, name string)

func AddKubernetesNodesInformation added in v1.0.0

func AddKubernetesNodesInformation(cfg *config.Config)

func AddLogs

func AddLogs(cfg *config.Config, path string, namespace string, name string)

func AddPodHttpEndpointOutput

func AddPodHttpEndpointOutput(options AddPodHttpEndpointOutputOptions)

func AddPodHttpMultipleEndpointOutput added in v1.1.2

func AddPodHttpMultipleEndpointOutput(options AddPodHttpEndpointsOutputOptions)

func AddPreviousLogs

func AddPreviousLogs(cfg *config.Config, path string, namespace string, name string)

func AddResourceUsage

func AddResourceUsage(cfg *config.Config, path string, namespace string, name string, executions int)

AddResourceUsage path must include '%d' to replace the execution number within the file path

func DownloadFromPod added in v1.1.2

func DownloadFromPod(options AddDownloadOutputOptions)

func FindDeployment

func FindDeployment(cfg *config.Config, namespace string, name string) (*appsv1.Deployment, error)

func FindStatefulSet added in v1.2.0

func FindStatefulSet(cfg *config.Config, namespace string, name string) (*appsv1.StatefulSet, error)

func ForEachNode added in v1.0.0

func ForEachNode(cfg *config.Config, fn func(node *v1.Node))

ForEachNode note that the function fn will be executed in parallel for each node

func ForEachPod

func ForEachPod(cfg *config.Config, namespace string, selector *metav1.LabelSelector, fn func(pod *v1.Pod, idx int))

ForEachPod note that the function fn will be executed in parallel for each pod

func ForEachPodViaMapSelector added in v1.1.2

func ForEachPodViaMapSelector(cfg *config.Config, namespace string, selectorMap map[string]string, fn func(pod *v1.Pod, idx int))

ForEachPodViaMapSelector note that the function fn will be executed in parallel for each pod

func KillProcess added in v1.1.2

func KillProcess(cmd *exec.Cmd, options PodConfig)

func PreparePortforwarding added in v1.1.2

func PreparePortforwarding(options PodConfig, port int) (string, *exec.Cmd, error)

PreparePortforwarding deliberately does not acquire limit.Commands: the port-forward stays alive while the requests through it run, so it would block the very executions it exists for. Its callers run within a limit.Items slot, which is what bounds the number of concurrent port-forwards.

Types

type AddDownloadOutputOptions added in v1.1.2

type AddDownloadOutputOptions struct {
	Config       *config.Config
	OutputPath   string
	PodNamespace string
	PodName      string
	Url          string
	Method       string
}

type AddPodHttpEndpointOutputOptions

type AddPodHttpEndpointOutputOptions struct {
	Config                 *config.Config
	OutputPath             string
	PodNamespace           string
	PodName                string
	Url                    string
	Executions             int
	DelayBetweenExecutions *time.Duration
}

type AddPodHttpEndpointsOutputOptions added in v1.1.2

type AddPodHttpEndpointsOutputOptions struct {
	SharedPort      int
	PodConfig       PodConfig
	EndpointOptions []EndpointsOutputOptions
}

type Connection added in v1.2.4

type Connection struct {
	Url    string
	Auth   bool
	Method string
}

func GetExtensionConnections added in v1.2.4

func GetExtensionConnections(sharedPort int, podConfig PodConfig, cfg *config.Config) []Connection

type ConnectionTester added in v1.4.0

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

ConnectionTester runs the connection tests of one pod from inside that pod. Tests sharing an image also share the ephemeral container they are executed in: starting one costs seconds, and since Kubernetes never removes it from the pod again, one container per test would both slow the run down and leave a long trail behind.

func NewConnectionTester added in v1.4.0

func NewConnectionTester(cfg *config.Config, pod *v1.Pod, targetContainer string) *ConnectionTester

func (*ConnectionTester) AddExtensionConnectionTest added in v1.4.0

func (t *ConnectionTester) AddExtensionConnectionTest(outputPath string, connection Connection)

AddExtensionConnectionTest reaches an extension the way the agent reaches it, which for a setup using mutual TLS means presenting the agent's client certificate - without it the extension rejects the request and the test says nothing about whether the agent itself can get through.

func (*ConnectionTester) AddPlatformConnectionTest added in v1.4.0

func (t *ConnectionTester) AddPlatformConnectionTest(outputPath string, url string)

AddPlatformConnectionTest reaches the platform the way the agent reaches it. Without the agent key the platform answers 401 to everything, so the test asks twice: once verbosely and anonymously, for the connection itself, and once with the key to find out whether it is accepted.

func (*ConnectionTester) AddWebsocketConnectionTest added in v1.4.0

func (t *ConnectionTester) AddWebsocketConnectionTest(outputPath string, url string)

AddWebsocketConnectionTest opens an actual websocket, which validates the handshake beyond the plain upgrade the tests above send: curl checks the server's sec-websocket-accept before switching protocols.

func (*ConnectionTester) AddWebsocketCurlHttp1ConnectionTest added in v1.4.0

func (t *ConnectionTester) AddWebsocketCurlHttp1ConnectionTest(outputPath string, url string)

func (*ConnectionTester) AddWebsocketCurlHttp2ConnectionTest added in v1.4.0

func (t *ConnectionTester) AddWebsocketCurlHttp2ConnectionTest(outputPath string, url string)

type EndpointsOutputOptions added in v1.1.2

type EndpointsOutputOptions struct {
	OutputPath             string
	Url                    string
	Executions             int
	DelayBetweenExecutions *time.Duration
}

type PodConfig added in v1.1.2

type PodConfig struct {
	PodNamespace string
	PodName      string
	Config       *config.Config
}

Jump to

Keyboard shortcuts

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