From 7feb9ef930742256392d8e994744dd5e8f73fd1b Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Thu, 30 Oct 2025 11:40:23 -0700 Subject: [PATCH 1/2] [api] default upstream for tunnels --- api/core/v1alpha/tunnel_types.go | 5 +++++ api/core/v1alpha2/tunnel_types.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/api/core/v1alpha/tunnel_types.go b/api/core/v1alpha/tunnel_types.go index c9643d9f..27441f04 100644 --- a/api/core/v1alpha/tunnel_types.go +++ b/api/core/v1alpha/tunnel_types.go @@ -40,6 +40,11 @@ type TunnelNodeSpec struct { // direction of the Agent). // +optional EgressGateway *EgressGatewaySpec `json:"egressGateway,omitempty"` + + // Specifies the default upstream used when this tunnel is referenced without + // an explicit host and port to forward traffic to. + // +optional + DefaultUpstream string `json:"defaultUpstream,omitempty"` } type AgentStatus struct { diff --git a/api/core/v1alpha2/tunnel_types.go b/api/core/v1alpha2/tunnel_types.go index 958d4a65..7ab90bb2 100644 --- a/api/core/v1alpha2/tunnel_types.go +++ b/api/core/v1alpha2/tunnel_types.go @@ -45,6 +45,11 @@ type TunnelSpec struct { // in the direction of the agent). // +optional EgressGateway *EgressGatewaySpec `json:"egressGateway,omitempty"` + + // Specifies the default upstream used when this tunnel is referenced without + // an explicit host and port to forward traffic to. + // +optional + DefaultUpstream string `json:"defaultUpstream,omitempty"` } type TunnelCredentials struct { From d0670127e31d60868b10c4566d04e6f11107d866 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Thu, 30 Oct 2025 11:42:18 -0700 Subject: [PATCH 2/2] [api] clarify default upstream default --- api/core/v1alpha/tunnel_types.go | 3 ++- api/core/v1alpha2/tunnel_types.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/core/v1alpha/tunnel_types.go b/api/core/v1alpha/tunnel_types.go index 27441f04..f35843e3 100644 --- a/api/core/v1alpha/tunnel_types.go +++ b/api/core/v1alpha/tunnel_types.go @@ -42,7 +42,8 @@ type TunnelNodeSpec struct { EgressGateway *EgressGatewaySpec `json:"egressGateway,omitempty"` // Specifies the default upstream used when this tunnel is referenced without - // an explicit host and port to forward traffic to. + // an explicit host and port to forward traffic to. If unspecified, the default + // upstream is "127.0.0.1:8080". // +optional DefaultUpstream string `json:"defaultUpstream,omitempty"` } diff --git a/api/core/v1alpha2/tunnel_types.go b/api/core/v1alpha2/tunnel_types.go index 7ab90bb2..c8ccef04 100644 --- a/api/core/v1alpha2/tunnel_types.go +++ b/api/core/v1alpha2/tunnel_types.go @@ -47,7 +47,8 @@ type TunnelSpec struct { EgressGateway *EgressGatewaySpec `json:"egressGateway,omitempty"` // Specifies the default upstream used when this tunnel is referenced without - // an explicit host and port to forward traffic to. + // an explicit host and port to forward traffic to. If unspecified, the default + // upstream is "127.0.0.1:8080". // +optional DefaultUpstream string `json:"defaultUpstream,omitempty"` }