proxy

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

README

pkg/proxy

Port-forwarding for Helm-deployed Orkestra installations.

ork proxy discovers Orkestra services by the orkestra.orkspace.io/komponent label and establishes port-forwards for each selected component. For the Runtime it forwards to the leader pod (via Lease); for Control Center and Gateway it forwards to any running pod.

I want to… Go to
Understand how services are discovered and how the Runtime leader pod is resolved docs/01-discovery.md
Understand the forward loop, reconnection, and port conflict handling docs/02-forward.md

Documentation

Index

Constants

View Source
const (
	KomponentRuntime = "runtime"
	KomponentCC      = "control-center"
	KomponentGateway = "gateway"
)

Variables

This section is empty.

Functions

func CheckPort

func CheckPort(port int) error

CheckPort returns an error if the local port is already in use.

func ResolvePod

func ResolvePod(ctx context.Context, cs kubernetes.Interface, ns, svcName string) (string, error)

ResolvePod returns the name of a running pod backing the given service.

func ResolveRuntimePod

func ResolveRuntimePod(ctx context.Context, cs kubernetes.Interface, ns string) (string, error)

ResolveRuntimePod reads the Runtime leader Lease and returns the holder pod name. Uses the Go client directly — not a kubectl subprocess.

func RunAll

func RunAll(ctx context.Context, cfg *rest.Config, cs kubernetes.Interface, targets []ForwardTarget, out io.Writer)

RunAll discovers and forwards all targets, printing status to out. It blocks until ctx is cancelled or all targets report not-deployed.

Types

type ForwardTarget

type ForwardTarget struct {
	Label     string // display name, e.g. "Runtime"
	Komponent string // KomponentRuntime | KomponentCC | KomponentGateway
	Namespace string
	LocalPort int
	Scheme    string // "http" or "https"
	ViaLease  bool   // true for Runtime: resolve pod from Lease, probe health before declaring connected
}

ForwardTarget describes one component to port-forward.

type FoundService

type FoundService struct {
	Name string
	Port int32
}

FoundService is a discovered Orkestra service and its port.

func FindService

func FindService(ctx context.Context, cs kubernetes.Interface, ns, komponent string) (*FoundService, error)

FindService lists Services with the given komponent label in ns. Returns nil, nil when no matching service is found (component not deployed).

Jump to

Keyboard shortcuts

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