k8s_portforward

package
v0.0.0-...-fc172d5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const NILSTRING = ""
View Source
const PROXY_KEY = "e2e-proxy"

Variables

This section is empty.

Functions

func PortForwardNode

func PortForwardNode(address string, port int) (string, error)

PortForwardNode establish port forwarding to an IP address - port combination, and return the local port. This establishes a 2 hop port forwarding to the target,

1 - port forward to the in cluster e2e-proxy pod
2 - e2e-proxy pod forwards the IP address port.

Note port forwarding is only instantiated if one does not exist or the previous port forwarding has stopped.

func PortForwardService

func PortForwardService(svcName string, namespace string, port int) (string, error)

PortForwardService establish port forwarding to a service running on the cluster and return the local port. port forwarding is only instantiated if one does not exist or the previous port forwarding has stopped.

func TryPortForwardNode

func TryPortForwardNode(address string, port int) string

Types

type PortForwardPodStatus

type PortForwardPodStatus struct {
	// Streams configures where to write or read input from
	Streams genericiooptions.IOStreams
	// StopCh is the channel used to manage the port forward lifecycle
	StopCh chan struct{}
	// ReadyCh communicates when the tunnel is ready to receive traffic
	ReadyCh chan struct{}

	RemotePort uint16
	LocalPort  uint16
	Done       bool
	Pod        coreV1.Pod
	// contains filtered or unexported fields
}

func (PortForwardPodStatus) PortAddress

func (pf PortForwardPodStatus) PortAddress() string

func (PortForwardPodStatus) String

func (pf PortForwardPodStatus) String() string

Jump to

Keyboard shortcuts

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