Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "latest"
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // AgentImage is the container image reference to use within Kubernetes AgentImage string // TargetObject is the target Kubernetes object to proxy access for TargetObject runtime.Object // Namespace is the namespace of the target Kubernetes object Namespace string // Container is the name of the container to target within the Kubernetes object Container string // KeepResources will prevent load balancers and other created resources from being deleted when exiting KeepResources bool // Wireguard contains wireguard-specific configuration Wireguard Wireguard // KubernetesClusterDetails contains resolved information about the K8s cluster KubernetesClusterDetails kuberneteshelpers.ClusterDetails }
type Key ¶
Key wraps wgtypes.Key to allow readable marshal to YAML
func (Key) MarshalText ¶
MarshalText implements the TextMarshaler interface
func (*Key) UnmarshalText ¶
UnmarshalText implements the TextMarshaler interface
type Wireguard ¶
type Wireguard struct { // DirectAccess controls whether to attempt NAT hole-punching or use load balancers to access the target pod DirectAccess bool // LocalKey always represents the keypair associated with the machine we're connecting from LocalKey Key // AgentKey represents the keypair associated with the Kubernetes agent we're connecting to AgentKey Key // LocalAddress represents the local endpoint address for wireguard LocalAddress netip.AddrPort // OverlayPrefix is the prefix of the overlay network OverlayPrefix netip.Prefix // LocalOverlayAddress is the proxy address inside the overlay network LocalOverlayAddress netip.Addr // AgentOverlayAddress is the agent address inside the overlay network AgentOverlayAddress netip.Addr // AllowedIPs is the set of prefixes allowed to be routed through wireguard AllowedIPs []netip.Prefix }
Wireguard represents configuration needed to set up wireguard in two different contexts: Local and Kubernetes Agent
func NewWireguardConfig ¶
func NewWireguardConfig(options ...WireguardOption) (Wireguard, error)
type WireguardOption ¶
func WithAllowedIPs ¶
func WithAllowedIPs(allowedIPs ...string) WireguardOption
func WithDirectAccess ¶
func WithDirectAccess(directAccess bool) WireguardOption
func WithGeneratedKeypairs ¶
func WithGeneratedKeypairs() WireguardOption
func WithLocalAddress ¶
func WithLocalAddress(address netip.AddrPort) WireguardOption
func WithOverlay ¶
func WithOverlay(overlay, localAddress, agentAddress string) WireguardOption
Click to show internal directories.
Click to hide internal directories.