Skip to content

Commit 384f712

Browse files
committed
[tunnel] remove tunnel address writing from server reconciler
TunnelNode.Status.Addresses is now managed by the per-project apiserver's AddressReconciler, not by the tunnelproxy. This prevents stale addresses lingering when projects move between shards.
1 parent e456ea2 commit 384f712

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

pkg/tunnel/server.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"net/http"
1111
"net/netip"
1212
"os"
13-
"slices"
1413
"strings"
1514
"sync"
1615
"time"
@@ -1011,19 +1010,6 @@ func (t *TunnelServer) ReconcileWithClient(ctx context.Context, c client.Client,
10111010

10121011
t.tunnels.Set(string(node.UID), node)
10131012

1014-
if t.options.publicAddr != "" {
1015-
var updated bool
1016-
if !slices.Contains(node.Status.Addresses, t.options.publicAddr) {
1017-
node.Status.Addresses = append(node.Status.Addresses, t.options.publicAddr)
1018-
updated = true
1019-
}
1020-
if updated {
1021-
if err := c.Status().Update(ctx, node); err != nil {
1022-
return reconcile.Result{}, fmt.Errorf("failed to update TunnelNode status: %w", err)
1023-
}
1024-
}
1025-
}
1026-
10271013
// Configure agent addresses from TunnelNode status.
10281014
var pendingAddress bool
10291015
for _, agent := range node.Status.Agents {

0 commit comments

Comments
 (0)